Data Source: azurermPolicySetDefinition
Use this data source to access information about an existing Policy Set Definition.
Example Usage
import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermPolicySetDefinitionExample =
new azurerm.dataAzurermPolicySetDefinition.DataAzurermPolicySetDefinition(
this,
"example",
{
display_name: "Policy Set Definition Example",
}
);
new cdktf.TerraformOutput(this, "id", {
value: dataAzurermPolicySetDefinitionExample.id,
});
Argument Reference
-
name
- Specifies the name of the Policy Set Definition. Conflicts withdisplayName
. -
displayName
- Specifies the display name of the Policy Set Definition. Conflicts withname
.
NOTE As displayName
is not unique errors may occur when there are multiple policy set definitions with same display name.
managementGroupName
- (Optional) Only retrieve Policy Set Definitions from this Management Group.
Attributes Reference
-
id
- The ID of the Policy Set Definition. -
description
- The Description of the Policy Set Definition. -
policyType
- The Type of the Policy Set Definition. -
policyDefinitions
- The policy definitions contained within the policy set definition. -
policyDefinitionReference
- One or morepolicyDefinitionReference
blocks as defined below. -
policyDefinitionGroup
- One or morepolicyDefinitionGroup
blocks as defined below. -
parameters
- Any Parameters defined in the Policy Set Definition. -
metadata
- Any Metadata defined in the Policy Set Definition.
An policyDefinitionReference
block exports the following:
-
policyDefinitionId
- The ID of the policy definition or policy set definition that is included in this policy set definition. -
parameters
- The mapping of the parameter values for the referenced policy rule. The keys are the parameter names.
-> NOTE: Since Terraform's concept of a map requires all of the elements to be of the same type, the value in parameters will all be converted to string type.
\~> Note: This field only supports String fields and is deprecated in favour of the parametersValues
field
-
parameterValues
- The parameter values for the referenced policy rule. This field is a JSON object. -
referenceId
- The unique ID within this policy set definition for this policy definition reference. -
policyGroupNames
- The list of names of the policy definition groups that this policy definition reference belongs to.
An policyDefinitionGroup
block exports the following:
-
name
- The name of this policy definition group. -
displayName
- The display name of this policy definition group. -
category
- The category of this policy definition group. -
description
- The description of this policy definition group. -
additionalMetadataResourceId
- The ID of a resource that contains additional metadata about this policy definition group.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 5 minutes) Used when retrieving the Policy Set Definition.