Created
July 30, 2021 23:04
-
-
Save bmoore-msft/09c395015e9486c75ddb2f45dc5028b0 to your computer and use it in GitHub Desktop.
deploy a resource with an expression for the type property
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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"type": { | |
"type": "string", | |
"defaultValue": "Microsoft.Network/publicIPAddresses" | |
} | |
}, | |
"resources": [ | |
{ | |
"name": "nestedDeployment", | |
"type": "Microsoft.Resources/deployments", | |
"apiVersion": "2020-10-01", | |
"properties": { | |
"mode": "Incremental", | |
"template": { | |
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"resources": [ | |
{ | |
"name": "publicIPAddress1", | |
"type": "[parameters('type')]", | |
"apiVersion": "2019-11-01", | |
"location": "[resourceGroup().location]", | |
"properties": { | |
"publicIPAllocationMethod": "Dynamic" | |
} | |
} | |
] | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment