Comments (6)
Can you replace the policy definition id in the assignment with the correct one?
from terraform-azurerm-caf-enterprise-scale.
It is as below
"policyDefinitionId": "${root_scope_resource_id}/providers/Microsoft.Authorization/policyDefinitions/Enforce-RG-Tags",
from terraform-azurerm-caf-enterprise-scale.
So replace that with the correct resource id for the definition that you want to apply
from terraform-azurerm-caf-enterprise-scale.
Below is my project setup, I am not sure what exactly the resource id should be that policy assigns to all the custom landing zones ?
actually, it is able to create in all levels of the MGs but it is failing at the root MG , ideally, I don't want to create at root MG level.
Plan: 9 to add, 1 to change, 1 to destroy.
╷
│ Error: reading Policy Definition "Enforce-RG-Tags": policy.DefinitionsClient#GetAtManagementGroup: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="PolicyDefinitionNotFound" Message="The policy definition 'Enforce-RG-Tags' could not be found."
│
│ with module.core.module.alz.data.azurerm_policy_definition.external_lookup["/providers/Microsoft.Management/managementGroups/ROOT/providers/Microsoft.Authorization/policyDefinitions/Enforce-RG-Tags"],
│ on .terraform/modules/core.alz/locals.policy_assignments.tf line 167, in data "azurerm_policy_definition" "external_lookup":
│ 167: data "azurerm_policy_definition" "external_lookup" {
from terraform-azurerm-caf-enterprise-scale.
Hi,
Is there a common parent management group in which you can place the policy definition?
You'll need an archetype that just contains the definition.
Then you'll need another archetype that contains the assignment that references said definition.
from terraform-azurerm-caf-enterprise-scale.
I have refactored everything and post the issue at #998
from terraform-azurerm-caf-enterprise-scale.
Related Issues (20)
- Bug Report: Hierarchy not created if using multi subscriptions with orchestration
- [Documentation]: References to Azure DDoS Standard plan should be changed to Azure DDoS Network Plan HOT 1
- [Feature Request] lifecycle ignore_changes HOT 2
- Redundant/conflicting policy assignments at different scopes, relating to SQL database
- v6.0.0 - 'Deploy-Private-DNS-Zones' policy assignment now contains invalid resource IDs for some private DNS zone IDs HOT 1
- Bug Report: deploy_diagnostics_for_mg generates invalid az_api call HOT 1
- v6.0.0 - introduction of the scm.privatelink.azurewebsites.net private dns zone appears to break DNS lookups for App Service kudu endpoint HOT 3
- Deploy ALZ custom policies when using deploy_core_landing_zones HOT 1
- Change guidance for tainting resources - Upgrade from v3.3.0 to v4.0.0
- Guardrail for Key Vault assignment parameter issue
- How do I exclude certain policies? HOT 11
- feature request: Azure Firewall Configuration does not support Specific Public IP addresses or multiple Public IP addresses HOT 1
- Query : Possible to add multiple subscriptions under connectivity management group? HOT 1
- Terraform Index Error on updgrade CAF 3.3.0 to 4.0.0 HOT 1
- Bug Report: root_name limited to 24 characters, should be 90 HOT 4
- Bug Report upgrading from v5.2.0 to v6.0.0.0 produces ChainedTokenCredential authentication failed Microsoft.Insights/dataCollectionRules HOT 1
- Broken Wiki Links HOT 3
- assumes those subscriptions already exist HOT 2
- All connectivity resources not deploying
- Bug Report - Terraform Cloud fails run after the Terraform provider was updated 8/22/24 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-azurerm-caf-enterprise-scale.