Terraform v0.12.24
AzureRM 2.7.0
resource "azurerm_policy_assignment" "CIS_1_1" {
name = "CIS_1_1"
policy_definition_id = "/providers/Microsoft.Authorization/policySetDefinitions/1a5bb27d-173f-493e-9568-eb56638dde4d"
scope = local.subscription_id
parameters = <<PARAMETERS
{
"listOfRegionsWhereNetworkWatcherShouldBeEnabled": {
"value": [
"centralus",
"eastus",
"eastus2",
]
}
}
PARAMETERS
}
Policy Set Assignment should be created (this worked fine in 2.5)
This issue was recently fixed for Policy assignments, but the Policy Set Assignment validation is still broken
Error: cannot parse "policy_definition_id" as a Policy Definition ID: unable to parse Policy Definition ID "/providers/Microsoft.Authorization/policySetDefinitions/1a5bb27d-173f-493e-9568-eb56638dde4d"
terraform apply@ArcturusZhang - would it be possible to add the same logic for the policy set defintion?
Hi @jarmbruster74 no problem. I am working on this.
This has been released in version 2.9.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:
provider "azurerm" {
version = "~> 2.9.0"
}
# ... other configuration ...
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
Most helpful comment
@ArcturusZhang - would it be possible to add the same logic for the policy set defintion?