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

{Network} az network public-ip create: Add hint to use standard sku #22074

Merged
merged 1 commit into from
Apr 18, 2022
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
10 changes: 10 additions & 0 deletions src/azure-cli/azure/cli/command_modules/network/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -6352,6 +6352,16 @@ def create_public_ip(cmd, resource_group_name, public_ip_address_name, location=
allocation_method=None, dns_name=None,
idle_timeout=4, reverse_fqdn=None, version=None, sku=None, tier=None, zone=None, ip_tags=None,
public_ip_prefix=None, edge_zone=None, ip_address=None):

# 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 sku to create public IP.
if sku is None and cmd.cli_ctx.cloud.profile == 'latest':
logger.warning(
'It is recommended to use parameter "--sku Standard" to create new public IP. '
'Please note that the default public IP used for creation will be changed from Basic to Standard '
'in the future.')

IPAllocationMethod, PublicIPAddress, PublicIPAddressDnsSettings, SubResource = cmd.get_models(
'IPAllocationMethod', 'PublicIPAddress', 'PublicIPAddressDnsSettings', 'SubResource')
client = network_client_factory(cmd.cli_ctx).public_ip_addresses
Expand Down