File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ Available targets:
183183| monitoring | Launched EC2 instance will have detailed monitoring enabled | bool | ` true ` | no |
184184| name | Name (e.g. ` bastion ` or ` db ` ) | string | - | yes |
185185| namespace | Namespace (e.g. ` cp ` or ` cloudposse ` ) | string | `` | no |
186+ | permissions_boundary_arn | Policy ARN to attach to instance role as a permissions boundary | string | `` | no |
186187| private_ip | Private IP address to associate with the instance in the VPC | string | `` | no |
187188| region | AWS Region the instance is launched in | string | `` | no |
188189| root_iops | Amount of provisioned IOPS. This must be set if root_volume_type is set to ` io1 ` | number | ` 0 ` | no |
Original file line number Diff line number Diff line change 3535| monitoring | Launched EC2 instance will have detailed monitoring enabled | bool | ` true ` | no |
3636| name | Name (e.g. ` bastion ` or ` db ` ) | string | - | yes |
3737| namespace | Namespace (e.g. ` cp ` or ` cloudposse ` ) | string | `` | no |
38+ | permissions_boundary_arn | Policy ARN to attach to instance role as a permissions boundary | string | `` | no |
3839| private_ip | Private IP address to associate with the instance in the VPC | string | `` | no |
3940| region | AWS Region the instance is launched in | string | `` | no |
4041| root_iops | Amount of provisioned IOPS. This must be set if root_volume_type is set to ` io1 ` | number | ` 0 ` | no |
Original file line number Diff line number Diff line change @@ -82,10 +82,11 @@ resource "aws_iam_instance_profile" "default" {
8282}
8383
8484resource "aws_iam_role" "default" {
85- count = local. instance_count
86- name = module. label . id
87- path = " /"
88- assume_role_policy = data. aws_iam_policy_document . default . json
85+ count = local. instance_count
86+ name = module. label . id
87+ path = " /"
88+ assume_role_policy = data. aws_iam_policy_document . default . json
89+ permissions_boundary = var. permissions_boundary_arn
8990}
9091
9192resource "aws_instance" "default" {
Original file line number Diff line number Diff line change @@ -281,3 +281,9 @@ variable "additional_ips_count" {
281281 description = " Count of additional EIPs"
282282 default = 0
283283}
284+
285+ variable "permissions_boundary_arn" {
286+ type = string
287+ description = " Policy ARN to attach to instance role as a permissions boundary"
288+ default = " "
289+ }
You can’t perform that action at this time.
0 commit comments