Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation issue in 01-resman/teams ? #673

Closed
MichaelHusbyn opened this issue Jun 10, 2022 · 2 comments · Fixed by #674
Closed

Documentation issue in 01-resman/teams ? #673

MichaelHusbyn opened this issue Jun 10, 2022 · 2 comments · Fixed by #674
Assignees

Comments

@MichaelHusbyn
Copy link

Just wondering if there are some small adjustments need to be made on Readme.md and variables.tf.
Just my setup?

Readme Customization example:
team_folders = {
team-a = {
descriptive_name = "Team A"
group_iam = {
"team-a@gcp-pso-italy.net" = [
"roles/viewer"
]
}
impersonation_groups = ["team-a-admins@gcp-pso-italy.net"]
}
}

Adding that directly to variables.tf (instead of the example already present there) will only give you error: An argument named "team_folders" is not expected here.

To follow example already present in variables.tf (commented out) it should be this:
variable "team_folders" {
default = {
team-a = {
descriptive_name = "Team A"
group_iam = {
"team-a-group@example.com" = ["roles/owner", "roles/resourcemanager.projectCreator"]
}
impersonation_groups = ["team-a-admins@example.com"]
}
}
}

(ok, there is different roles). Perhaps the IAM group names should be in sync what is in the example? Not to take away credits to the gcp-pso-italy.net team...

Also just remove the comments in variables.tf for team_folders will give you an error. The "team-a-group@example.com" needs to be in quotes to get it working.

Or is it just my setup that is causing this?

@ludoo
Copy link
Collaborator

ludoo commented Jun 10, 2022

The example in the README is correct, but you need to use it in a .tfvars file. Good catch on the missing quotes in the variables comment, we are going to remove that as it's a leftover from when we were developing that part.

Just put something like this in your terraform.tfvars or 01-resman.auto.tfvars file:

team_folders = {
  test = {
    descriptive_name = "foo@example.org"
    group_iam = {
      "foo@example.org" = ["roles/viewer"]
    }
    impersonation_groups = ["foo@example.org"]
  }
}

@ludoo ludoo self-assigned this Jun 10, 2022
@MichaelHusbyn
Copy link
Author

Thanks for the clarification. Keep up the good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants