|
| 1 | +# GitHub Deployment Environment |
| 2 | + |
| 3 | +Creates a GitHub deployment environment, and injects provided AWS credentials |
| 4 | +into that new environment's secrets. See GitHub documentation on |
| 5 | +[GitHub deployment environments](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment). |
| 6 | + |
| 7 | +## How to use |
| 8 | + |
| 9 | +```hcl |
| 10 | +module "deployment_env" { |
| 11 | + source = "[email protected]:pleo-io/spa-tools.git//terraform-module/modules/frontend-github-deployment-env?ref=terraform-module-v3.1.1" |
| 12 | +
|
| 13 | + repo_name = "my-repo" |
| 14 | + env_name = "staging" |
| 15 | + access_key_id = aws_iam_access_key.key.id |
| 16 | + access_key_secret = aws_iam_access_key.key.secret |
| 17 | +} |
| 18 | +``` |
| 19 | + |
| 20 | +<!-- BEGIN_TF_DOCS --> |
| 21 | +## Requirements |
| 22 | + |
| 23 | +| Name | Version | |
| 24 | +|------|---------| |
| 25 | +| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.0 | |
| 26 | +| <a name="requirement_github"></a> [github](#requirement\_github) | ~> 5.0 | |
| 27 | + |
| 28 | +## Providers |
| 29 | + |
| 30 | +| Name | Version | |
| 31 | +|------|---------| |
| 32 | +| <a name="provider_github"></a> [github](#provider\_github) | ~> 5.0 | |
| 33 | + |
| 34 | +## Modules |
| 35 | + |
| 36 | +No modules. |
| 37 | + |
| 38 | +## Resources |
| 39 | + |
| 40 | +| Name | Type | |
| 41 | +|------|------| |
| 42 | +| [github_actions_environment_secret.access_key_id](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_environment_secret) | resource | |
| 43 | +| [github_actions_environment_secret.secret_access_key](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_environment_secret) | resource | |
| 44 | +| [github_repository_environment.this](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_environment) | resource | |
| 45 | + |
| 46 | +## Inputs |
| 47 | + |
| 48 | +| Name | Description | Type | Default | Required | |
| 49 | +|------|-------------|------|---------|:--------:| |
| 50 | +| <a name="input_access_key_id"></a> [access\_key\_id](#input\_access\_key\_id) | AWS access key ID | `string` | n/a | yes | |
| 51 | +| <a name="input_access_key_secret"></a> [access\_key\_secret](#input\_access\_key\_secret) | AWS secret access key | `string` | n/a | yes | |
| 52 | +| <a name="input_env_name"></a> [env\_name](#input\_env\_name) | Name of the environment | `string` | n/a | yes | |
| 53 | +| <a name="input_repo_name"></a> [repo\_name](#input\_repo\_name) | Name of the repository to create the environment | `string` | n/a | yes | |
| 54 | +| <a name="input_protected_branches"></a> [protected\_branches](#input\_protected\_branches) | Whether only branches with branch protection rules can deploy to this environment. | `bool` | `false` | no | |
| 55 | +| <a name="input_reviewer_teams"></a> [reviewer\_teams](#input\_reviewer\_teams) | List of up to 6 IDs of teams required to review a deployment to the environment | `list(string)` | `[]` | no | |
| 56 | + |
| 57 | +## Outputs |
| 58 | + |
| 59 | +No outputs. |
| 60 | +<!-- END_TF_DOCS --> |
0 commit comments