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
-
description
optional - string -
evaluator_type
required - string -
fact_data
optional - string -
id
optional computed - string -
lab_name
required - string -
name
required - string -
policy_set_name
required - string -
resource_group_name
required - string -
tags
optional - map from string to string -
threshold
required - string -
timeouts
single 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
apiVersion
required - stringlocation
optional - stringThe location of the resource.
name
required - stringThe name of the policy.
properties
requireddescription
optional - stringThe description of the policy.
evaluatorType
optional - stringThe evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).
factData
optional - stringThe fact data of the policy.
factName
optional - stringThe fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc.
status
optional - stringThe status of the policy.
threshold
optional - stringThe threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).
tags
optional - stringThe tags of the resource.
type
required - 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.