Skip to content

Commit 2b73556

Browse files
authored
[RDBMS] az postgres flexible-server create: BUG FIX, Set public access network to disabled if None argument is passed in (#31349)
* add to ignore * Fix bug when updating cmk geo * Revert "add to ignore" This reverts commit ee1192c. * Updates to not create password if pasword is disabled * Revert "Updates to not create password if pasword is disabled" This reverts commit 3b1d20b. * Check for None arg value and set public access to disabled
1 parent c6997c6 commit 2b73556

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_postgres.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,10 @@ def flexible_server_provision_network_resource(cmd, resource_group_name, server_
11961196
raise RequiredArgumentMissingError("Private DNS zone can only be used with private access setting. Use vnet or/and subnet parameters.")
11971197
else:
11981198
start_ip, end_ip = prepare_public_network(public_access, yes=yes)
1199-
network.public_network_access = public_access if str(public_access).lower() in ['disabled', 'enabled'] else 'Enabled'
1199+
if public_access is not None and str(public_access).lower() in ['disabled', 'none']:
1200+
network.public_network_access = 'Disabled'
1201+
else:
1202+
network.public_network_access = 'Enabled'
12001203

12011204
return network, start_ip, end_ip
12021205

0 commit comments

Comments
 (0)