|
1 | | -# terraform-aws-github-oidc-provider |
| 1 | +# Github OIDC Provider |
| 2 | + |
| 3 | +This module setups an AWS OIDC Identity prodiver for Github Actions. This will allow you to use OIDC Federation to give your |
| 4 | +Github Actions access to your AWS account. |
| 5 | + |
| 6 | +Main Doc: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services |
| 7 | + |
| 8 | +## Filtering on the `sub` |
| 9 | +Conditions to validate |
| 10 | + |
| 11 | +Doc: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#examples |
| 12 | + |
| 13 | +This controls can help you do things like: |
| 14 | +* Only allow a certain branch |
| 15 | +* Only allow a certain repo/org |
| 16 | + |
| 17 | +## ARN to use in the Github Actions |
| 18 | +This module outputs an `arn` value. This is the `arn` you should use in the Github Actions. |
| 19 | + |
| 20 | +<!-- BEGIN_TF_DOCS --> |
| 21 | +## Requirements |
| 22 | + |
| 23 | +No requirements. |
| 24 | + |
| 25 | +## Providers |
| 26 | + |
| 27 | +| Name | Version | |
| 28 | +|------|---------| |
| 29 | +| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a | |
| 30 | + |
| 31 | +## Modules |
| 32 | + |
| 33 | +| Name | Source | Version | |
| 34 | +|------|--------|---------| |
| 35 | +| <a name="module_iam_assumable_role_admin"></a> [iam\_assumable\_role\_admin](#module\_iam\_assumable\_role\_admin) | terraform-aws-modules/iam/aws//modules/iam-assumable-role-with-oidc | 3.6.0 | |
| 36 | + |
| 37 | +## Resources |
| 38 | + |
| 39 | +| Name | Type | |
| 40 | +|------|------| |
| 41 | +| [aws_iam_openid_connect_provider.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_openid_connect_provider) | resource | |
| 42 | +| [aws_iam_policy.iam_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource | |
| 43 | + |
| 44 | +## Inputs |
| 45 | + |
| 46 | +| Name | Description | Type | Default | Required | |
| 47 | +|------|-------------|------|---------|:--------:| |
| 48 | +| <a name="input_aws_policy_json"></a> [aws\_policy\_json](#input\_aws\_policy\_json) | The AWS policy in a json format | `string` | `"{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Effect\": \"Allow\",\n \"Action\": \"*\",\n \"Resource\": \"*\"\n }\n ]\n}\n"` | no | |
| 49 | +| <a name="input_client_id_list"></a> [client\_id\_list](#input\_client\_id\_list) | n/a | `list` | <pre>[<br> "sts.amazonaws.com"<br>]</pre> | no | |
| 50 | +| <a name="input_name"></a> [name](#input\_name) | The name for the various resources | `string` | `"github_oidc"` | no | |
| 51 | +| <a name="input_tags"></a> [tags](#input\_tags) | Tags | `map(any)` | `{}` | no | |
| 52 | +| <a name="input_thumbprint_list"></a> [thumbprint\_list](#input\_thumbprint\_list) | This is the thumbprint returned if you were to create an "identity provider" in AWS and gave it this url: https://token.actions.githubusercontent.com | `list` | <pre>[<br> "a031c46782e6e6c662c2c87c76da9aa62ccabd8e"<br>]</pre> | no | |
| 53 | +| <a name="input_url"></a> [url](#input\_url) | n/a | `string` | `"https://token.actions.githubusercontent.com"` | no | |
| 54 | +| <a name="input_validate_conditions"></a> [validate\_conditions](#input\_validate\_conditions) | Conditions to validate | `set(string)` | <pre>[<br> "repo:octo-org/octo-repo:ref:refs/heads/octo-branch"<br>]</pre> | no | |
| 55 | + |
| 56 | +## Outputs |
| 57 | + |
| 58 | +| Name | Description | |
| 59 | +|------|-------------| |
| 60 | +| <a name="output_arn"></a> [arn](#output\_arn) | n/a | |
| 61 | +<!-- END_TF_DOCS --> |
0 commit comments