You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[breaking] [feature] aws-iam-instance-profile reuse existing role and remove SSM support (#183)
* Allows passing an existing role to aws-iam-instance-profile, and the module will attach whatever permissions are needed. This allows using roles that are created and managed by other modules (e.g. EKS worker role), but provides ability to attach a standard set of permissions to that role. It will still always create the instance profile, even if the profile will be unused.
* Removes unused permissions from the aws-iam-instance-profile module for using SSM.
| Name | Description | Type | Default | Required |
41
41
|------|-------------|------|---------|:-----:|
42
-
| enable\_ssm | Attach the appropriate policies to allow the instance to integrate with AWS Systems Manager. |`string`|`"true"`| no |
42
+
| create\_role | Creates a role for use with the instance profile. |`bool`|`true`| no |
43
+
| existing\_role\_name | Use existing role with the given name instead of creating a new role. Attaches all standard policies to given role. Only used if create\_role is false. |`string`| n/a | yes |
43
44
| iam\_path | The IAM path to the role. |`string`|`"/"`| no |
44
45
| name\_prefix | Creates a unique name for both the role and instance profile beginning with the specified prefix. Max 32 characters long. |`string`| n/a | yes |
45
46
| role\_description | The description of the IAM role. |`string`|`""`| no |
Copy file name to clipboardexpand all lines: aws-iam-instance-profile/variables.tf
+12-6
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,18 @@ variable "name_prefix" {
3
3
description="Creates a unique name for both the role and instance profile beginning with the specified prefix. Max 32 characters long."
4
4
}
5
5
6
+
variable"existing_role_name" {
7
+
type=string
8
+
description="Use existing role with the given name instead of creating a new role. Attaches all standard policies to given role. Only used if create_role is false."
9
+
default=null
10
+
}
11
+
12
+
variable"create_role" {
13
+
type=bool
14
+
description="Creates a role for use with the instance profile."
15
+
default=true
16
+
}
17
+
6
18
variable"iam_path" {
7
19
type=string
8
20
default="/"
@@ -14,9 +26,3 @@ variable "role_description" {
14
26
description="The description of the IAM role."
15
27
default=""
16
28
}
17
-
18
-
variable"enable_ssm" {
19
-
type=string
20
-
description="Attach the appropriate policies to allow the instance to integrate with AWS Systems Manager."
0 commit comments