Empty Permissions []
SpyderDave opened this issue · comments
If I do this
module "custom-roles" {
source = "terraform-google-modules/iam/google//modules/custom_role_iam"
base_roles = ["roles/compute.viewer", "roles/bigquery.viewer"]
permissions = []
}
I get an error that the permissions must contain a single value.
I am attempting to just create a role which contains all of the permissions in the base_roles
Can you please provide the full error message / logs?
It's from a slightly different set of code but same error.
╷
│ Error: List shorter than MinItems
│
│ with module.test-combined-roles["th-viewer-with-cloudbuildeditor"].google_organization_iam_custom_role.org-custom-role[0],
│ on .terraform/modules/test-combined-roles/modules/custom_role_iam/main.tf line 51, in resource "google_organization_iam_custom_role" "org-custom-role":
│ 51: permissions = local.permissions
│
│ Attribute supports 1 item minimum, config has 0 declared
╵
╷
│ Error: List shorter than MinItems
│
│ with module.test-combined-roles["th-viewer-with-cloudbuildviewer"].google_organization_iam_custom_role.org-custom-role[0],
│ on .terraform/modules/test-combined-roles/modules/custom_role_iam/main.tf line 51, in resource "google_organization_iam_custom_role" "org-custom-role":
│ 51: permissions = local.permissions
│
│ Attribute supports 1 item minimum, config has 0 declared
╵
╷
│ Error: List shorter than MinItems
│
│ with module.test-combined-roles["th-network-viewer"].google_organization_iam_custom_role.org-custom-role[0],
│ on .terraform/modules/test-combined-roles/modules/custom_role_iam/main.tf line 51, in resource "google_organization_iam_custom_role" "org-custom-role":
│ 51: permissions = local.permissions
│
│ Attribute supports 1 item minimum, config has 0 declared
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days