You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This breaks the 2nd time you run it - I suspect because the call to az network vnet create does not provide any subnet information and therefore tries to delete the subnets within the VNET - which it cannot do because of the delegation and VNET integration of some webapp. So therefore, my script is not idempotent.
I notice in my work, that a lot of the people I meet prefer using CLI over ARM templates - influenced by the case made here by Pascal where he states that most commands are idempotent. And that checks out in my experience - all the other stuff I do later in the script - storage accounts, function apps, etc. etc. - works fine. It only errors out on this line.
In case you're interested in making the CLI more idempotent - az network vnet create perhaps needs to be revisited. Making the parameters like --subnet-name into an array is probably hard, because then you would have to accept arrays for all the other parameters as well. So maybe accepting JSON for the subnet configuration or something?
The text was updated successfully, but these errors were encountered:
ghost
added
the
needs-triage
This is a new issue that needs to be triaged to the appropriate team.
label
Nov 12, 2020
@haroldrandom What was the result of this? It's kind of important for this command to be idempotent as the current "create" behavior attempts to delete and remake a VNet if it exists, rather than just performing an update like would be expected.
Given the following deployment script:
This breaks the 2nd time you run it - I suspect because the call to
az network vnet create
does not provide any subnet information and therefore tries to delete the subnets within the VNET - which it cannot do because of the delegation and VNET integration of some webapp. So therefore, my script is not idempotent.I notice in my work, that a lot of the people I meet prefer using CLI over ARM templates - influenced by the case made here by Pascal where he states that most commands are idempotent. And that checks out in my experience - all the other stuff I do later in the script - storage accounts, function apps, etc. etc. - works fine. It only errors out on this line.
In case you're interested in making the CLI more idempotent -
az network vnet create
perhaps needs to be revisited. Making the parameters like --subnet-name into an array is probably hard, because then you would have to accept arrays for all the other parameters as well. So maybe accepting JSON for the subnet configuration or something?The text was updated successfully, but these errors were encountered: