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
Copy file name to clipboardExpand all lines: README.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ module "aws_oidc_github" {
35
35
}
36
36
37
37
output "role_arn" {
38
-
value = module.aws_oidc_github.iam_role_arns["deploy-main"]
38
+
value = module.aws_oidc_github.iam_role_arns_map["deploy-main"]
39
39
}
40
40
```
41
41
@@ -103,7 +103,7 @@ jobs:
103
103
- run: aws sts get-caller-identity
104
104
```
105
105
106
-
The `role-to-assume` value is the full ARN of one of the roles this module created — `module.aws_oidc_github.iam_role_arns[<key>]`.
106
+
The `role-to-assume` value is the full ARN of one of the roles this module created — `module.aws_oidc_github.iam_role_arns_map[<role-name>]` (the map key matches the entry name you used in `role_subject-repos_policies`). The older `iam_role_arns` flat-list output is deprecated and will be removed in v2.
| <a name="input_aud_value"></a> [aud\_value](#input\_aud\_value) | Audience claim required in the OIDC token. Defaults to the value the official aws-actions/configure-aws-credentials action sends. | `string` | `"sts.amazonaws.com"` | no |
175
172
| <a name="input_github_tls_url"></a> [github\_tls\_url](#input\_github\_tls\_url) | GitHub OIDC issuer URL. Override only for GitHub Enterprise Server. | `string` | `"https://token.actions.githubusercontent.com"` | no |
176
173
| <a name="input_max_session_duration"></a> [max\_session\_duration](#input\_max\_session\_duration) | Maximum session duration in seconds for every role created. Defaults to 1 hour. Increase up to 43200 (12h) if your workflows need longer sessions. | `number` | `3600` | no |
177
-
| <a name="input_role_subject-repos_policies"></a> [role\_subject-repos\_policies](#input\_role\_subject-repos\_policies) | Map of IAM roles to create. The map key is the role name. Each value defines:<br/> - `subject_repos` : OIDC subject claims allowed to assume this role (e.g. "repo:my-org/my-repo:ref:refs/heads/main").<br/> - `policy_arns` : IAM policy ARNs to attach to the role.<br/> - `role_path` : (optional) IAM path for the role. Defaults to "/".<br/> - `assume_role_names` : (optional) IAM role names in the same account that may also assume this role (useful for local debugging). | <pre>map(object({<br/> role_path = optional(string)<br/> subject_repos = list(string)<br/> policy_arns = list(string)<br/> assume_role_names = optional(list(string))<br/> }))</pre> | n/a | yes |
174
+
| <a name="input_role_subject-repos_policies"></a> [role\_subject-repos\_policies](#input\_role\_subject-repos\_policies) | Map of IAM roles to create. The map key is the role name. Each value defines:<br/> - `subject_repos` : OIDC subject claims allowed to assume this role (e.g. "repo:my-org/my-repo:ref:refs/heads/main").<br/> - `policy_arns` : IAM policy ARNs to attach to the role.<br/> - `role_path` : (optional) IAM path for the role. Defaults to "/".<br/> - `assume_role_names` : (optional) IAM role names in the same account that may also assume this role (useful for local debugging). | <pre>map(object({<br/> role_path = optional(string, "/")<br/> subject_repos = list(string)<br/> policy_arns = list(string)<br/> assume_role_names = optional(list(string))<br/> }))</pre> | n/a | yes |
175
+
| <a name="input_tags"></a> [tags](#input\_tags) | Tags applied to the OIDC provider and every IAM role created by this module. | `map(string)` | `{}` | no |
178
176
179
177
## Outputs
180
178
181
179
| Name | Description |
182
-
|------|-------------|
180
+
|---- | -----------|
183
181
| <a name="output_github_oidc_provider_arn"></a> [github\_oidc\_provider\_arn](#output\_github\_oidc\_provider\_arn) | oidc provider arn to use for roles/policies |
184
182
| <a name="output_github_oidc_provider_url"></a> [github\_oidc\_provider\_url](#output\_github\_oidc\_provider\_url) | oidc provider url to use for roles/policies |
185
-
| <a name="output_iam_role_arns"></a> [iam\_role\_arns](#output\_iam\_role\_arns) | Roles that will be assumed by GitHub Action |
183
+
| <a name="output_iam_role_arns"></a> [iam\_role\_arns](#output\_iam\_role\_arns) | Roles that will be assumed by GitHub Action. (Deprecated: use `iam_role_arns_map` instead; this output will be removed in v2.) |
184
+
| <a name="output_iam_role_arns_map"></a> [iam\_role\_arns\_map](#output\_iam\_role\_arns\_map) | Map of role name to role ARN. Prefer this output; the flat `iam_role_arns` list will be removed in v2. |
|[aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity)| data source |
32
31
|[aws_iam_policy_document.assume_role_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document)| data source |
@@ -35,7 +34,7 @@ No modules.
35
34
## Inputs
36
35
37
36
| Name | Description | Type | Default | Required |
| <aname="input_assume_role_names"></a> [assume\_role\_names](#input\_assume\_role\_names)| IAM role names in the same account that may assume this role via sts:AssumeRole. Useful for local debugging; remove before production. |`list(string)`|`[]`| no |
40
39
| <aname="input_github_oidc_provider_arn"></a> [github\_oidc\_provider\_arn](#input\_github\_oidc\_provider\_arn)| ARN of the GitHub OIDC provider that the IAM role will trust. |`string`| n/a | yes |
41
40
| <aname="input_github_oidc_provider_url"></a> [github\_oidc\_provider\_url](#input\_github\_oidc\_provider\_url)| URL of the GitHub OIDC provider (e.g. https://token.actions.githubusercontent.com).|`string`| n/a | yes |
@@ -44,10 +43,11 @@ No modules.
44
43
| <aname="input_policy_arns"></a> [policy\_arns](#input\_policy\_arns)| IAM policy ARNs to attach to the role (managed or customer-managed policies). |`list(string)`| n/a | yes |
45
44
| <aname="input_role_name"></a> [role\_name](#input\_role\_name)| Name of the IAM role to create. Used verbatim — no prefixing or sanitization is applied. |`string`| n/a | yes |
46
45
| <aname="input_role_path"></a> [role\_path](#input\_role\_path)| IAM path to create the role under. Must start and end with '/' (e.g. '/' or '/github/'). |`string`| n/a | yes |
46
+
| <aname="input_tags"></a> [tags](#input\_tags)| Tags applied to the IAM role created by this submodule. |`map(string)`|`{}`| no |
47
47
48
48
## Outputs
49
49
50
50
| Name | Description |
51
-
|------|-------------|
51
+
|----|-----------|
52
52
| <aname="output_iam_role_arn"></a> [iam\_role\_arn](#output\_iam\_role\_arn)| Role that will be assumed by GitHub Action |
description="Maximum session duration in seconds for every role created. Defaults to 1 hour. Increase up to 43200 (12h) if your workflows need longer sessions."
0 commit comments