az cdn custom-domain enable-https call is not idempotent
See original GitHub issueIn our deployment script for our CDN I noticed that executing az cdn custom-domain enable-https
will actually re-provision a new certificate and deploy it even though one is already provisioned and deployed.
No big issue for us because I can not see any impact on the existing certificate and the site continues to work normally during the re-provisioning. But it feels unnecessary and I thought all Azure CLI calls where idempotent 😀
We added a check in our script by listing the custom-domains and checking customHttpsProvisioningState
and customHttpsProvisioningSubstate
which eliminated the re-provisioning every time we ran our bash script.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: ed8c61db-b294-77fb-0e92-eae01d07b776
- Version Independent ID: 958b6e8d-609b-2a58-dbe1-240d3fd894bb
- Content: az cdn custom-domain
- Content Source: src/azure-cli/azure/cli/command_modules/cdn/_help.py
- Service: cdn
- GitHub Login: @rloutlaw
- Microsoft Alias: routlaw
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Tutorial: Configure HTTPS on an Azure CDN custom domain
In this tutorial, you learn how to enable and disable HTTPS on your Azure CDN endpoint custom domain.
Read more >azure-cli 2.24.0 - PyPI
After installation, use the az configure command to help setup your environment. $ az configure. For usage and help content, pass in the...
Read more >NetSuite Applications Suite - Oracle Help Center
Overview of SSL Encryption · Types of Secure Domain in NetSuite ... Field Set and Facet Field Performance · Troubleshoot DNS Issues with...
Read more >Package google.spanner.v1
https ://www.googleapis.com/auth/spanner.data ... This field makes each request idempotent such that if the request is received multiple ...
Read more >Showing posts from 2022 - The art of simplicity
Azure Pipelines - Stage must contain at least one job with no ... Let's ask MDN for an explanation: An HTTP method is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As explained earlier in the issue, “az cdn custom-domain enable-https” underlyingly used POST method which is non-idempotent. Adding a check in CLI could not address the issue completely. There stands a chance that the configuration has been changed after the check, it is better solved in service side but that requires much efforts then.
By the way, It seems that idempotency for CLI commands has been discussed a lot and currently no conclusion has been reached regarding to whether a command should be idempotent or not: https://github.com/Azure/azure-cli/issues/7613 https://github.com/Azure/azure-cli/issues/12786
I will close the issue for now and will stay tuned to CLI team’s suggestion for that. If there are more customers asking for that, we might consider to add the implementation.
Unfortunately the CDN service uses a POST for this request and is inherently non-idempotent. We do have plans to fix this in the future, but in the mean time we can add a check to see if the parameters are identical in the CLI command before making the update.