Skip to content

Commit

Permalink
feat: set permissions and member field optional in custom-role sub-mo…
Browse files Browse the repository at this point in the history
…dule (#195)
  • Loading branch information
imrannayer authored Aug 24, 2023
1 parent 7ffde99 commit e5da8da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions modules/custom_role_iam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
6 changes: 4 additions & 2 deletions modules/custom_role_iam/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down Expand Up @@ -68,4 +69,5 @@ variable "target_level" {
variable "members" {
description = "List of members to be added to custom role."
type = list(string)
default = []
}

0 comments on commit e5da8da

Please sign in to comment.