|
1 |
| -# Terraform AWS IAM Role for GitHub Actions |
| 1 | +<!-- BEGIN_TF_DOCS --> |
| 2 | +## Requirements |
2 | 3 |
|
3 |
| -This repository provides a Terraform module to create an IAM role with the necessary permissions and trust policies for GitHub Actions to manage AWS Organizations resources. |
| 4 | +| Name | Version | |
| 5 | +|------|---------| |
| 6 | +| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.8.4 | |
| 7 | +| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.51.0 | |
4 | 8 |
|
5 |
| -## Usage |
| 9 | +## Providers |
6 | 10 |
|
7 |
| -### Module |
| 11 | +| Name | Version | |
| 12 | +|------|---------| |
| 13 | +| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 5.51.0 | |
8 | 14 |
|
9 |
| -```hcl |
10 |
| -module "github_actions_iam_role" { |
11 |
| - source = "github.com/infraspecdev/terraform-aws-github-actions-iam-role?ref=main" |
| 15 | +## Modules |
12 | 16 |
|
13 |
| - aws_account_id = "YOUR_AWS_ACCOUNT_ID" |
14 |
| - github_username = "YOUR_GITHUB_USERNAME" |
15 |
| - repository_names = "YOUR_REPO_NAMES" |
16 |
| - role_name = "GitHubActionsRole" |
17 |
| -} |
18 |
| -``` |
| 17 | +No modules. |
19 | 18 |
|
20 |
| -## Variables |
| 19 | +## Resources |
21 | 20 |
|
22 |
| -- **aws_account_id**: The AWS Account ID where the IAM role will be created. |
23 |
| -- **github_username**: The GitHub username or organization name. |
24 |
| -- **repository_names**: The list of GitHub repository names. |
25 |
| -- **role_name**: (Optional) The name of the IAM role. Default is `GitHubActionsRole`. |
| 21 | +| Name | Type | |
| 22 | +|------|------| |
| 23 | +| [aws_iam_role.github_actions_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource | |
| 24 | +| [aws_iam_role_policy_attachment.attach_admin_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | |
| 25 | +| [aws_iam_policy_document.assume_role_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | |
| 26 | + |
| 27 | +## Inputs |
| 28 | + |
| 29 | +| Name | Description | Type | Default | Required | |
| 30 | +|------|-------------|------|---------|:--------:| |
| 31 | +| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS Account ID | `string` | n/a | yes | |
| 32 | +| <a name="input_github_username"></a> [github\_username](#input\_github\_username) | The name of the GitHub user or organization that owns the repository(ies) the role will use. | `string` | n/a | yes | |
| 33 | +| <a name="input_repository_names"></a> [repository\_names](#input\_repository\_names) | List of names of the GitHub repository that will be allowed to assume the role. | `list(string)` | n/a | yes | |
| 34 | +| <a name="input_role_name"></a> [role\_name](#input\_role\_name) | The name of the IAM Role to be created. | `string` | `"GitHubActionsRole"` | no | |
26 | 35 |
|
27 | 36 | ## Outputs
|
28 | 37 |
|
29 |
| -- **role_arn**: The ARN of the IAM role. |
| 38 | +| Name | Description | |
| 39 | +|------|-------------| |
| 40 | +| <a name="output_role_arn"></a> [role\_arn](#output\_role\_arn) | The ARN of the IAM role | |
| 41 | +<!-- END_TF_DOCS --> |
0 commit comments