Open Laudenlaruto opened 9 months ago
Thanks for reporting, we will look into this
Hey @Laudenlaruto,
The functionality to override the resource selectors argument of policy assignment cannot be done using archetype_config_overrides
.
If you would like to do this, specifically for your example:
Firstly, please create a new file titled exactly policy_assignment_es_deny_resource_locations.tmpl.json
in your custom lib
folder under policy_assignments
.
Secondly, within this file, copy the contents of the original policy assignment file - located here.
Finally, append the resourceSelectors
argument in properties
like so:
"properties": {
...
"resourceSelectors": [
{
"name": "Allow static web app",
"selectors": [
{
"kind": "resourceType",
"in": [ "Microsoft.Web/staticSites" ]
}
]
}
]
...
},
This should override the existing policy assignment with your custom requirements.
Community Note
Versions
terraform: 1.6.6
azure provider: v3.88.0
module: 5.0.3
Description
When trying to add a
resourceSelector
to an existing policy assignment, terraform does not detect the change.Describe the bug
I added an archetype_config_overrides to override the Deny-Resource-Locations to allow me to deploy static web apps in another region than the on whitelisted.
Additional context
I can update the parameter easily but not the resource selector.