Skip to content

Conversation

@detienne20
Copy link
Contributor

Closed : #16400

Description

Az deployments now supports --query-string to be used with --template-uri for linked template deployments; --query-string is a SAS token for a storage container that contains the main template and linked template(s). Support for the --query-string parameter will facilitate the transition to template specs. Like with template specs linked templates are referenced through the relative path field in template link as illustrated below:

    "templateLink":  {
              "relativePath":"linked_template.json",
               "contentVersion":"1.0.0.0"
     }

Testing Guide

  1. Create storage account container and upload files for deployment.

    az storage account create -n {} -g {} -l {} --sku {} --kind {}
    az storage container create -n {} --account-name {}
    az storage blob upload -c {} -f "{}" -n {} --account-name {}

  2. Generate an SAS token for the entire container (query-string parameter)

    az storage container generate-sas --account-name {} --account-key {} --name {} --permissions dlrw --expiry {}

  3. Generate the url for the main template (template-uri parameter)

    az storage blob url -c {} -n {} --account-name {}

  4. Deploy with --template-uri and --query-string parameter.

    az deployment group create -g {} --template-uri {blob_url} --query-string "{sas_token}"
    az deployment sub create -g {} --template-uri {blob_url} --query-string "{sas_token}"
    az deployment mg validate -g {} --template-uri {blob_url} --query-string "{sas_token}"
    az deployment tenant validate -g {} --template-uri {blob_url} --query-string "{sas_token}"

@yonzhan
Copy link
Collaborator

yonzhan commented Jan 7, 2021

ARM

@yonzhan yonzhan added this to the S181 milestone Jan 7, 2021
@zhoxing-ms zhoxing-ms merged commit c66daef into Azure:dev Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants