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

main.tf#L7
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
main.tf#L7
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

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

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 - string
  • location optional - string

    The location of the resource.

  • name required - string

    The name of the policy.

  • properties required
      • description optional - string

        The description of the policy.

      • evaluatorType optional - string

        The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).

      • factData optional - string

        The fact data of the policy.

      • factName optional - string

        The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc.

      • status optional - string

        The status of the policy.

      • threshold optional - string

        The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).

  • tags optional - string

    The 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.