Skip to content

Commit 2d99677

Browse files
committed
Merge branch 'dev' into release
2 parents 6043dca + 5192188 commit 2d99677

54 files changed

Lines changed: 745548 additions & 505101 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/azure-cli/azure/cli/command_modules/appconfig/_help.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
text: az appconfig create -g MyResourceGroup -n MyAppConfiguration -l westus --arm-auth-mode pass-through --enable-arm-private-network-access true
3737
- name: Create an App Configuration store with a key-value revision retention period of one day (in seconds).
3838
text: az appconfig create -g MyResourceGroup -n MyAppConfiguration -l westus --sku Standard --kv-revision-retention-period 86400
39+
- name: Create an App Configuration store linked to an Azure Front Door profile.
40+
text: az appconfig create -g MyResourceGroup -n MyAppConfiguration -l westus --sku Standard --azure-front-door-profile /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCEGROUP>/providers/Microsoft.Cdn/profiles/<PROFILE_NAME>
3941
"""
4042

4143
helps['appconfig list-deleted'] = """
@@ -414,6 +416,10 @@
414416
text: az appconfig update -g MyResourceGroup -n MyAppConfiguration --arm-auth-mode pass-through --enable-arm-private-network-access true
415417
- name: Update an App Configuration store to set a key-value revision retention period of one day (in seconds).
416418
text: az appconfig update -g MyResourceGroup -n MyAppConfiguration --kv-revision-retention-period 86400
419+
- name: Update an App Configuration store to link an Azure Front Door profile.
420+
text: az appconfig update -g MyResourceGroup -n MyAppConfiguration --azure-front-door-profile /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCEGROUP>/providers/Microsoft.Cdn/profiles/<PROFILE_NAME>
421+
- name: Update an App Configuration store to unlink an Azure Front Door profile.
422+
text: az appconfig update -g MyResourceGroup -n MyAppConfiguration --azure-front-door-profile ""
417423
"""
418424

419425
helps['appconfig feature'] = """

src/azure-cli/azure/cli/command_modules/appconfig/_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ def load_arguments(self, _):
190190
c.argument('arm_auth_mode', arg_type=arm_auth_mode_arg_type)
191191
c.argument('enable_arm_private_network_access', arg_type=enable_arm_private_network_access_arg_type)
192192
c.argument('kv_revision_retention_period', arg_type=kv_revision_retention_period_arg_type)
193+
c.argument('azure_front_door_profile', help='Resource ID of an Azure Front Door profile to link to this App Configuration store.', is_preview=True)
193194

194195
with self.argument_context('appconfig update') as c:
195196
c.argument('sku', help='The sku of the App Configuration store', arg_type=get_enum_type(['Free', 'Developer', 'Premium', 'Standard']))
@@ -201,6 +202,7 @@ def load_arguments(self, _):
201202
c.argument('arm_auth_mode', arg_type=arm_auth_mode_arg_type)
202203
c.argument('enable_arm_private_network_access', arg_type=enable_arm_private_network_access_arg_type)
203204
c.argument('kv_revision_retention_period', arg_type=kv_revision_retention_period_arg_type)
205+
c.argument('azure_front_door_profile', help='Resource ID of an Azure Front Door profile to link to this App Configuration store. Pass "" to unlink a Front Door profile.', is_preview=True)
204206

205207
with self.argument_context('appconfig recover') as c:
206208
c.argument('location', arg_type=get_location_type(self.cli_ctx), help='Location of the deleted App Configuration store. Can be viewed using command `az appconfig show-deleted`.')

src/azure-cli/azure/cli/command_modules/appconfig/custom.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
AuthenticationMode,
2525
PublicNetworkAccess,
2626
PrivateLinkDelegation,
27-
DataPlaneProxyProperties)
27+
DataPlaneProxyProperties,
28+
AzureFrontDoorProperties)
2829
from knack.log import get_logger
2930
from ._utils import resolve_store_metadata, resolve_deleted_store_metadata
3031
from ._constants import ARMAuthenticationMode, ProvisioningStatus
@@ -54,7 +55,8 @@ def create_configstore(cmd, # pylint: disable=too-many-locals
5455
no_replica=None, # pylint: disable=unused-argument
5556
arm_auth_mode=None,
5657
enable_arm_private_network_access=None,
57-
kv_revision_retention_period=None):
58+
kv_revision_retention_period=None,
59+
azure_front_door_profile=None):
5860
if assign_identity is not None and not assign_identity:
5961
assign_identity = [SYSTEM_ASSIGNED_IDENTITY]
6062

