Skip to content

az vm create optional parameter update.#26350

Open
ManishaSinha0410 wants to merge 1 commit intoAzure:devfrom
ManishaSinha0410:patch-1
Open

az vm create optional parameter update.#26350
ManishaSinha0410 wants to merge 1 commit intoAzure:devfrom
ManishaSinha0410:patch-1

Conversation

@ManishaSinha0410
Copy link
Copy Markdown
Contributor

@ManishaSinha0410 ManishaSinha0410 commented May 5, 2023

--public-ip-address
Name of the public IP address when creating one (default) or referencing an existing one. Can also reference an existing public IP by ID or specify "" for None ('""' in Azure CLI using PowerShell or --% operator).

Description
We have tested with different versions of OS and PowerShell core version 7.3.4 to test the public-ip-address parameter behavior and below is our findings when we have to create VM without public IP:

For PowerShell core version 7.2.* & below === --public-ip-address '""'
For PowerShell core version 7.3.4 ===== --public-ip-address ‘’ or --public-ip-address “” ---------------------------------------- Here we just have to use single field i.e., either single inverted comma (‘’) or just double inverted comma (“”).

Since, cloud shell also uses PowerShell core edition so here also we saw the same behavior in past. This not specific to any OS version as such, we just need to do slight modification in command while using PowerShell core version 7.3.4.

Testing Guide

az vm create --name newvm --resource-group testazcli --image Win2022Datacenter --admin-username sinhamanisha --admin-password Manishasinha*10 --subnet /subscriptions/6b26da86-6cfd-4198-afde-fb754b11c54e/resourceGroups/testazcli/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet --location southindia --size Standard_E32s_v3 --public-ip-address ''

OR

az vm create --name newvm --resource-group testazcli --image Win2022Datacenter --admin-username sinhamanisha --admin-password Manishasinha*10 --subnet /subscriptions/6b26da86-6cfd-4198-afde-fb754b11c54e/resourceGroups/testazcli/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet --location southindia --size Standard_E32s_v3 --public-ip-address ""

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

@ghost ghost added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label May 5, 2023
@ghost
Copy link
Copy Markdown

ghost commented May 5, 2023

Thank you for your contribution ManishaSinha0410! We will review the pull request and get back to you soon.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 5, 2023

Thank you for your contribution! We will review the pull request and get back to you soon.

@ghost ghost requested a review from yonzhan May 5, 2023 10:31
@ghost ghost added the Auto-Assign Auto assign by bot label May 5, 2023
@ghost ghost assigned zhoxing-ms May 5, 2023
@ghost ghost added the Compute az vm/vmss/image/disk/snapshot label May 5, 2023
@ManishaSinha0410
Copy link
Copy Markdown
Contributor Author

ManishaSinha0410 commented May 23, 2023

Please let me know if any info is required from my end.

Comment on lines +3819 to +3820
--public-ip-address
Name of the public IP address when creating one (default) or referencing an existing one. Can also reference an existing public IP by ID or specify "" for None ('""' in Azure CLI using PowerShell or --% operator). For Azure CLI using powershell core edition 7.3.4, specify '' or "" (--public-ip-address '' or --public-ip-address "")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. Actually, this is not the correct place to modify the help message for --public-ip-address. Please modify the help message here https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/vm/_params.py#L1056.

ManishaSinha0410 added a commit to ManishaSinha0410/azure-cli that referenced this pull request May 30, 2023
Submitting request here as suggested in below pull request:

Azure#26350 (review)
zhoxing-ms pushed a commit that referenced this pull request Jun 21, 2023
avgale pushed a commit to avgale/azure-cli that referenced this pull request Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-observability-squad Auto-Assign Auto assign by bot Compute az vm/vmss/image/disk/snapshot customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants