Skip to content

Commit b515852

Browse files
authored
Merge pull request #97540 from msHich/master
Policy Docs for Azure managed applications
2 parents 06a5944 + 360af5b commit b515852

File tree

5 files changed

+103
-0
lines changed

5 files changed

+103
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Deploy associations for Azure Custom Provider using policy
3+
description: Learn about deploying associations for a custom provider 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 custom provider using Azure policy
12+
13+
Azure policies can be used to deploy associations to associate resources to a custom provider. 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 custom provider is a built-in policy that can be used to deploy association to associate a resource to a custom provider. The policy accepts three parameters:
18+
19+
- Custom provider Id - This ID is the resource ID of the custom provider 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 custom provider. You can associate multiple resource types to a custom provider 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 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 custom provider needs permissions to the scope of the policy 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 custom provider policy. The policy will then identify non-compliant resources and deploy association for those resources.
33+
34+
![Assign built-in policy](media/builtin-policy/assign-builtin-policy-customprovider.png)
35+
36+
## Getting help
37+
38+
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!
39+
40+
## Next steps
41+
42+
In this article, you learnt about using built-in policy to deploy associations. See these articles to learn more:
43+
44+
- [Concepts: Azure Custom Providers resource onboarding](./concepts-custom-providers-resourceonboarding.md)
45+
- [Tutorial: Resource onboarding with custom providers](./tutorial-custom-providers-resource-onboarding.md)
46+
- [Tutorial: Create custom actions and resources in Azure](./tutorial-custom-providers-101.md)
47+
- [Quickstart: Create a custom resource provider and deploy custom resources](./create-custom-provider.md)
48+
- [How to: Adding custom actions to an Azure REST API](./custom-providers-action-endpoint-how-to.md)
49+
- [How to: Adding custom resources to an Azure REST API](./custom-providers-resources-endpoint-how-to.md)
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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+
![Assign built-in policy](media/builtin-policy/assign-builtin-policy-managedapp.png)
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)
349 KB
Loading
344 KB
Loading

articles/managed-applications/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
href: concepts-custom-role-definition.md
5252
- name: Resource onboarding
5353
href: concepts-custom-providers-resourceonboarding.md
54+
- name: Azure Policy for custom provider associations
55+
href: concepts-custom-providers-built-in-policy.md
56+
- name: Azure Policy for managed application associations
57+
href: concepts-managed-applications-built-in-policy.md
5458
- name: How-to guides
5559
items:
5660
- name: Custom providers

0 commit comments

Comments
 (0)