refactor: Modernize Bicep Secure Baseline with AVM, Workload Identity, AGC, KMS v2, CNI Overlay#189
Merged
Conversation
oZakari
marked this pull request as draft
March 10, 2026 00:08
…s using pickZones()
oZakari
marked this pull request as ready for review
March 25, 2026 02:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Comprehensive refactoring of the AKS Secure Baseline Bicep scenario to align with current AKS security baselines, adopt Azure Verified Modules (AVM), and modernize identity, networking, secrets management, encryption patterns, and availability zone support.
Issues Resolved
Closes #172 — BICEP: Migrate to Microsoft Entra Workload Identity
Closes #173 — BICEP: Replace AGIC with Application Gateway for Containers (AGC) + Gateway API
Closes #175 — BICEP: Enable etcd Encryption with KMS v2 and Private Key Vault
Closes #177 — BICEP: Adopt Azure CNI Overlay and Cilium Dataplane
Closes #179 — BICEP: Integrate Key Vault CSI Driver for Secrets Management
Closes #181 — BICEP: Istio Service Mesh Integration (new scenario)
Closes #185 — feat(bicep): AKS Automatic mode support
Closes #188 — feat(bicep): Namespace building block
Changes by Issue
#172 — Microsoft Entra Workload Identity
workload-identity.bicepcreates managed identity with federated credential via AVM moduleservice-account.yaml,secret-provider-class.yaml,sample-workload.yamlall useazure.workload.identityannotationsEnablePodIdentityPreviewreferences from docs#173 — Application Gateway for Containers + Gateway API
Microsoft.ServiceNetworking/trafficControllersagc.bicepmodule deploying AGC traffic controller + subnet associationgateway-class.yaml,gateway.yaml,httproute.yaml)#175 — etcd Encryption with KMS v2
aks-etcd-kms) to Key Vault in05-AKS-supportingsecurityProfile.azureKeyVaultKmsto both Standard and Automatic cluster modulesKey Vault Crypto Userrole assignment for AKS identitypublicNetworkAccess: 'Disabled'withenableRbacAuthorization: trueenableKmsEncryptionparameter toggle#177 — Azure CNI Overlay + Cilium
networkPluginMode: 'overlay'andnetworkDataplane: 'cilium'on Standard clusternetworkPolicy: 'calico'(Cilium replaces Calico)#179 — Key Vault CSI Driver
enableKeyvaultSecretsProvider: trueandenableSecretRotation: trueon both cluster modesKey Vault Secrets Userrole on Key VaultSecretProviderClassmanifest uses workload identity (usePodIdentity: "false",clientID)#185 — AKS Automatic Mode
Base) and Automatic SKUs supported viaaksSkuNameparameter06-aks-cluster.mddocuments trade-offs#188 — Namespace Building Block
namespace-building-block.bicepuses AVM Flux extension + configuration modules#181 — Istio Service Mesh (new scenario)
AKS-Istio-Mesh/Bicep/main.bicepscenario with AVM managed-clusterCode Quality Improvements
@description()decorators added to all params/outputs across 03-Network-Hub, 04-Network-LZ, 05-AKS-supporting, 06-AKS-cluster@secure()added to jumpbox admin password (extracted from hardcodedPassword123)main.json) regeneratedAvailability Zone Support
availabilityZonesparameter defaults to[1, 2, 3], can be set to[]for regions without zone supportzoneRedundancy: 'Enabled'added (requires Premium SKU, already in use)jumpboxAvailabilityZoneparameter defaults to1, can be set to0for no zone pinningavailabilityZonesparameterBreaking Changes
Application Gateway removed — The standalone Application Gateway v2, its NSG, route table, and public IP are no longer deployed by
04-Network-LZ. Replaced by AGC traffic controller. Existing deployments using AppGW backend pool wiring will need to migrate to Gateway API manifests.AppGW subnet renamed —
AppGWSubnet(10.1.2.0/27) replaced withAGCSubnet(10.1.2.0/24) with subnet delegation. The CIDR range changed from /27 to /24.Parameters renamed/removed in
04-Network-LZ/main.bicep:appGatewayName→agcNamensgAppGWName— removedrtAppGWSubnetName— removedappGwyAutoScale— removedspokeSubnetAppGWPrefix→spokeSubnetAGCPrefixJumpbox password now required as parameter —
04-Network-LZnow has a@secure() jumpboxAdminPasswordparameter instead of hardcodedPassword123. The All-in-One deployment requires this to be provided at deploy time.Network policy engine changed —
networkPolicy: 'calico'removed; Cilium dataplane handles network policy. Existing Calico NetworkPolicy CRDs should still work but Calico-specific features (e.g., GlobalNetworkPolicy) will not.KMS v2 enabled by default — etcd encryption is on by default. Requires Key Vault with a key named
aks-etcd-kms. Disable withenableKmsEncryption=falseif not needed.New required parameter in All-in-One —
jumpboxAdminPassword(secure string) must be provided.AKS node pool zones changed — Standard cluster node pool now spans zones
[1, 2, 3](previously only zone3). SetavailabilityZones=[]for regions without zone support.Testing
.bicepfiles pass Bicep diagnostics (zero errors, zero warnings)