Skip to content
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

[Compute] Add the hint to suggest users use the standard public IP when creating VM #18662

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/azure-cli/azure/cli/command_modules/vm/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,15 @@ def create_vm(cmd, vm_name, resource_group_name, image=None, size='Standard_DS1_
from azure.cli.command_modules.vm._vm_utils import ArmTemplateBuilder20190401
from msrestazure.tools import resource_id, is_valid_resource_id, parse_resource_id

# In the latest profile, the default public IP will be expected to be changed from Basic to Standard.
# In order to avoid breaking change which has a big impact to users,
# we use the hint to guide users to use Standard public IP to create VM in the first stage.
if public_ip_sku is None and cmd.cli_ctx.cloud.profile == 'latest':
logger.warning(
'It is recommended to use parameter "--public-ip-sku Standard" to create new VM with Standard public IP. '
'Please note that the default public IP used for VM creation will be changed from Basic to Standard '
'in the future.')

subscription_id = get_subscription_id(cmd.cli_ctx)

if os_disk_encryption_set is not None and not is_valid_resource_id(os_disk_encryption_set):
Expand Down