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

[RDBMS] az postgres flexible-server replica create: Add support for --tags parameter #29920

Merged
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,8 @@
--source-server testserver --zone 3 --location testLocation \\
--vnet newVnet --subnet newSubnet \\
--address-prefixes 172.0.0.0/16 --subnet-prefixes 172.0.0.0/24 \\
--private-dns-zone testDNS.postgres.database.azure.com
--private-dns-zone testDNS.postgres.database.azure.com \\
--tags "key=value"
- name: >
Create a read replica 'testreplicaserver' for 'testserver' with public or private access \
in the specified location if available. Since zone is not passed, it will automatically pick up zone in the \
Expand Down
1 change: 1 addition & 0 deletions src/azure-cli/azure/cli/command_modules/rdbms/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,7 @@ def _flexible_server_params(command_group):
c.argument('storage_gb', arg_type=storage_gb_arg_type)
c.argument('performance_tier', default=None, arg_type=performance_tier_arg_type)
c.argument('yes', arg_type=yes_arg_type)
c.argument('tags', arg_type=tags_type)
if command_group == 'mysql':
c.argument('public_access', options_list=['--public-access'], arg_type=get_enum_type(['Enabled', 'Disabled']),
help='Determines the public access. ')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def flexible_replica_create(cmd, client, resource_group_name, source_server, rep
subnet_address_prefix=None, private_dns_zone_arguments=None, no_wait=False,
byok_identity=None, byok_key=None,
sku_name=None, tier=None,
storage_gb=None, performance_tier=None, yes=False):
storage_gb=None, performance_tier=None, yes=False, tags=None):
validate_resource_group(resource_group_name)
replica_name = replica_name.lower()

Expand Down Expand Up @@ -554,6 +554,7 @@ def flexible_replica_create(cmd, client, resource_group_name, source_server, rep
pg_byok_validator(byok_identity, byok_key)

parameters = postgresql_flexibleservers.models.Server(
tags=tags,
source_server_resource_id=source_server_id,
location=location,
availability_zone=zone,
Expand Down