Deploy associations for a managed application using Azure Policy
Artikkel
Azure policies can be used to deploy associations to associate resources to a managed application. In this article, we describe a built-in policy that deploys associations and how you can use that policy.
Built-in policy to deploy associations
Deploy associations for a managed application is a built-in policy that associates a resource type to a managed application. The policy deployment doesn't support nested resource types. The policy accepts three parameters:
Managed application ID - This ID is the resource ID of the managed application to which the resources need to be associated.
Resource types to associate - These resource types are the list of resource types to be associated to the managed application. You can associate multiple resource types to a managed application using the same policy.
Association name prefix - This string is the prefix to be added to the name of the association resource being created. The default value is DeployedByPolicy.
The policy uses DeployIfNotExists evaluation. It runs after a Resource Provider handled a create or update resource request of the selected resource type and the evaluation returned a success status code. After that, the association resource is deployed using a template deployment.
For more information on associations, go to Azure Custom Providers resource onboarding
How to use the deploy associations built-in policy
Prerequisites
If the managed application needs permissions to the subscription to perform an action, the policy deployment of association resource wouldn't work without granting the permissions.
Policy assignment
To use the built-in policy, create a policy assignment and assign the deploy associations for a managed application policy. After the policy is assigned successfully, the policy identifies noncompliant resources and deploy associations for those resources.
Getting help
If you have questions or need an answer about Azure Custom Resource Providers development, go to Stack Overflow. Use the tag azure-custom-providers when you post a question.
Next steps
In this article, you learned about using built-in policy to deploy associations. To learn more, review the following articles:
Bygg ende-til-ende-løsninger i Microsoft Azure for å opprette Azure Functions, implementere og administrere nettapper, utvikle løsninger ved hjelp av Azure Storage og mer.
Azure Microsoft.Solutions/applicationDefinitions syntax and properties to use in Azure Resource Manager templates for deploying the resource. API version latest
The Azure Managed Applications security baseline provides procedural guidance and resources for implementing the security recommendations specified in the Microsoft cloud security benchmark.