Skip to content

target_id in below module is not accepting the organization id when set as a variable #145

@raghu-babloo

Description

@raghu-babloo
module "custom-roles" {
  source = "terraform-google-modules/iam/google//modules/custom_role_iam"

  target_level         = "org"
  target_id            = "xxxxxxxxxxxxx"
  role_id              = "custom_role_id"
  title                = "Custom Role Unique Title"
  description          = "Custom Role Description"
  base_roles           = ["roles/iam.serviceAccountAdmin"]
  permissions          = ["iam.roles.list", "iam.roles.create", "iam.roles.delete"]
  excluded_permissions = ["iam.serviceAccounts.setIamPolicy"]
  members              = ["user:user01@domain.com", "group:group01@domain.com"]
}

Below is the error logs which is also not accurate as the issue is with target_id is not accepting the organization id when set as a variable.

 Error: Error retrieving permissions: googleapi: Error 400: Request contains an invalid argument.
│
│   with module.security-team-org-role.data.google_iam_testable_permissions.unsupported_permissions,
│   on .terraform/modules/security-team-org-role/modules/custom_role_iam/main.tf line 35, in data "google_iam_testable_permissions" "unsupported_permissions":
│   35: data "google_iam_testable_permissions" "unsupported_permissions" {

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2high priority issuesbugSomething isn't workingtriagedScoped and ready for work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions