-
Notifications
You must be signed in to change notification settings - Fork 762
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into feature/keyvault-re…
…ference-in-module-parameters-1028
- Loading branch information
Showing
15 changed files
with
440 additions
and
163 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,11 @@ jobs: | |
|
||
- name: Commit baselines | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Bicep Automation" | ||
git add . | ||
if ! git diff-index --quiet HEAD --; then | ||
git commit -m "Update test baselines" | ||
git push | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,93 +1,93 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"dnsPrefix": { | ||
"type": "string" | ||
}, | ||
"linuxAdminUsername": { | ||
"type": "string" | ||
}, | ||
"sshRSAPublicKey": { | ||
"type": "string" | ||
}, | ||
"servicePrincipalClientId": { | ||
"type": "string" | ||
}, | ||
"servicePrincipalClientSecret": { | ||
"type": "secureString" | ||
}, | ||
"clusterName": { | ||
"type": "string", | ||
"defaultValue": "aks101cluster" | ||
}, | ||
"location": { | ||
"type": "string", | ||
"defaultValue": "[resourceGroup().location]" | ||
}, | ||
"osDiskSizeGB": { | ||
"type": "int", | ||
"defaultValue": 0, | ||
"maxValue": 1023, | ||
"minValue": 0 | ||
}, | ||
"agentCount": { | ||
"type": "int", | ||
"defaultValue": 3, | ||
"maxValue": 50, | ||
"minValue": 1 | ||
}, | ||
"agentVMSize": { | ||
"type": "string", | ||
"defaultValue": "Standard_DS2_v2" | ||
} | ||
}, | ||
"functions": [], | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.ContainerService/managedClusters", | ||
"apiVersion": "2020-09-01", | ||
"name": "[parameters('clusterName')]", | ||
"location": "[parameters('location')]", | ||
"properties": { | ||
"dnsPrefix": "[parameters('dnsPrefix')]", | ||
"agentPoolProfiles": [ | ||
{ | ||
"name": "agentpool", | ||
"osDiskSizeGB": "[parameters('osDiskSizeGB')]", | ||
"count": "[parameters('agentCount')]", | ||
"vmSize": "[parameters('agentVMSize')]", | ||
"osType": "Linux" | ||
} | ||
], | ||
"linuxProfile": { | ||
"adminUsername": "[parameters('linuxAdminUsername')]", | ||
"ssh": { | ||
"publicKeys": [ | ||
{ | ||
"keyData": "[parameters('sshRSAPublicKey')]" | ||
} | ||
] | ||
} | ||
}, | ||
"servicePrincipalProfile": { | ||
"clientId": "[parameters('servicePrincipalClientId')]", | ||
"secret": "[parameters('servicePrincipalClientSecret')]" | ||
} | ||
} | ||
} | ||
], | ||
"outputs": { | ||
"controlPlaneFQDN": { | ||
"type": "string", | ||
"value": "[reference(resourceId('Microsoft.ContainerService/managedClusters', parameters('clusterName'))).fqdn]" | ||
} | ||
}, | ||
"metadata": { | ||
"_generator": { | ||
"name": "bicep", | ||
"version": "dev", | ||
"templateHash": "4675384475882014116" | ||
} | ||
} | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"dnsPrefix": { | ||
"type": "string" | ||
}, | ||
"linuxAdminUsername": { | ||
"type": "string" | ||
}, | ||
"sshRSAPublicKey": { | ||
"type": "string" | ||
}, | ||
"servicePrincipalClientId": { | ||
"type": "string" | ||
}, | ||
"servicePrincipalClientSecret": { | ||
"type": "secureString" | ||
}, | ||
"clusterName": { | ||
"type": "string", | ||
"defaultValue": "aks101cluster" | ||
}, | ||
"location": { | ||
"type": "string", | ||
"defaultValue": "[resourceGroup().location]" | ||
}, | ||
"osDiskSizeGB": { | ||
"type": "int", | ||
"defaultValue": 0, | ||
"maxValue": 1023, | ||
"minValue": 0 | ||
}, | ||
"agentCount": { | ||
"type": "int", | ||
"defaultValue": 3, | ||
"maxValue": 50, | ||
"minValue": 1 | ||
}, | ||
"agentVMSize": { | ||
"type": "string", | ||
"defaultValue": "Standard_DS2_v2" | ||
} | ||
}, | ||
"functions": [], | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.ContainerService/managedClusters", | ||
"apiVersion": "2020-09-01", | ||
"name": "[parameters('clusterName')]", | ||
"location": "[parameters('location')]", | ||
"properties": { | ||
"dnsPrefix": "[parameters('dnsPrefix')]", | ||
"agentPoolProfiles": [ | ||
{ | ||
"name": "agentpool", | ||
"osDiskSizeGB": "[parameters('osDiskSizeGB')]", | ||
"count": "[parameters('agentCount')]", | ||
"vmSize": "[parameters('agentVMSize')]", | ||
"osType": "Linux" | ||
} | ||
], | ||
"linuxProfile": { | ||
"adminUsername": "[parameters('linuxAdminUsername')]", | ||
"ssh": { | ||
"publicKeys": [ | ||
{ | ||
"keyData": "[parameters('sshRSAPublicKey')]" | ||
} | ||
] | ||
} | ||
}, | ||
"servicePrincipalProfile": { | ||
"clientId": "[parameters('servicePrincipalClientId')]", | ||
"secret": "[parameters('servicePrincipalClientSecret')]" | ||
} | ||
} | ||
} | ||
], | ||
"outputs": { | ||
"controlPlaneFQDN": { | ||
"type": "string", | ||
"value": "[reference(resourceId('Microsoft.ContainerService/managedClusters', parameters('clusterName'))).fqdn]" | ||
} | ||
}, | ||
"metadata": { | ||
"_generator": { | ||
"name": "bicep", | ||
"version": "dev", | ||
"templateHash": "4675384475882014116" | ||
} | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
docs/examples/101/app-service-regional-vnet-integration/main.bicep
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
param location string | ||
param nameprefix string | ||
|
||
param vnetAddressPrefix string = '10.0.0.0/16' | ||
param subnetAddressPrefix string = '10.0.0.0/24' | ||
|
||
resource appsvc 'Microsoft.Web/serverfarms@2020-06-01' = { | ||
name: '${nameprefix}asp' | ||
location: location | ||
sku: { | ||
name: 'S1' | ||
} | ||
} | ||
|
||
resource vnet 'Microsoft.Network/virtualNetworks@2020-06-01' = { | ||
name: '${nameprefix}vnet' | ||
location: location | ||
properties: { | ||
addressSpace: { | ||
addressPrefixes: [ | ||
vnetAddressPrefix | ||
] | ||
} | ||
subnets: [ | ||
{ | ||
name: '${nameprefix}sn' | ||
properties: { | ||
addressPrefix: subnetAddressPrefix | ||
delegations: [ | ||
{ | ||
name: 'delegation' | ||
properties: { | ||
serviceName: 'Microsoft.Web/serverFarms' | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
|
||
resource webapp1 'Microsoft.Web/sites@2020-06-01' = { | ||
name: '${nameprefix}wa' | ||
location: location | ||
kind: 'app' | ||
dependsOn: [ | ||
appsvc | ||
vnet | ||
] | ||
properties: { | ||
serverFarmId: appsvc.id | ||
} | ||
} | ||
|
||
resource webapp1vnet 'Microsoft.Web/sites/networkConfig@2020-06-01' = { | ||
name: '${webapp1.name}/virtualNetwork' | ||
properties: { | ||
subnetResourceId: vnet.properties.subnets[0].id | ||
} | ||
} |
94 changes: 94 additions & 0 deletions
94
docs/examples/101/app-service-regional-vnet-integration/main.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"location": { | ||
"type": "string" | ||
}, | ||
"nameprefix": { | ||
"type": "string" | ||
}, | ||
"vnetAddressPrefix": { | ||
"type": "string", | ||
"defaultValue": "10.0.0.0/16" | ||
}, | ||
"subnetAddressPrefix": { | ||
"type": "string", | ||
"defaultValue": "10.0.0.0/24" | ||
} | ||
}, | ||
"functions": [], | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Web/serverfarms", | ||
"apiVersion": "2020-06-01", | ||
"name": "[format('{0}asp', parameters('nameprefix'))]", | ||
"location": "[parameters('location')]", | ||
"sku": { | ||
"name": "S1" | ||
} | ||
}, | ||
{ | ||
"type": "Microsoft.Network/virtualNetworks", | ||
"apiVersion": "2020-06-01", | ||
"name": "[format('{0}vnet', parameters('nameprefix'))]", | ||
"location": "[parameters('location')]", | ||
"properties": { | ||
"addressSpace": { | ||
"addressPrefixes": [ | ||
"[parameters('vnetAddressPrefix')]" | ||
] | ||
}, | ||
"subnets": [ | ||
{ | ||
"name": "[format('{0}sn', parameters('nameprefix'))]", | ||
"properties": { | ||
"addressPrefix": "[parameters('subnetAddressPrefix')]", | ||
"delegations": [ | ||
{ | ||
"name": "delegation", | ||
"properties": { | ||
"serviceName": "Microsoft.Web/serverFarms" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "Microsoft.Web/sites", | ||
"apiVersion": "2020-06-01", | ||
"name": "[format('{0}wa', parameters('nameprefix'))]", | ||
"location": "[parameters('location')]", | ||
"kind": "app", | ||
"properties": { | ||
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', format('{0}asp', parameters('nameprefix')))]" | ||
}, | ||
"dependsOn": [ | ||
"[resourceId('Microsoft.Web/serverfarms', format('{0}asp', parameters('nameprefix')))]", | ||
"[resourceId('Microsoft.Network/virtualNetworks', format('{0}vnet', parameters('nameprefix')))]" | ||
] | ||
}, | ||
{ | ||
"type": "Microsoft.Web/sites/networkConfig", | ||
"apiVersion": "2020-06-01", | ||
"name": "[format('{0}/virtualNetwork', format('{0}wa', parameters('nameprefix')))]", | ||
"properties": { | ||
"subnetResourceId": "[reference(resourceId('Microsoft.Network/virtualNetworks', format('{0}vnet', parameters('nameprefix')))).subnets[0].id]" | ||
}, | ||
"dependsOn": [ | ||
"[resourceId('Microsoft.Network/virtualNetworks', format('{0}vnet', parameters('nameprefix')))]", | ||
"[resourceId('Microsoft.Web/sites', format('{0}wa', parameters('nameprefix')))]" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"_generator": { | ||
"name": "bicep", | ||
"version": "dev", | ||
"templateHash": "12140943735656405647" | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.