Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use relative paths to bicep modules instead of using bicep registry #55

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bicep/modules/azure-kubernetes-service/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ param dnsServiceIP string = '10.0.0.10'
@description('A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range.')
param dockerBridgeCidr string = '172.17.0.1/16'

@description('Resource ID of log analytics workspace for auditing')
param logAnalyticsWorkspaceResourceId string = ''

@allowed([
'loadBalancer'
'managedNATGateway'
Expand Down
14 changes: 7 additions & 7 deletions cloud-native/aks-arm64/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resource rg 'Microsoft.Resources/resourceGroups@2021-04-01' = {
}

// Set up the container registry
module acr 'br/oss-labs:bicep/modules/azure-container-registry:v0.1' = {
module acr '../../bicep/modules/azure-container-registry/main.bicep' = {
scope: rg
name: 'acrDeploy'
params: {
Expand All @@ -30,7 +30,7 @@ module acr 'br/oss-labs:bicep/modules/azure-container-registry:v0.1' = {
}

// Set up the network security group
module nsg 'br/oss-labs:bicep/modules/azure-network-security-group:v0.1' = if (networkPlugin != 'kubenet') {
module nsg '../../bicep/modules/azure-network-security-group/main.bicep' = if (networkPlugin != 'kubenet') {
scope: rg
name: 'nsgDeploy'
params: {
Expand All @@ -41,7 +41,7 @@ module nsg 'br/oss-labs:bicep/modules/azure-network-security-group:v0.1' = if (n
}

// Setup the virtual network and subnet
module vnet 'br/oss-labs:bicep/modules/azure-virtual-network:v0.1' = if (networkPlugin != 'kubenet') {
module vnet '../../bicep/modules/azure-virtual-network/main.bicep' = if (networkPlugin != 'kubenet') {
scope: rg
name: 'vnetDeploy'
params: {
Expand All @@ -57,7 +57,7 @@ module vnet 'br/oss-labs:bicep/modules/azure-virtual-network:v0.1' = if (network
}

// Setup the log analytics workspace
module law 'br/oss-labs:bicep/modules/azure-log-analytics-workspace:v0.1' = {
module law '../../bicep/modules/azure-log-analytics-workspace/main.bicep' = {
scope: rg
name: 'lawDeploy'
params: {
Expand All @@ -68,7 +68,7 @@ module law 'br/oss-labs:bicep/modules/azure-log-analytics-workspace:v0.1' = {
}

// Setup the Kubernetes cluster
module aks 'br/oss-labs:bicep/modules/azure-kubernetes-service:v0.1' = {
module aks '../../bicep/modules/azure-kubernetes-service/main.bicep' = {
scope: rg
name: 'aksDeploy'
params: {
Expand Down Expand Up @@ -98,13 +98,13 @@ module aks 'br/oss-labs:bicep/modules/azure-kubernetes-service:v0.1' = {
systemNodeVmSize: 'Standard_D2s_v5'
registryName: acr.outputs.name
vnetSubnetID: networkPlugin != 'kubenet' ? vnet.outputs.subnetId : ''
logAnalyticsWorkspaceResourceID: law.outputs.id
logAnalyticsWorkspaceResourceId: law.outputs.id
nodeTaints: [ 'CriticalAddonsOnly=true:NoSchedule' ] // If deploying a user node pool too, you can taint the system node pool to prevent application pods from being scheduled on it; otherwise, leave empty
}
}

// Setup the user node pools and deploy into a subnet
module aksPools 'br/oss-labs:bicep/modules/azure-kubernetes-service-nodepools:v0.1' = {
module aksPools '../../bicep/modules/azure-kubernetes-service-nodepools/main.bicep' = {
scope: rg
name: 'armNodePoolsDeploy'
params: {
Expand Down
12 changes: 6 additions & 6 deletions cloud-native/aks-open-service-mesh/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource rg 'Microsoft.Resources/resourceGroups@2021-04-01' = {
tags: tags
}

module kv 'br/oss-labs:bicep/modules/azure-key-vault:v0.1' = {
module kv '../../bicep/modules/azure-key-vault/main.bicep' = {
scope: rg
name: 'akvDeploy'
params: {
Expand All @@ -35,7 +35,7 @@ module kv 'br/oss-labs:bicep/modules/azure-key-vault:v0.1' = {
}

// Setup the log analytics workspace
module law 'br/oss-labs:bicep/modules/azure-log-analytics-workspace:v0.1' = {
module law '../../bicep/modules/azure-log-analytics-workspace/main.bicep' = {
scope: rg
name: 'lawDeploy'
params: {
Expand All @@ -46,7 +46,7 @@ module law 'br/oss-labs:bicep/modules/azure-log-analytics-workspace:v0.1' = {
}

// Setup the Kubernetes cluster
module aks 'br/oss-labs:bicep/modules/azure-kubernetes-service:v0.2' = {
module aks '../../bicep/modules/azure-kubernetes-service/main.bicep' = {
scope: rg
name: 'aksDeploy'
params: {
Expand Down Expand Up @@ -87,7 +87,7 @@ module aks 'br/oss-labs:bicep/modules/azure-kubernetes-service:v0.2' = {
}

// Deploy the key vault secrets provider add-on
module aksAddonKv 'br/oss-labs:bicep/modules/azure-kubernetes-service-addons:v0.1' = {
module aksAddonKv '../../bicep/modules/azure-kubernetes-service-addons/main.bicep' = {
scope: rg
name: 'aksAddonKvDeploy'
params: {
Expand All @@ -110,7 +110,7 @@ module aksAddonKv 'br/oss-labs:bicep/modules/azure-kubernetes-service-addons:v0.
}

// Deploy the web app routing add-on
module aksAddonIng 'br/oss-labs:bicep/modules/azure-kubernetes-service-ingress:v0.1' = {
module aksAddonIng '../../bicep/modules/azure-kubernetes-service-ingress/main.bicep' = {
scope: rg
name: 'aksAddonIngDeploy'
params: {
Expand All @@ -123,7 +123,7 @@ module aksAddonIng 'br/oss-labs:bicep/modules/azure-kubernetes-service-ingress:v
}

// Deploy the open service mesh add-on
module aksAddonOsm 'br/oss-labs:bicep/modules/azure-kubernetes-service-addons:v0.1' = {
module aksAddonOsm '../../bicep/modules/azure-kubernetes-service-addons/main.bicep' = {
scope: rg
name: 'aksAddonOsmDeploy'
params: {
Expand Down
12 changes: 6 additions & 6 deletions cloud-native/aks-webapp-routing/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource rg 'Microsoft.Resources/resourceGroups@2021-04-01' = {
}

// Deploy the Kubernetes cluster
module aks 'br/oss-labs:bicep/modules/azure-kubernetes-service:v0.2' = {
module aks '../../bicep/modules/azure-kubernetes-service/main.bicep' = {
scope: rg
name: 'aksDeploy'
params: {
Expand All @@ -36,7 +36,7 @@ module aks 'br/oss-labs:bicep/modules/azure-kubernetes-service:v0.2' = {
}

// Deploy the key vault
module kv 'br/oss-labs:bicep/modules/azure-key-vault:v0.1' = {
module kv '../../bicep/modules/azure-key-vault/main.bicep' = {
scope: rg
name: 'kvDeploy'
params: {
Expand Down Expand Up @@ -68,7 +68,7 @@ module kv 'br/oss-labs:bicep/modules/azure-key-vault:v0.1' = {
}

// Deploy the public DNS zone
module dns 'br/oss-labs:bicep/modules/azure-dns:v0.1' = {
module dns '../../bicep/modules/azure-dns/main.bicep' = {
scope: rg
name: 'dnsDeploy'
params: {
Expand All @@ -85,7 +85,7 @@ module dns 'br/oss-labs:bicep/modules/azure-dns:v0.1' = {
}

// Deploy the key vault secrets provider add-on
module aksAddonKv 'br/oss-labs:bicep/modules/azure-kubernetes-service-addons:v0.1' = {
module aksAddonKv '../../bicep/modules/azure-kubernetes-service-addons/main.bicep' = {
scope: rg
name: 'aksAddonKvDeploy'
params: {
Expand All @@ -108,7 +108,7 @@ module aksAddonKv 'br/oss-labs:bicep/modules/azure-kubernetes-service-addons:v0.
}

// Deploy the web app routing add-on
module aksAddonIng 'br/oss-labs:bicep/modules/azure-kubernetes-service-ingress:v0.1' = {
module aksAddonIng '../../bicep/modules/azure-kubernetes-service-ingress/main.bicep' = {
scope: rg
name: 'aksAddonIngDeploy'
params: {
Expand All @@ -128,7 +128,7 @@ module aksAddonIng 'br/oss-labs:bicep/modules/azure-kubernetes-service-ingress:v
// scope: mcResourceGroup
// }

// module aksAddonIngDns 'br/oss-labs:bicep/modules/azure-kubernetes-service-ingress-dns:v0.1' = {
// module aksAddonIngDns '../../bicep/modules/azure-kubernetes-service-ingress-dns/main.bicep' = {
// scope: rg
// name: 'aksAddonIngDnsDeploy'
// params: {
Expand Down
Loading