|
| 1 | +--- |
| 2 | +title: Deploy associations for Azure Managed Application using policy |
| 3 | +description: Learn about deploying associations for a managed application using Azure Policy service. |
| 4 | +author: msHich |
| 5 | +ms.service: managed-applications |
| 6 | +ms.topic: conceptual |
| 7 | +ms.date: 09/06/2019 |
| 8 | +ms.author: hich |
| 9 | +--- |
| 10 | + |
| 11 | +# Deploy associations for a managed application using Azure Policy |
| 12 | + |
| 13 | +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. |
| 14 | + |
| 15 | +## Built-in policy to deploy associations |
| 16 | + |
| 17 | +Deploy associations for a managed application is a built-in policy that can be used to deploy association to associate a resource to a managed application. The policy accepts three parameters: |
| 18 | + |
| 19 | +- Managed application Id - This ID is the resource ID of the managed application to which the resources need to be associated. |
| 20 | +- 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. |
| 21 | +- 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". |
| 22 | + |
| 23 | +The policy uses DeployIfNotExists evaluation. It runs after a Resource Provider has handled a create or update resource request of the selected resource type(s) and the evaluation has returned a success status code. After that, the association resource gets deployed using a template deployment. |
| 24 | +For more information on associations, see [Azure Custom Providers resource onboarding](./concepts-custom-providers-resourceonboarding.md) |
| 25 | + |
| 26 | +## How to use the deploy associations built-in policy |
| 27 | + |
| 28 | +### Prerequisites |
| 29 | +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. |
| 30 | + |
| 31 | +### Policy assignment |
| 32 | +To use the built-in policy, create a policy assignment and assign the Deploy associations for a managed application policy. Once the policy has been assigned successfully, |
| 33 | +the policy will identify non-compliant resources and deploy association for those resources. |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | +## Getting help |
| 38 | + |
| 39 | +If you have questions about Azure Custom Resource Providers development, try asking them on [Stack Overflow](https://stackoverflow.com/questions/tagged/azure-custom-providers). A similar question might have already been answered, so check first before posting. Add the tag ```azure-custom-providers``` to get a fast response! |
| 40 | + |
| 41 | +## Next steps |
| 42 | + |
| 43 | +In this article, you learnt about using built-in policy to deploy associations. See these articles to learn more: |
| 44 | + |
| 45 | +- [Concepts: Azure Custom Providers resource onboarding](./concepts-custom-providers-resourceonboarding.md) |
| 46 | +- [Tutorial: Resource onboarding with custom providers](./tutorial-custom-providers-resource-onboarding.md) |
| 47 | +- [Tutorial: Create custom actions and resources in Azure](./tutorial-custom-providers-101.md) |
| 48 | +- [Quickstart: Create a custom resource provider and deploy custom resources](./create-custom-provider.md) |
| 49 | +- [How to: Adding custom actions to an Azure REST API](./custom-providers-action-endpoint-how-to.md) |
| 50 | +- [How to: Adding custom resources to an Azure REST API](./custom-providers-resources-endpoint-how-to.md) |
0 commit comments