question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

az cdn custom-domain enable-https call is not idempotent

See original GitHub issue

In 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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
t-bzhancommented, Feb 8, 2022

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.

1reaction
lsmith130commented, Jul 24, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found