Skip to content

Adding built-in policies to the initiative doesn't work #93

Answered by gettek
thelumlaa asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @thelumlaa,

Definitions

The Definitions module has the parameter file_path which should simplify some of your code:

module "iam_test" {
  source = "..//modules/definition"
  for_each = {
    for p in fileset(path.module, "../../policies/IdentityAndAccess/*.json") :
    trimsuffix(basename(p), ".json") => pathexpand(p)
  }
  file_path           = each.value
  management_group_id = data.azurerm_management_group.org.id
}

This presumes your json files contain all the appropriate properties such as name, description, metadata etc., if not they can be overridden at run time by adding the values to the module resource above.

Initiatives

In regards to your member_definitons issue, I've not tes…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gettek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants