From cea4b01b4c9c3f7f06b279242f1d6f3b15915260 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 4 Aug 2021 13:19:15 +0200 Subject: [PATCH 1/5] Added Template Spec Release --- .github/workflows/dataProductRelease.yml | 63 ++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/dataProductRelease.yml diff --git a/.github/workflows/dataProductRelease.yml b/.github/workflows/dataProductRelease.yml new file mode 100644 index 0000000..5b6e581 --- /dev/null +++ b/.github/workflows/dataProductRelease.yml @@ -0,0 +1,63 @@ +name: Data Product Release + +on: + push: + tags: + - "v*" + +env: + DATA_PRODUCT_NAME: "DataProductStreaming" + AZURE_SUBSCRIPTION_ID: "17588eb2-2943-461a-ab3f-00a3ceac3112" # Update to '{dataLandingZoneSubscriptionId}' + AZURE_RESOURCE_GROUP_NAME: "dmz-dev-templatespecs" # Update to '{dataLandingZoneName}-rg' + AZURE_LOCATION: "northeurope" # Update to '{regionName}' + +jobs: + release: + name: "Data Product Release" + runs-on: ubuntu-latest + continue-on-error: false + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Check Out Repository + id: checkout_repository + uses: actions/checkout@v2 + + # Login to Azure + - name: Azure Login + id: azure_login + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + # Deploy Template Spec + - name: Deploy Template Spec + id: template_spec_deployment + uses: azure/CLI@v1 + with: + azcliversion: "latest" + inlineScript: | + # Strip git ref prefix from version + VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') + + # Strip "v" prefix from tag name + [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') + echo VERSION=$VERSION + + # Create Template Spec + az ts create \ + --name ${{ env.DATA_PRODUCT_NAME }} \ + --version $VERSION \ + --subscription ${{ env.AZURE_SUBSCRIPTION_ID }} \ + --resource-group ${{ env.AZURE_RESOURCE_GROUP_NAME }} \ + --location ${{ env.AZURE_LOCATION }} \ + --template-file ${{ github.workspace }}/infra/main.json + + # Log out from Azure + - name: Log out from Azure + id: azure_logout + uses: azure/cli@v1 + with: + azcliversion: latest + inlineScript: | + az logout From 71cb721eb98825e9e96a76754934bc82702f6e30 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 4 Aug 2021 13:19:46 +0200 Subject: [PATCH 2/5] added sample template spec deployment template --- docs/reference/templatespec/main.bicep | 134 +++++++++++++++ docs/reference/templatespec/main.json | 215 +++++++++++++++++++++++++ 2 files changed, 349 insertions(+) create mode 100644 docs/reference/templatespec/main.bicep create mode 100644 docs/reference/templatespec/main.json diff --git a/docs/reference/templatespec/main.bicep b/docs/reference/templatespec/main.bicep new file mode 100644 index 0000000..3797c99 --- /dev/null +++ b/docs/reference/templatespec/main.bicep @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +targetScope = 'resourceGroup' + +// General parameters +@description('Specifies the location for all resources.') +param location string +@allowed([ + 'dev' + 'tst' + 'prd' +]) +@description('Specifies the environment of the deployment.') +param environment string +@minLength(2) +@maxLength(10) +@description('Specifies the prefix for all resources created in this deployment.') +param prefix string +@description('Specifies the tags that you want to apply to all resources.') +param tags object = {} + +// Resource parameters +@secure() +@description('Specifies the administrator password of the sql servers.') +param administratorPassword string +@description('Specifies the resource ID of the default storage account file system for synapse.') +param synapseDefaultStorageAccountFileSystemId string +@description('Specifies the resource ID of the default storage account file system for stream analytics.') +param streamanalyticsDefaultStorageAccountFileSystemId string +@description('Specifies the resource ID of the central purview instance.') +param purviewId string = '' +@description('Specifies whether role assignments should be enabled.') +param enableRoleAssignments bool = false + +// Network parameters +@description('Specifies the resource ID of the subnet to which all services will connect.') +param subnetId string + +// Private DNS Zone parameters +@description('Specifies the resource ID of the private DNS zone for KeyVault.') +param privateDnsZoneIdKeyVault string = '' +@description('Specifies the resource ID of the private DNS zone for Synapse Dev.') +param privateDnsZoneIdSynapseDev string = '' +@description('Specifies the resource ID of the private DNS zone for Synapse Sql.') +param privateDnsZoneIdSynapseSql string = '' +@description('Specifies the resource ID of the private DNS zone for EventHub Namespaces.') +param privateDnsZoneIdEventhubNamespace string = '' +@description('Specifies the resource ID of the private DNS zone for Cosmos Sql.') +param privateDnsZoneIdCosmosdbSql string = '' +@description('Specifies the resource ID of the private DNS zone for Sql Server.') +param privateDnsZoneIdSqlServer string = '' +@description('Specifies the resource ID of the private DNS zone for IoT Hub.') +param privateDnsZoneIdIothub string = '' + +// Template Spec parameters +param templateSpecId string + +// Variables +var name = toLower('${prefix}-${environment}') +var tagsDefault = { + Owner: 'Enterprise Scale Analytics' + Project: 'Enterprise Scale Analytics' + Environment: environment + Toolkit: 'bicep' + Name: name +} +var tagsJoined = union(tagsDefault, tags) + +// Resources +resource templatespec 'Microsoft.Resources/deployments@2021-04-01' = { + name: 'templatespec-${name}' + location: location + tags: tagsJoined + properties: { + mode: 'Incremental' + templateLink: { + id: templateSpecId + } + parameters: { + location: { + value: location + } + environment: { + value: environment + } + prefix: { + value: prefix + } + tags: { + value: tagsJoined + } + administratorPassword: { + value: administratorPassword + } + synapseDefaultStorageAccountFileSystemId: { + value: synapseDefaultStorageAccountFileSystemId + } + streamanalyticsDefaultStorageAccountFileSystemId: { + value: streamanalyticsDefaultStorageAccountFileSystemId + } + subnetId: { + value: subnetId + } + purviewId: { + value: purviewId + } + enableRoleAssignments: { + value: enableRoleAssignments + } + privateDnsZoneIdKeyVault: { + value: privateDnsZoneIdKeyVault + } + privateDnsZoneIdSynapseDev: { + value: privateDnsZoneIdSynapseDev + } + privateDnsZoneIdSynapseSql: { + value: privateDnsZoneIdSynapseSql + } + privateDnsZoneIdEventhubNamespace: { + value: privateDnsZoneIdEventhubNamespace + } + privateDnsZoneIdCosmosdbSql: { + value: privateDnsZoneIdCosmosdbSql + } + privateDnsZoneIdSqlServer: { + value: privateDnsZoneIdSqlServer + } + privateDnsZoneIdIothub: { + value: privateDnsZoneIdIothub + } + } + } +} diff --git a/docs/reference/templatespec/main.json b/docs/reference/templatespec/main.json new file mode 100644 index 0000000..4ff9d08 --- /dev/null +++ b/docs/reference/templatespec/main.json @@ -0,0 +1,215 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "metadata": { + "_generator": { + "name": "bicep", + "version": "0.4.451.19169", + "templateHash": "3975856797695362636" + } + }, + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Specifies the location for all resources." + } + }, + "environment": { + "type": "string", + "metadata": { + "description": "Specifies the environment of the deployment." + }, + "allowedValues": [ + "dev", + "tst", + "prd" + ] + }, + "prefix": { + "type": "string", + "metadata": { + "description": "Specifies the prefix for all resources created in this deployment." + }, + "maxLength": 10, + "minLength": 2 + }, + "tags": { + "type": "object", + "defaultValue": {}, + "metadata": { + "description": "Specifies the tags that you want to apply to all resources." + } + }, + "administratorPassword": { + "type": "secureString", + "metadata": { + "description": "Specifies the administrator password of the sql servers." + } + }, + "synapseDefaultStorageAccountFileSystemId": { + "type": "string", + "metadata": { + "description": "Specifies the resource ID of the default storage account file system for synapse." + } + }, + "streamanalyticsDefaultStorageAccountFileSystemId": { + "type": "string", + "metadata": { + "description": "Specifies the resource ID of the default storage account file system for stream analytics." + } + }, + "purviewId": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Specifies the resource ID of the central purview instance." + } + }, + "enableRoleAssignments": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "Specifies whether role assignments should be enabled." + } + }, + "subnetId": { + "type": "string", + "metadata": { + "description": "Specifies the resource ID of the subnet to which all services will connect." + } + }, + "privateDnsZoneIdKeyVault": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Specifies the resource ID of the private DNS zone for KeyVault." + } + }, + "privateDnsZoneIdSynapseDev": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Specifies the resource ID of the private DNS zone for Synapse Dev." + } + }, + "privateDnsZoneIdSynapseSql": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Specifies the resource ID of the private DNS zone for Synapse Sql." + } + }, + "privateDnsZoneIdEventhubNamespace": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Specifies the resource ID of the private DNS zone for EventHub Namespaces." + } + }, + "privateDnsZoneIdCosmosdbSql": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Specifies the resource ID of the private DNS zone for Cosmos Sql." + } + }, + "privateDnsZoneIdSqlServer": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Specifies the resource ID of the private DNS zone for Sql Server." + } + }, + "privateDnsZoneIdIothub": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Specifies the resource ID of the private DNS zone for IoT Hub." + } + }, + "templateSpecId": { + "type": "string" + } + }, + "functions": [], + "variables": { + "name": "[toLower(format('{0}-{1}', parameters('prefix'), parameters('environment')))]", + "tagsDefault": { + "Owner": "Enterprise Scale Analytics", + "Project": "Enterprise Scale Analytics", + "Environment": "[parameters('environment')]", + "Toolkit": "bicep", + "Name": "[variables('name')]" + }, + "tagsJoined": "[union(variables('tagsDefault'), parameters('tags'))]" + }, + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2021-04-01", + "name": "[format('templatespec-{0}', variables('name'))]", + "location": "[parameters('location')]", + "tags": "[variables('tagsJoined')]", + "properties": { + "mode": "Incremental", + "templateLink": { + "id": "[parameters('templateSpecId')]" + }, + "parameters": { + "location": { + "value": "[parameters('location')]" + }, + "environment": { + "value": "[parameters('environment')]" + }, + "prefix": { + "value": "[parameters('prefix')]" + }, + "tags": { + "value": "[variables('tagsJoined')]" + }, + "administratorPassword": { + "value": "[parameters('administratorPassword')]" + }, + "synapseDefaultStorageAccountFileSystemId": { + "value": "[parameters('synapseDefaultStorageAccountFileSystemId')]" + }, + "streamanalyticsDefaultStorageAccountFileSystemId": { + "value": "[parameters('streamanalyticsDefaultStorageAccountFileSystemId')]" + }, + "subnetId": { + "value": "[parameters('subnetId')]" + }, + "purviewId": { + "value": "[parameters('purviewId')]" + }, + "enableRoleAssignments": { + "value": "[parameters('enableRoleAssignments')]" + }, + "privateDnsZoneIdKeyVault": { + "value": "[parameters('privateDnsZoneIdKeyVault')]" + }, + "privateDnsZoneIdSynapseDev": { + "value": "[parameters('privateDnsZoneIdSynapseDev')]" + }, + "privateDnsZoneIdSynapseSql": { + "value": "[parameters('privateDnsZoneIdSynapseSql')]" + }, + "privateDnsZoneIdEventhubNamespace": { + "value": "[parameters('privateDnsZoneIdEventhubNamespace')]" + }, + "privateDnsZoneIdCosmosdbSql": { + "value": "[parameters('privateDnsZoneIdCosmosdbSql')]" + }, + "privateDnsZoneIdSqlServer": { + "value": "[parameters('privateDnsZoneIdSqlServer')]" + }, + "privateDnsZoneIdIothub": { + "value": "[parameters('privateDnsZoneIdIothub')]" + } + } + } + } + ] +} \ No newline at end of file From daeff228f516747573f4952db5381945334e459e Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 4 Aug 2021 13:55:45 +0200 Subject: [PATCH 3/5] * adding release yaml for ado * updating release yaml for GHA --- .ado/workflows/dataProductRelease.yml | 65 ++++++++++++++++++++++++ .github/workflows/dataProductRelease.yml | 4 +- 2 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 .ado/workflows/dataProductRelease.yml diff --git a/.ado/workflows/dataProductRelease.yml b/.ado/workflows/dataProductRelease.yml new file mode 100644 index 0000000..aceee1a --- /dev/null +++ b/.ado/workflows/dataProductRelease.yml @@ -0,0 +1,65 @@ +name: Data Product Release + +trigger: + tags: + include: + - v* + +variables: + DATA_PRODUCT_NAME: "DataProductStreaming" # Update to '{dataProductName}' + AZURE_RESOURCE_MANAGER_CONNECTION_NAME: "integration-product-service-connection" # Update to '{resourceManagerConnectionName}' + AZURE_SUBSCRIPTION_ID: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}' + AZURE_RESOURCE_GROUP_NAME: "dlz01-dev-di002" # Update to '{dataLandingZoneName}-rg' + AZURE_LOCATION: "North Europe" # Update to '{regionName}' + +stages: + - stage: Release + displayName: "Data Product Release" + jobs: + - job: Release + displayName: "Data Product Release" + continueOnError: false + pool: + vmImage: "ubuntu-latest" + + steps: + # Checkout code + - checkout: self + name: checkout_repository + displayName: "Checkout repository" + submodules: true + lfs: false + clean: true + continueOnError: false + enabled: true + + # Deploy Template Spec + - task: AzureCLI@2 + name: template_spec_deployment + displayName: Deploy Template Spec + enabled: true + continueOnError: false + inputs: + azureSubscription: ${{ variables.AZURE_RESOURCE_MANAGER_CONNECTION_NAME }} + scriptType: bash + scriptLocation: inlineScript + powerShellErrorActionPreference: stop + addSpnToEnvironment: false + failOnStandardError: false + powerShellIgnoreLASTEXITCODE: false + inlineScript: | + # Strip git ref prefix from version + VERSION=$(echo "$(Build.SourceBranch)" | sed -e 's,.*/\(.*\),\1,') + + # Strip "v" prefix from tag name + [[ "$(Build.SourceBranch)" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') + echo VERSION=$VERSION + + # Create Template Spec + az ts create \ + --name ${{ variables.DATA_PRODUCT_NAME }} \ + --version $VERSION \ + --subscription ${{ variables.AZURE_SUBSCRIPTION_ID }} \ + --resource-group ${{ variables.AZURE_RESOURCE_GROUP_NAME }} \ + --location ${{ variables.AZURE_LOCATION }} \ + --template-file "$(System.DefaultWorkingDirectory)/infra/main.json" diff --git a/.github/workflows/dataProductRelease.yml b/.github/workflows/dataProductRelease.yml index 5b6e581..ea08cb5 100644 --- a/.github/workflows/dataProductRelease.yml +++ b/.github/workflows/dataProductRelease.yml @@ -6,7 +6,7 @@ on: - "v*" env: - DATA_PRODUCT_NAME: "DataProductStreaming" + DATA_PRODUCT_NAME: "DataProductStreaming" # Update to '{dataProductName}' AZURE_SUBSCRIPTION_ID: "17588eb2-2943-461a-ab3f-00a3ceac3112" # Update to '{dataLandingZoneSubscriptionId}' AZURE_RESOURCE_GROUP_NAME: "dmz-dev-templatespecs" # Update to '{dataLandingZoneName}-rg' AZURE_LOCATION: "northeurope" # Update to '{regionName}' @@ -51,7 +51,7 @@ jobs: --subscription ${{ env.AZURE_SUBSCRIPTION_ID }} \ --resource-group ${{ env.AZURE_RESOURCE_GROUP_NAME }} \ --location ${{ env.AZURE_LOCATION }} \ - --template-file ${{ github.workspace }}/infra/main.json + --template-file "${{ github.workspace }}/infra/main.json" # Log out from Azure - name: Log out from Azure From ec2671949d42bf06ba40beaef0fe643a5b4b90b7 Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 4 Aug 2021 14:10:06 +0200 Subject: [PATCH 4/5] * Update variables in ADO and GHA release pipeline * moved template spec folder * added parameter file for template spec --- .ado/workflows/dataProductRelease.yml | 4 +- .github/workflows/dataProductRelease.yml | 2 +- docs/{reference => }/templatespec/main.bicep | 0 docs/{reference => }/templatespec/main.json | 0 docs/templatespec/params.dev.json | 60 ++++++++++++++++++++ 5 files changed, 63 insertions(+), 3 deletions(-) rename docs/{reference => }/templatespec/main.bicep (100%) rename docs/{reference => }/templatespec/main.json (100%) create mode 100644 docs/templatespec/params.dev.json diff --git a/.ado/workflows/dataProductRelease.yml b/.ado/workflows/dataProductRelease.yml index aceee1a..63813f0 100644 --- a/.ado/workflows/dataProductRelease.yml +++ b/.ado/workflows/dataProductRelease.yml @@ -8,8 +8,8 @@ trigger: variables: DATA_PRODUCT_NAME: "DataProductStreaming" # Update to '{dataProductName}' AZURE_RESOURCE_MANAGER_CONNECTION_NAME: "integration-product-service-connection" # Update to '{resourceManagerConnectionName}' - AZURE_SUBSCRIPTION_ID: "2150d511-458f-43b9-8691-6819ba2e6c7b" # Update to '{dataLandingZoneSubscriptionId}' - AZURE_RESOURCE_GROUP_NAME: "dlz01-dev-di002" # Update to '{dataLandingZoneName}-rg' + AZURE_SUBSCRIPTION_ID: "17588eb2-2943-461a-ab3f-00a3ceac3112" # Update to '{dataLandingZoneSubscriptionId}' + AZURE_RESOURCE_GROUP_NAME: "dmz-dev-automation" # Update to '{dataLandingZoneName}-rg' AZURE_LOCATION: "North Europe" # Update to '{regionName}' stages: diff --git a/.github/workflows/dataProductRelease.yml b/.github/workflows/dataProductRelease.yml index ea08cb5..e866040 100644 --- a/.github/workflows/dataProductRelease.yml +++ b/.github/workflows/dataProductRelease.yml @@ -8,7 +8,7 @@ on: env: DATA_PRODUCT_NAME: "DataProductStreaming" # Update to '{dataProductName}' AZURE_SUBSCRIPTION_ID: "17588eb2-2943-461a-ab3f-00a3ceac3112" # Update to '{dataLandingZoneSubscriptionId}' - AZURE_RESOURCE_GROUP_NAME: "dmz-dev-templatespecs" # Update to '{dataLandingZoneName}-rg' + AZURE_RESOURCE_GROUP_NAME: "dmz-dev-automation" # Update to '{dataLandingZoneName}-rg' AZURE_LOCATION: "northeurope" # Update to '{regionName}' jobs: diff --git a/docs/reference/templatespec/main.bicep b/docs/templatespec/main.bicep similarity index 100% rename from docs/reference/templatespec/main.bicep rename to docs/templatespec/main.bicep diff --git a/docs/reference/templatespec/main.json b/docs/templatespec/main.json similarity index 100% rename from docs/reference/templatespec/main.json rename to docs/templatespec/main.json diff --git a/docs/templatespec/params.dev.json b/docs/templatespec/params.dev.json new file mode 100644 index 0000000..345c393 --- /dev/null +++ b/docs/templatespec/params.dev.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "value": "northeurope" + }, + "environment": { + "value": "dev" + }, + "prefix": { + "value": "int02" + }, + "tags": { + "value": {} + }, + "administratorPassword": { + "value": "" + }, + "synapseDefaultStorageAccountFileSystemId": { + "value": "/subscriptions/2150d511-458f-43b9-8691-6819ba2e6c7b/resourceGroups/dlz01-dev-storage/providers/Microsoft.Storage/storageAccounts/dlz01devencur/blobServices/default/containers/di002" + }, + "streamanalyticsDefaultStorageAccountFileSystemId": { + "value": "/subscriptions/2150d511-458f-43b9-8691-6819ba2e6c7b/resourceGroups/dlz01-dev-storage/providers/Microsoft.Storage/storageAccounts/dlz01devencur/blobServices/default/containers/di002" + }, + "subnetId": { + "value": "/subscriptions/2150d511-458f-43b9-8691-6819ba2e6c7b/resourceGroups/dlz01-dev-network/providers/Microsoft.Network/virtualNetworks/dlz01-dev-vnet/subnets/DataIntegration002Subnet" + }, + "purviewId": { + "value": "/subscriptions/17588eb2-2943-461a-ab3f-00a3ceac3112/resourceGroups/dmz-dev-governance/providers/Microsoft.Purview/accounts/dmz-dev-purview001" + }, + "enableRoleAssignments": { + "value": false + }, + "privateDnsZoneIdKeyVault": { + "value": "/subscriptions/17588eb2-2943-461a-ab3f-00a3ceac3112/resourceGroups/dmz-dev-global-dns/providers/Microsoft.Network/privateDnsZones/privatelink.vaultcore.azure.net" + }, + "privateDnsZoneIdSynapseDev": { + "value": "/subscriptions/17588eb2-2943-461a-ab3f-00a3ceac3112/resourceGroups/dmz-dev-global-dns/providers/Microsoft.Network/privateDnsZones/privatelink.dev.azuresynapse.net" + }, + "privateDnsZoneIdSynapseSql": { + "value": "/subscriptions/17588eb2-2943-461a-ab3f-00a3ceac3112/resourceGroups/dmz-dev-global-dns/providers/Microsoft.Network/privateDnsZones/privatelink.sql.azuresynapse.net" + }, + "privateDnsZoneIdEventhubNamespace": { + "value": "/subscriptions/17588eb2-2943-461a-ab3f-00a3ceac3112/resourceGroups/dmz-dev-global-dns/providers/Microsoft.Network/privateDnsZones/privatelink.servicebus.windows.net" + }, + "privateDnsZoneIdCosmosdbSql": { + "value": "/subscriptions/17588eb2-2943-461a-ab3f-00a3ceac3112/resourceGroups/dmz-dev-global-dns/providers/Microsoft.Network/privateDnsZones/privatelink.documents.azure.com" + }, + "privateDnsZoneIdSqlServer": { + "value": "/subscriptions/17588eb2-2943-461a-ab3f-00a3ceac3112/resourceGroups/dmz-dev-global-dns/providers/Microsoft.Network/privateDnsZones/privatelink.database.windows.net" + }, + "privateDnsZoneIdIothub": { + "value": "/subscriptions/17588eb2-2943-461a-ab3f-00a3ceac3112/resourceGroups/dmz-dev-global-dns/providers/Microsoft.Network/privateDnsZones/privatelink.azure-devices.net" + }, + "templateSpecId": { + "value": "/subscriptions/17588eb2-2943-461a-ab3f-00a3ceac3112/resourceGroups/dmz-dev-automation/providers/Microsoft.Resources/templateSpecs/DataProductStreaming/versions/1.0" + } + } +} \ No newline at end of file From 26db4ec3f11dcf7b07ee650474b574b205313bfc Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Wed, 4 Aug 2021 14:18:28 +0200 Subject: [PATCH 5/5] updated templatespec sample template --- docs/templatespec/main.bicep | 5 ++++- docs/templatespec/main.json | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/templatespec/main.bicep b/docs/templatespec/main.bicep index 3797c99..a170b6f 100644 --- a/docs/templatespec/main.bicep +++ b/docs/templatespec/main.bicep @@ -53,7 +53,8 @@ param privateDnsZoneIdSqlServer string = '' @description('Specifies the resource ID of the private DNS zone for IoT Hub.') param privateDnsZoneIdIothub string = '' -// Template Spec parameters +// Template Spec parameters +@description('Specifies the resource ID of the template spec that should be deployed as baseline.') param templateSpecId string // Variables @@ -132,3 +133,5 @@ resource templatespec 'Microsoft.Resources/deployments@2021-04-01' = { } } } + +// Outputs diff --git a/docs/templatespec/main.json b/docs/templatespec/main.json index 4ff9d08..ba0375f 100644 --- a/docs/templatespec/main.json +++ b/docs/templatespec/main.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.4.451.19169", - "templateHash": "3975856797695362636" + "templateHash": "29774852685941303" } }, "parameters": { @@ -129,7 +129,10 @@ } }, "templateSpecId": { - "type": "string" + "type": "string", + "metadata": { + "description": "Specifies the resource ID of the template spec that should be deployed as baseline." + } } }, "functions": [],