@@ -70,6 +72,10 @@ def create_configstore(cmd, # pylint: disable=too-many-locals
7072
if arm_auth_mode is not None:
7173
arm_authentication_mode = AuthenticationMode.LOCAL if arm_auth_mode == ARMAuthenticationMode.LOCAL else AuthenticationMode.PASS_THROUGH
7274

75+
azure_front_door = None
76+
if azure_front_door_profile is not None:
77+
azure_front_door = AzureFrontDoorProperties(resource_id=azure_front_door_profile if azure_front_door_profile else None)
78+
7379
configstore_params = ConfigurationStore(location=location.lower(),
7480
identity=__get_resource_identity(assign_identity) if assign_identity else None,
7581
sku=Sku(name=sku),
@@ -82,7 +88,8 @@ def create_configstore(cmd, # pylint: disable=too-many-locals
8288
default_key_value_revision_retention_period_in_seconds=kv_revision_retention_period,
8389
data_plane_proxy=DataPlaneProxyProperties(
8490
authentication_mode=arm_authentication_mode,
85-
private_link_delegation=arm_private_link_delegation))
91+
private_link_delegation=arm_private_link_delegation),
92+
azure_front_door=azure_front_door)
8693

8794
progress = IndeterminateStandardOut()
8895

@@ -183,7 +190,8 @@ def update_configstore(cmd, # pylint: disable=too-many-locals
183190
enable_purge_protection=None,
184191
arm_auth_mode=None,
185192
enable_arm_private_network_access=None,
186-
kv_revision_retention_period=None):
193+
kv_revision_retention_period=None,
194+
azure_front_door_profile=None):
187195
__validate_cmk(encryption_key_name, encryption_key_vault, encryption_key_version, identity_client_id)
188196
if resource_group_name is None:
189197
resource_group_name, _ = resolve_store_metadata(cmd, name)
@@ -200,6 +208,10 @@ def update_configstore(cmd, # pylint: disable=too-many-locals
200208
if arm_auth_mode is not None:
201209
arm_authentication_mode = AuthenticationMode.LOCAL if arm_auth_mode == ARMAuthenticationMode.LOCAL else AuthenticationMode.PASS_THROUGH
202210

211+
azure_front_door = None
212+
if azure_front_door_profile is not None:
213+
azure_front_door = AzureFrontDoorProperties(resource_id=azure_front_door_profile if azure_front_door_profile else None)
214+
203215
update_params = ConfigurationStoreUpdateParameters(tags=tags,
204216
sku=Sku(name=sku) if sku else None,
205217
public_network_access=public_network_access,
@@ -208,7 +220,8 @@ def update_configstore(cmd, # pylint: disable=too-many-locals
208220
default_key_value_revision_retention_period_in_seconds=kv_revision_retention_period,
209221
data_plane_proxy=DataPlaneProxyProperties(
210222
authentication_mode=arm_authentication_mode,
211-
private_link_delegation=arm_private_link_delegation))
223+
private_link_delegation=arm_private_link_delegation),
224+
azure_front_door=azure_front_door)
212225

213226
if encryption_key_name is not None:
214227
key_vault_properties = KeyVaultProperties()

src/azure-cli/azure/cli/command_modules/appconfig/linter_exclusions.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ appconfig create:
66
kv_revision_retention_period:
77
rule_exclusions:
88
- option_length_too_long
9+
azure_front_door_profile:
10+
rule_exclusions:
11+
- option_length_too_long
912
appconfig update:
1013
parameters:
1114
kv_revision_retention_period:
15+
rule_exclusions:
16+
- option_length_too_long
17+
azure_front_door_profile:
1218
rule_exclusions:
1319
- option_length_too_long

0 commit comments

Comments
 (0)