Skip to content

Conversation

@detienne20
Copy link
Contributor

@detienne20 detienne20 commented Dec 30, 2020

PR is dependent on #16179.

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}"

Dania Etienne added 16 commits December 3, 2020 23:45
@yonzhan yonzhan added this to the S181 milestone Dec 31, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented Dec 31, 2020

ARM

@detienne20 detienne20 marked this pull request as ready for review January 1, 2021 15:01
@detienne20
Copy link
Contributor Author

Created new PR #16447 without extra reviewers/changes.

@detienne20 detienne20 closed this Jan 7, 2021
@detienne20 detienne20 deleted the daetienn/deployments_query_string_support branch January 7, 2021 18:55
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.

3 participants