Skip to content

Commit 0fa3f25

Browse files
Add permissions_boundary as a variable (#23)
* Add permissions_boundary as a variable Signed-off-by: Manuel Morejon <[email protected]> * Auto Format Co-authored-by: cloudpossebot <[email protected]>
1 parent d5b523d commit 0fa3f25

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Available targets:
140140

141141
| Name | Source | Version |
142142
|------|--------|---------|
143-
| <a name="module_role"></a> [role](#module\_role) | cloudposse/iam-role/aws | 0.11.0 |
143+
| <a name="module_role"></a> [role](#module\_role) | cloudposse/iam-role/aws | 0.13.0 |
144144
| <a name="module_this"></a> [this](#module\_this) | cloudposse/label/null | 0.24.1 |
145145

146146
## Resources
@@ -169,7 +169,8 @@ Available targets:
169169
| <a name="input_label_value_case"></a> [label\_value\_case](#input\_label\_value\_case) | The letter case of output label values (also used in `tags` and `id`).<br>Possible values: `lower`, `title`, `upper` and `none` (no transformation).<br>Default value: `lower`. | `string` | `null` | no |
170170
| <a name="input_name"></a> [name](#input\_name) | Solution name, e.g. 'app' or 'jenkins' | `string` | `null` | no |
171171
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `null` | no |
172-
| <a name="input_principals"></a> [principals](#input\_principals) | Map of service name as key and a list of ARNs to allow assuming the role as value. (e.g. map(`AWS`, list(`arn:aws:iam:::role/admin`))) | `map` | <pre>{<br> "Service": [<br> "ec2.amazonaws.com"<br> ]<br>}</pre> | no |
172+
| <a name="input_permissions_boundary"></a> [permissions\_boundary](#input\_permissions\_boundary) | ARN of the policy that is used to set the permissions boundary for the role | `string` | `""` | no |
173+
| <a name="input_principals"></a> [principals](#input\_principals) | Map of service name as key and a list of ARNs to allow assuming the role as value. (e.g. map(`AWS`, list(`arn:aws:iam:::role/admin`))) | `map(any)` | <pre>{<br> "Service": [<br> "ec2.amazonaws.com"<br> ]<br>}</pre> | no |
173174
| <a name="input_regex_replace_chars"></a> [regex\_replace\_chars](#input\_regex\_replace\_chars) | Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`.<br>If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
174175
| <a name="input_retention_in_days"></a> [retention\_in\_days](#input\_retention\_in\_days) | Number of days you want to retain log events in the log group | `string` | `"30"` | no |
175176
| <a name="input_stage"></a> [stage](#input\_stage) | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |

docs/terraform.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
| Name | Source | Version |
1818
|------|--------|---------|
19-
| <a name="module_role"></a> [role](#module\_role) | cloudposse/iam-role/aws | 0.11.0 |
19+
| <a name="module_role"></a> [role](#module\_role) | cloudposse/iam-role/aws | 0.13.0 |
2020
| <a name="module_this"></a> [this](#module\_this) | cloudposse/label/null | 0.24.1 |
2121

2222
## Resources
@@ -45,7 +45,8 @@
4545
| <a name="input_label_value_case"></a> [label\_value\_case](#input\_label\_value\_case) | The letter case of output label values (also used in `tags` and `id`).<br>Possible values: `lower`, `title`, `upper` and `none` (no transformation).<br>Default value: `lower`. | `string` | `null` | no |
4646
| <a name="input_name"></a> [name](#input\_name) | Solution name, e.g. 'app' or 'jenkins' | `string` | `null` | no |
4747
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `null` | no |
48-
| <a name="input_principals"></a> [principals](#input\_principals) | Map of service name as key and a list of ARNs to allow assuming the role as value. (e.g. map(`AWS`, list(`arn:aws:iam:::role/admin`))) | `map` | <pre>{<br> "Service": [<br> "ec2.amazonaws.com"<br> ]<br>}</pre> | no |
48+
| <a name="input_permissions_boundary"></a> [permissions\_boundary](#input\_permissions\_boundary) | ARN of the policy that is used to set the permissions boundary for the role | `string` | `""` | no |
49+
| <a name="input_principals"></a> [principals](#input\_principals) | Map of service name as key and a list of ARNs to allow assuming the role as value. (e.g. map(`AWS`, list(`arn:aws:iam:::role/admin`))) | `map(any)` | <pre>{<br> "Service": [<br> "ec2.amazonaws.com"<br> ]<br>}</pre> | no |
4950
| <a name="input_regex_replace_chars"></a> [regex\_replace\_chars](#input\_regex\_replace\_chars) | Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`.<br>If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
5051
| <a name="input_retention_in_days"></a> [retention\_in\_days](#input\_retention\_in\_days) | Number of days you want to retain log events in the log group | `string` | `"30"` | no |
5152
| <a name="input_stage"></a> [stage](#input\_stage) | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |

iam.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module "role" {
22
source = "cloudposse/iam-role/aws"
3-
version = "0.11.0"
3+
version = "0.13.0"
44

55
attributes = compact(concat(module.this.attributes, ["log", "group"]))
66

@@ -13,6 +13,8 @@ module "role" {
1313
data.aws_iam_policy_document.log_agent.json,
1414
]
1515

16+
permissions_boundary = var.permissions_boundary
17+
1618
context = module.this.context
1719
}
1820

variables.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ variable "stream_names" {
1515
}
1616

1717
variable "principals" {
18-
type = map
18+
type = map(any)
1919
description = "Map of service name as key and a list of ARNs to allow assuming the role as value. (e.g. map(`AWS`, list(`arn:aws:iam:::role/admin`)))"
2020

2121
default = {
@@ -32,3 +32,9 @@ variable "additional_permissions" {
3232
type = list(string)
3333
description = "Additional permissions granted to assumed role"
3434
}
35+
36+
variable "permissions_boundary" {
37+
type = string
38+
default = ""
39+
description = "ARN of the policy that is used to set the permissions boundary for the role"
40+
}

0 commit comments

Comments
 (0)