Azure Dev Test Policy
This page shows how to write Terraform and Azure Resource Manager for Dev Test Policy and write them securely.
azurerm_dev_test_policy (Terraform)
The Policy in Dev Test can be configured in Terraform with the resource name azurerm_dev_test_policy. The following sections describe 2 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_dev_test_policy" "this" {
description = var.description
evaluator_type = var.evaluator_type
fact_data = var.fact_data
lab_name = var.lab_name
name = var.name
resource "azurerm_dev_test_policy" "this" {
description = var.description
evaluator_type = var.evaluator_type
fact_data = var.fact_data
lab_name = var.lab_name
name = var.name
Parameters
-
descriptionoptional - string -
evaluator_typerequired - string -
fact_dataoptional - string -
idoptional computed - string -
lab_namerequired - string -
namerequired - string -
policy_set_namerequired - string -
resource_group_namerequired - string -
tagsoptional - map from string to string -
thresholdrequired - string -
timeoutssingle block
Explanation in Terraform Registry
Manages a Policy within a Dev Test Policy Set.
Microsoft.DevTestLab/labs/policysets/policies (Azure Resource Manager)
The labs/policysets/policies in Microsoft.DevTestLab can be configured in Azure Resource Manager with the resource name Microsoft.DevTestLab/labs/policysets/policies. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
apiVersionrequired - stringlocationoptional - stringThe location of the resource.
namerequired - stringThe name of the policy.
propertiesrequireddescriptionoptional - stringThe description of the policy.
evaluatorTypeoptional - stringThe evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).
factDataoptional - stringThe fact data of the policy.
factNameoptional - stringThe fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc.
statusoptional - stringThe status of the policy.
thresholdoptional - stringThe threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).
tagsoptional - stringThe tags of the resource.
typerequired - string
Frequently asked questions
What is Azure Dev Test Policy?
Azure Dev Test Policy is a resource for Dev Test of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Dev Test Policy?
For Terraform, the kevinhead/azurerm and niveklabs/azurerm source code examples are useful. See the Terraform Example section for further details.