-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[ARM] Az Deployments : Add support for --query-string #16400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
detienne20
wants to merge
29
commits into
Azure:dev
from
detienne20:daetienn/deployments_query_string_support
Closed
[ARM] Az Deployments : Add support for --query-string #16400
detienne20
wants to merge
29
commits into
Azure:dev
from
detienne20:daetienn/deployments_query_string_support
Conversation
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
…n/deployments_query_string_support
…n/deployments_query_string_support
…n/deployments_query_string_support
…n/deployments_query_string_support
…n/deployments_query_string_support
Collaborator
|
ARM |
…n/deployments_query_string_support
zhoxing-ms
reviewed
Jan 4, 2021
zhoxing-ms
reviewed
Jan 4, 2021
src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py
Show resolved
Hide resolved
Co-authored-by: Xing Zhou <[email protected]>
…n/deployments_query_string_support
…n/deployments_query_string_support
Contributor
Author
|
Created new PR #16447 without extra reviewers/changes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
Testing Guide
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 {}
Generate an SAS token for the entire container (query-string parameter)
az storage container generate-sas --account-name {} --account-key {} --name {} --permissions dlrw --expiry {}
Generate the url for the main template (template-uri parameter)
az storage blob url -c {} -n {} --account-name {}
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}"