Skip to content

Add AKS Defender for Containers quickstart - #498

Merged
Rebecca Calixte (Rebecca-Calixte) merged 3 commits into
masterfrom
copilot/add-aks-defender-containers-20260813
Aug 27, 2026
Merged

Rebecca Calixte (Rebecca-Calixte) merged 3 commits into
masterfrom
copilot/add-aks-defender-containers-20260813

Conversation

@Rebecca-Calixte

Copy link
Copy Markdown
Collaborator

Adds a Terraform quickstart sample for enabling Microsoft Defender for Containers on Azure Kubernetes Service (AKS).

This sample includes the Terraform configuration for enabling the Defender for Containers plan at the subscription level, creating an AKS cluster with Microsoft Defender security monitoring, and connecting the cluster to a Log Analytics workspace.

The README includes the original scenario’s prerequisites, deployment steps, verification steps, and resource cleanup guidance.

Co-authored-by: Rebecca-Calixte <262454636+Rebecca-Calixte@users.noreply.github.com>
Co-authored-by: vranade-microsoft <269690592+vranade-microsoft@users.noreply.github.com>
@vranade-microsoft

Copy link
Copy Markdown
Collaborator

Summary of changes made using Copilot

Root cause: The e2e-check job failed on Test_Quickstarts/quickstart/101-aks-defender-containers because the azurerm_security_center_subscription_pricing.containers resource's extension blocks for AgentlessVmScanning and ContainerSensor were declared without additional_extension_properties. Azure applies its own default properties for these extensions server-side (ExclusionTags for AgentlessVmScanning; AntiMalwareEnabled, AutoProvisioning, InstallationMethod, SecurityGatingEnabled for ContainerSensor), which aren't reflected in the Terraform config. This caused the idempotency check (second terraform plan after apply) to detect drift and fail with terraform configuration not idempotent.

Fix: Added the matching additional_extension_properties to both extension blocks in quickstart/101-aks-defender-containers/main.tf so the plan is empty on re-apply.

Code review found no issues, and CodeQL check was skipped since the change is trivial (adding attribute values only, no logic changes).

@Rebecca-Calixte
Rebecca Calixte (Rebecca-Calixte) merged commit 676016a into master Aug 27, 2026
3 checks passed

This branch was previously deployed

1 inactive deployment
test — 69f6bf7c Deployed Aug 27, 2026 by Copilot via e2e-check #944
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants