Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article, you learn how to associate your Azure App Configuration store with a network security perimeter. For more information, see Network security perimeter for Azure App Configuration.
Prerequisites
- An Azure account with an active subscription. Create an account for free.
- An App Configuration store. If you need to create one, see Create an App Configuration store.
- An existing network security perimeter. If you need to create one, see Create a network security perimeter in the Azure portal.
Sign in to Azure
Sign in to Azure using the az login command in the Azure CLI.
az login
This command prompts your web browser to launch and load an Azure sign-in page. If the browser fails to open, use device code flow with az login --use-device-code. For more sign-in options, go to sign in with the Azure CLI.
Associate your App Configuration store with a network security perimeter
Use the Azure CLI to create an association between your App Configuration store and an existing network security perimeter.
Run the following command to get the resource ID of your App Configuration store. Replace
<AppConfigurationStoreName>and<ResourceGroupName>with the name of your store and resource group.az appconfig show --name <AppConfigurationStoreName> --resource-group <ResourceGroupName> --query id --output tsvNote down the resource ID from the output. For example:
/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroupName>/providers/Microsoft.AppConfiguration/configurationStores/<AppConfigurationStoreName>.Run the following command to associate your App Configuration store with the network security perimeter. Replace the placeholder values with your own information.
az network perimeter association create --name <AssociationName> --perimeter-name <NspName> -g <NspResourceGroupName> --access-mode Enforced --private-link-resource "{id:<AppConfigurationResourceId>}" --profile "{id:<NspProfileResourceId>}"Placeholder Description Example <AssociationName>A name for the new association resource. app-config-association<NspName>The name of your network security perimeter. MyNSP<NspResourceGroupName>The resource group of your network security perimeter. MyNSPResourceGroup<AppConfigurationResourceId>The resource ID of your App Configuration store from the previous step. /subscriptions/.../MyAppConfigStore<NspProfileResourceId>The resource ID of the network security perimeter profile to associate with. /subscriptions/.../profiles/defaultProfileTip
The
--access-modeparameter can be set toLearning(called Transition mode in the Azure portal and elsewhere in this documentation) orEnforced. Start in Transition (Learning) mode to validate your access rules before switching toEnforcedmode. For more information, see Transitioning to a network security perimeter.
Note
Allow up to 15 minutes for any changes to network security perimeter configuration to take effect.
If you encounter errors while associating your App Configuration store with a network security perimeter, see Troubleshooting for guidance on resolving common issues.
Verify the association
After associating the App Configuration store with the network security perimeter, you can verify the association by checking the network security perimeter configuration of your App Configuration store.
Run the following command to view the network security perimeter configuration for your App Configuration store.
az appconfig network-security-perimeter-configuration list --name <AppConfigurationStoreName> --resource-group <ResourceGroupName>
Dissociate your App Configuration store from a network security perimeter
Use the Azure CLI to remove an existing association between your App Configuration store and a network security perimeter.
Run the following command to dissociate your App Configuration store from the network security perimeter. Replace the placeholder values with your own information.
az network perimeter association delete --name <AssociationName> --perimeter-name <NspName> --resource-group <NspResourceGroupName>Placeholder Description Example <AssociationName>The name of the association resource to delete. my-association-name<NspName>The name of your network security perimeter. my-nsp<NspResourceGroupName>The resource group of your network security perimeter. my-resource-group