Azure Policy - Remediation

resource "azurerm_policy_remediation" "policy_remediation" {
name                 = "baseline-policy-remediation"
scope                = azurerm_policy_assignment.baseline.scope
policy_assignment_id = azurerm_policy_assignment.baseline.id
}

Running this using azurerm ~>2.0 results in the following:

The provider provider.azurerm does not support resource type
"azurerm_policy_remediation".

I can’t find any documentation on how to address the policy remediation aspect of Azure policy. The only documentation I can find lists that it is supported:

Thoughts? I have policies that I need to automate that require a remediation service principal and I can’t seem to get it to work. I don’t see this as being a code issue, it just isn’t supported?

Thanks!

I fixed it. Changed the version of azurerm from 2.0.0 to 2.19.0 and the error went away… Then found that this isn’t really want I needed. Ended up having to have a sub block with:

  identity {
    type = "SystemAssigned"
  }

under the assignment. Also, don’t forget to include location or it will also break.