Skip to content

Instantly share code, notes, and snippets.

@johnlokerse
Created January 7, 2024 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnlokerse/17f83941f06d1aee53b081a814a0e45d to your computer and use it in GitHub Desktop.
Save johnlokerse/17f83941f06d1aee53b081a814a0e45d to your computer and use it in GitHub Desktop.
Reusability with export and import in Azure Bicep blog
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"languageVersion": "2.0",
"contentVersion": "1.0.0.0",
"definitions": {
"tagsType": {
"type": "object",
"properties": {
"Environment": {
"type": "string",
"allowedValues": [
"Dev",
"Prod",
"QA",
"Stage",
"Test"
]
},
"CostCenter": {
"type": "string"
},
"Owner": {
"type": "string"
},
"BusinessUnit": {
"type": "string"
}
},
"additionalProperties": {
"type": "string"
},
"metadata": {
"__bicep_imported_from!": {
"sourceTemplate": "shared.bicep"
}
}
}
},
"parameters": {
"parKeyVaultName": {
"type": "string"
},
"parTags": {
"$ref": "#/definitions/tagsType"
}
},
"resources": {
... resources here ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment