Giter Site home page Giter Site logo

Policy definitions and Policy assignment tries to deploy multiple time in the same scope about terraform-azurerm-caf-enterprise-scale HOT 3 CLOSED

azure avatar azure commented on July 26, 2024
Policy definitions and Policy assignment tries to deploy multiple time in the same scope

from terraform-azurerm-caf-enterprise-scale.

Comments (3)

VitaliZhur avatar VitaliZhur commented on July 26, 2024

As a workaround, I have removed these policy assignments for the LandingZone:
modules/archetypes/lib/archetype_definitions/archetype_definition_es_landing_zones.tmpl.json
image
After that, I was able to deploy successfully (to greenfield env).
And I see that these policy assignments have been created as well. But they have not been deployed. I checked it in state file.
image

But I still can't find the reason for that...

from terraform-azurerm-caf-enterprise-scale.

J0hn-B avatar J0hn-B commented on July 26, 2024

thank you for your feedback, @VitaliZhur

It looks like you have tried to adjust the configuration in main.tf from within the module.
In this case, deployment failures are expected.

Our suggestion would be to follow the module user guide and examples page for a successful deployment.

This is the minimum default configuration and you can find it here:

# We strongly recommend using the required_providers block to set the
# Azure Provider source and version being used.

terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = ">= 2.46.1"
    }
  }
}

provider "azurerm" {
  features {}
}

# You can use the azurerm_client_config data resource to dynamically
# extract the current Tenant ID from your connection settings.

data "azurerm_client_config" "current" {}

# Call the caf-enterprise-scale module directly from the Terraform Registry
# pinning to the latest version

module "enterprise_scale" {
  source  = "Azure/caf-enterprise-scale/azurerm"
  version = "0.3.0"

  root_parent_id = data.azurerm_client_config.current.tenant_id
  root_id        = "myorg-1"
  root_name      = "My Organization 1"

}

For more information around the module, please check our wiki.

from terraform-azurerm-caf-enterprise-scale.

VitaliZhur avatar VitaliZhur commented on July 26, 2024

Thanks for your answer. I understood my issue, instead of creating a new project with only main.tf to start. I cloned your repo and tried to deploy from there.

from terraform-azurerm-caf-enterprise-scale.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.