diff --git a/modules/custom_role_iam/README.md b/modules/custom_role_iam/README.md index 63052fe7..64e49c9b 100644 --- a/modules/custom_role_iam/README.md +++ b/modules/custom_role_iam/README.md @@ -45,11 +45,11 @@ module "custom-roles" { | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| base\_roles | List of base predefined roles to use to compose custom role. | `list(string)` | `[]` | no | +| base\_roles | List of base predefined roles to use to compose custom role. Either base\_roles or permissions must be set with some values | `list(string)` | `[]` | no | | description | Description of Custom role. | `string` | `""` | no | | excluded\_permissions | List of permissions to exclude from custom role. | `list(string)` | `[]` | no | -| members | List of members to be added to custom role. | `list(string)` | n/a | yes | -| permissions | IAM permissions assigned to Custom Role. | `list(string)` | n/a | yes | +| members | List of members to be added to custom role. | `list(string)` | `[]` | no | +| permissions | IAM permissions assigned to Custom Role. Either base\_roles or permissions must be set with some values | `list(string)` | `[]` | no | | role\_id | ID of the Custom Role. | `string` | n/a | yes | | stage | The current launch stage of the role. Defaults to GA. | `string` | `"GA"` | no | | target\_id | Variable for project or organization ID. | `string` | n/a | yes | diff --git a/modules/custom_role_iam/variables.tf b/modules/custom_role_iam/variables.tf index 1881730d..ef2bb486 100644 --- a/modules/custom_role_iam/variables.tf +++ b/modules/custom_role_iam/variables.tf @@ -27,13 +27,14 @@ variable "title" { variable "base_roles" { type = list(string) - description = "List of base predefined roles to use to compose custom role." + description = "List of base predefined roles to use to compose custom role. Either base_roles or permissions must be set with some values" default = [] } variable "permissions" { type = list(string) - description = "IAM permissions assigned to Custom Role." + description = "IAM permissions assigned to Custom Role. Either base_roles or permissions must be set with some values" + default = [] } variable "excluded_permissions" { @@ -68,4 +69,5 @@ variable "target_level" { variable "members" { description = "List of members to be added to custom role." type = list(string) + default = [] }