| 
1 |  | -# OpenID Connect for AWS and GitHub Actions  | 
 | 1 | +# AWS GitHub Actions OIDC Terraform Module  | 
2 | 2 | 
 
  | 
3 | 3 | [](https://github.com/unfunco/terraform-aws-oidc-github/actions/workflows/ci.yaml)  | 
4 | 4 | [](https://github.com/unfunco/terraform-aws-oidc-github/actions/workflows/security.yaml)  | 
5 | 5 | [](https://opensource.org/licenses/Apache-2.0)  | 
6 | 6 | 
 
  | 
7 |  | -Terraform module to configure GitHub Actions as an IAM OIDC identity provider in  | 
8 |  | -AWS. OpenID Connect allows GitHub Actions workflows to access resources in AWS  | 
9 |  | -without requiring AWS credentials to be stored as long-lived GitHub secrets.  | 
 | 7 | +Terraform module to configure GitHub Actions as an OpenID Connect (OIDC)  | 
 | 8 | +identity provider in AWS, allowing GitHub Actions to obtain short-lived  | 
 | 9 | +credentials by assuming IAM roles directly, and enabling secure authentication  | 
 | 10 | +between GitHub Actions workflows and AWS resources.  | 
10 | 11 | 
 
  | 
11 | 12 | ## 🔨 Getting started  | 
12 | 13 | 
 
  | 
 | 
52 | 53 |       uses: aws-actions/configure-aws-credentials@v4  | 
53 | 54 |       with:  | 
54 | 55 |         aws-region: ${{ env.AWS_REGION }}  | 
55 |  | -        role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/github  | 
 | 56 | +        role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/GitHubActions  | 
56 | 57 |     - run: aws sts get-caller-identity  | 
57 | 58 | ```  | 
58 | 59 | 
  | 
@@ -82,23 +83,23 @@ applied, the JWT will contain an updated `iss` claim.  | 
82 | 83 | 
 
  | 
83 | 84 | ## Inputs  | 
84 | 85 | 
 
  | 
85 |  | -| Name                            | Description                                                                 | Type           | Default    | Required |  | 
86 |  | -| ------------------------------- | --------------------------------------------------------------------------- | -------------- | ---------- | :------: |  | 
87 |  | -| additional_audiences            | List of additional OIDC audiences allowed to assume the role.               | `list(string)` | `null`     |    no    |  | 
88 |  | -| additional_thumbprints          | List of additional thumbprints for the OIDC provider.                       | `list(string)` | `[]`       |    no    |  | 
89 |  | -| attach_read_only_policy         | Flag to enable/disable the attachment of the ReadOnly policy.               | `bool`         | `false`    |    no    |  | 
90 |  | -| create_oidc_provider            | Flag to enable/disable the creation of the GitHub OIDC provider.            | `bool`         | `true`     |    no    |  | 
91 |  | -| dangerously_attach_admin_policy | Flag to enable/disable the attachment of the AdministratorAccess policy.    | `bool`         | `false`    |    no    |  | 
92 |  | -| enterprise_slug                 | Enterprise slug for GitHub Enterprise Cloud customers.                      | `string`       | `""`       |    no    |  | 
93 |  | -| force_detach_policies           | Flag to force detachment of policies attached to the IAM role.              | `bool`         | `false`    |    no    |  | 
94 |  | -| github_repositories             | List of GitHub organization/repository names authorized to assume the role. | `list(string)` | n/a        |   yes    |  | 
95 |  | -| iam_role_inline_policies        | Inline policies map with policy name as key and json as value.              | `map(string)`  | `{}`       |    no    |  | 
96 |  | -| iam_role_name                   | Name of the IAM role to be created. This will be assumable by GitHub.       | `string`       | `"github"` |    no    |  | 
97 |  | -| iam_role_path                   | Path under which to create IAM role.                                        | `string`       | `"/"`      |    no    |  | 
98 |  | -| iam_role_permissions_boundary   | ARN of the permissions boundary to be used by the IAM role.                 | `string`       | `""`       |    no    |  | 
99 |  | -| iam_role_policy_arns            | List of IAM policy ARNs to attach to the IAM role.                          | `list(string)` | `[]`       |    no    |  | 
100 |  | -| max_session_duration            | Maximum session duration in seconds.                                        | `number`       | `3600`     |    no    |  | 
101 |  | -| tags                            | Map of tags to be applied to all resources.                                 | `map(string)`  | `{}`       |    no    |  | 
 | 86 | +| Name                            | Description                                                                   | Type           | Default           | Required |  | 
 | 87 | +| ------------------------------- | ----------------------------------------------------------------------------- | -------------- | ----------------- | :------: |  | 
 | 88 | +| additional_audiences            | List of additional OIDC audiences allowed to assume the role.                 | `list(string)` | `null`            |    no    |  | 
 | 89 | +| additional_thumbprints          | A list of additional thumbprints for the OIDC provider.                       | `list(string)` | `[]`              |    no    |  | 
 | 90 | +| attach_read_only_policy         | Flag to enable/disable the attachment of the ReadOnly policy.                 | `bool`         | `false`           |    no    |  | 
 | 91 | +| create_oidc_provider            | Flag to enable/disable the creation of the GitHub OIDC provider.              | `bool`         | `true`            |    no    |  | 
 | 92 | +| dangerously_attach_admin_policy | Flag to enable/disable the attachment of the AdministratorAccess policy.      | `bool`         | `false`           |    no    |  | 
 | 93 | +| enterprise_slug                 | Enterprise slug for GitHub Enterprise Cloud customers.                        | `string`       | `""`              |    no    |  | 
 | 94 | +| force_detach_policies           | Flag to force detachment of policies attached to the IAM role.                | `bool`         | `false`           |    no    |  | 
 | 95 | +| github_repositories             | A list of GitHub organization/repository names authorized to assume the role. | `list(string)` | n/a               |   yes    |  | 
 | 96 | +| iam_role_inline_policies        | Inline policies map with policy name as key and json as value.                | `map(string)`  | `{}`              |    no    |  | 
 | 97 | +| iam_role_name                   | The name of the IAM role to be created and made assumable by GitHub Actions.  | `string`       | `"GitHubActions"` |    no    |  | 
 | 98 | +| iam_role_path                   | The path under which to create IAM role.                                      | `string`       | `"/"`             |    no    |  | 
 | 99 | +| iam_role_permissions_boundary   | The ARN of the permissions boundary to be used by the IAM role.               | `string`       | `""`              |    no    |  | 
 | 100 | +| iam_role_policy_arns            | A list of IAM policy ARNs to attach to the IAM role.                          | `list(string)` | `[]`              |    no    |  | 
 | 101 | +| max_session_duration            | The maximum session duration in seconds.                                      | `number`       | `3600`            |    no    |  | 
 | 102 | +| tags                            | A map of tags to be applied to all applicable resources.                      | `map(string)`  | `{}`              |    no    |  | 
102 | 103 | 
 
  | 
103 | 104 | ## Outputs  | 
104 | 105 | 
 
  | 
 | 
0 commit comments