azurerm_management_group_policy_remediation

Manages an Azure Management Group Policy Remediation.

Example Usage

resource "azurerm_management_group" "example" {
  display_name = "Example Management Group"
}

data "azurerm_policy_definition" "example" {
  display_name = "Allowed locations"
}

resource "azurerm_management_group_policy_assignment" "example" {
  name                 = "exampleAssignment"
  management_group_id  = azurerm_management_group.example.id
  policy_definition_id = data.azurerm_policy_definition.example.id
  parameters = jsonencode({
    "listOfAllowedLocations" = {
      "value" = ["East US"]
    }
  })
}

resource "azurerm_management_group_policy_remediation" "example" {
  name                 = "example"
  management_group_id  = azurerm_management_group.example.id
  policy_assignment_id = azurerm_management_group_policy_assignment.example.id
}

Argument Reference

The following arguments are supported:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Policy Remediations can be imported using the resource id, e.g.

terraform import azurerm_management_group_policy_remediation.example /providers/Microsoft.Management/managementGroups/my-mgmt-group-id/providers/Microsoft.PolicyInsights/remediations/remediation1