-
Notifications
You must be signed in to change notification settings - Fork 3k
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
az group export: query/output parameters not supported #5777
Comments
Please update your CLI. This issue was addressed in |
The Issue is still present: azure-cli (2.0.27) acr (2.0.21) Python location '/opt/az/bin/python3' Python (Linux) 3.6.1 (default, Feb 9 2018, 03:55:42) Legal docs and information: aka.ms/AzureCliLegal root@DavidTissen-PC:~# az group export -g int02 |
The issue was fixed in version 2.0.24 of the resource module, not the CLI overall. It would likely be version 2.0.28 or higher of the CLI. I just verified it on a resource group with a VNET gateway. |
You are correct in that the query parameter is not supported--nor is output format. However, the behavior of query (if it were applied) would not return you a template for a storage account. The query would need to look like: It would return you the resource content for storage accounts, which would not be a usable template by itself. Query is basically client-side filtering of the output object. Are you wanting to just export a single resource/type from your resource group? |
Actually my issue is related to the fact that a lease for premium storage cannot be broken. My current approach to snapshot VM's is to snapshot the related blobs. To promote a Snapshot i delete the VM and after promoting the Snapshots i create the VM again. The best approach i found therefor is to export the vm configuration (and all other resources) and then deploy only the VM again - yes I have to delete many things from the exported template. But it seems for me the most secure way to recreate a VM as it was before..... Any better idea? I know i could attach another blob (e.g. snapshoted blob copy as new blob) but in that case i would lose my other snapshots for the blob and the process would be even worse. You are right with the query, shame on me. I just saw the last itemes which were a list, forgot that they are part of resources an there are also parameter and so on... |
Your approach sounds reasonable. Were you able to export the exportable resources with the latest CLI version? |
Yes tried out right now - works! Thank you very much. Issue can be closed. |
For Example: The schema of resource type 'Microsoft.Network/virtualNetworkGateways' is not available.
If i try to export a Template I will allways get this message. But instead of giving me the template without the unknown schema i get nothing. The Problem is: there a many unknown schemas 👎
The Problem get even worese because the query parameter does not work either!
Since the azure portal is able to show me a deployment template the REST seems to be able deliver just a part of the resource group --> The issue must be the azure-cli.
Environment summary
Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build) / CLI version (
az --version
) / OS version / Shell Type (e.g. bash, cmd.exe, Bash on Windows)The text was updated successfully, but these errors were encountered: