Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Updated pre-commit-terraform with README
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbabenko committed Feb 22, 2020
1 parent dc905da commit f4492a5
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 72 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.20.0
rev: v1.26.0
hooks:
- id: terraform_fmt
- id: terraform_docs
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
rev: v2.5.0
hooks:
- id: check-merge-conflict
107 changes: 58 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,58 +114,67 @@ If all provided subnets are public (no NAT gateway) then `ecs_service_assign_pub
* [GitLab repository webhook for Atlantis](https://github.com/terraform-aws-modules/terraform-aws-atlantis/tree/master/examples/gitlab-repository-webhook)

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Providers

| Name | Version |
|------|---------|
| aws | n/a |
| random | n/a |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| acm\_certificate\_domain\_name | Route53 domain name to use for ACM certificate. Route53 zone for this domain should be created in advance. Specify if it is different from value in `route53_zone_name` | string | `""` | no |
| alb\_ingress\_cidr\_blocks | List of IPv4 CIDR ranges to use on all ingress rules of the ALB. | list(string) | `[ "0.0.0.0/0" ]` | no |
| alb\_log\_bucket\_name | S3 bucket (externally created) for storing load balancer access logs. Required if alb_logging_enabled is true. | string | `""` | no |
| alb\_log\_location\_prefix | S3 prefix within the log_bucket_name under which logs are stored. | string | `""` | no |
| alb\_logging\_enabled | Controls if the ALB will log requests to S3. | bool | `"false"` | no |
| allow\_repo\_config | When true allows the use of atlantis.yaml config files within the source repos. | string | `"false"` | no |
| atlantis\_allowed\_repo\_names | Github repositories where webhook should be created | list(string) | `[]` | no |
| atlantis\_bitbucket\_user | Bitbucket username that is running the Atlantis command | string | `""` | no |
| atlantis\_bitbucket\_user\_token | Bitbucket token of the user that is running the Atlantis command | string | `""` | no |
| atlantis\_bitbucket\_user\_token\_ssm\_parameter\_name | Name of SSM parameter to keep atlantis_bitbucket_user_token | string | `"/atlantis/bitbucket/user/token"` | no |
| atlantis\_github\_user | GitHub username that is running the Atlantis command | string | `""` | no |
| atlantis\_github\_user\_token | GitHub token of the user that is running the Atlantis command | string | `""` | no |
| atlantis\_github\_user\_token\_ssm\_parameter\_name | Name of SSM parameter to keep atlantis_github_user_token | string | `"/atlantis/github/user/token"` | no |
| atlantis\_gitlab\_hostname | Gitlab server hostname, defaults to gitlab.com | string | `"gitlab.com"` | no |
| atlantis\_gitlab\_user | Gitlab username that is running the Atlantis command | string | `""` | no |
| atlantis\_gitlab\_user\_token | Gitlab token of the user that is running the Atlantis command | string | `""` | no |
| atlantis\_gitlab\_user\_token\_ssm\_parameter\_name | Name of SSM parameter to keep atlantis_gitlab_user_token | string | `"/atlantis/gitlab/user/token"` | no |
| atlantis\_image | Docker image to run Atlantis with. If not specified, official Atlantis image will be used | string | `""` | no |
| atlantis\_port | Local port Atlantis should be running on. Default value is most likely fine. | number | `"4141"` | no |
| atlantis\_repo\_whitelist | List of allowed repositories Atlantis can be used with | list(string) | n/a | yes |
| atlantis\_version | Verion of Atlantis to run. If not specified latest will be used | string | `"latest"` | no |
| azs | A list of availability zones in the region | list(string) | `[]` | no |
| certificate\_arn | ARN of certificate issued by AWS ACM. If empty, a new ACM certificate will be created and validated using Route53 DNS | string | `""` | no |
| cidr | The CIDR block for the VPC which will be created if `vpc_id` is not specified | string | `""` | no |
| cloudwatch\_log\_retention\_in\_days | Retention period of Atlantis CloudWatch logs | number | `"7"` | no |
| container\_memory\_reservation | The amount of memory (in MiB) to reserve for the container | number | `"128"` | no |
| create\_route53\_record | Whether to create Route53 record for Atlantis | bool | `"true"` | no |
| custom\_container\_definitions | A list of valid container definitions provided as a single valid JSON document. By default, the standard container definition is used. | string | `""` | no |
| custom\_environment\_secrets | List of additional secrets the container will use (list should contain maps with `name` and `valueFrom`) | list(map(string)) | `[]` | no |
| custom\_environment\_variables | List of additional environment variables the container will use (list should contain maps with `name` and `value`) | list(map(string)) | `[]` | no |
| ecs\_service\_assign\_public\_ip | Should be true, if ECS service is using public subnets (more info: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_cannot_pull_image.html) | bool | `"false"` | no |
| ecs\_service\_deployment\_maximum\_percent | The upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment | number | `"200"` | no |
| ecs\_service\_deployment\_minimum\_healthy\_percent | The lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment | number | `"50"` | no |
| ecs\_service\_desired\_count | The number of instances of the task definition to place and keep running | number | `"1"` | no |
| ecs\_task\_cpu | The number of cpu units used by the task | number | `"256"` | no |
| ecs\_task\_memory | The amount (in MiB) of memory used by the task | number | `"512"` | no |
| name | Name to use on all resources created (VPC, ALB, etc) | string | `"atlantis"` | no |
| policies\_arn | A list of the ARN of the policies you want to apply | list(string) | `[ "arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy" ]` | no |
| private\_subnet\_ids | A list of IDs of existing private subnets inside the VPC | list(string) | `[]` | no |
| private\_subnets | A list of private subnets inside the VPC | list(string) | `[]` | no |
| public\_subnet\_ids | A list of IDs of existing public subnets inside the VPC | list(string) | `[]` | no |
| public\_subnets | A list of public subnets inside the VPC | list(string) | `[]` | no |
| route53\_zone\_name | Route53 zone name to create ACM certificate in and main A-record, without trailing dot | string | `""` | no |
| security\_group\_ids | List of one or more security groups to be added to the load balancer | list(string) | `[]` | no |
| ssm\_kms\_key\_arn | ARN of KMS key to use for entryption and decryption of SSM Parameters. Required only if your key uses a custom KMS key and not the default key | string | `""` | no |
| tags | A map of tags to use on all resources | map(string) | `{}` | no |
| vpc\_id | ID of an existing VPC where resources will be created | string | `""` | no |
| webhook\_ssm\_parameter\_name | Name of SSM parameter to keep webhook secret | string | `"/atlantis/webhook/secret"` | no |
|------|-------------|------|---------|:-----:|
| acm\_certificate\_domain\_name | Route53 domain name to use for ACM certificate. Route53 zone for this domain should be created in advance. Specify if it is different from value in `route53_zone_name` | `string` | `""` | no |
| alb\_ingress\_cidr\_blocks | List of IPv4 CIDR ranges to use on all ingress rules of the ALB. | `list(string)` | <pre>[<br> "0.0.0.0/0"<br>]</pre> | no |
| alb\_log\_bucket\_name | S3 bucket (externally created) for storing load balancer access logs. Required if alb\_logging\_enabled is true. | `string` | `""` | no |
| alb\_log\_location\_prefix | S3 prefix within the log\_bucket\_name under which logs are stored. | `string` | `""` | no |
| alb\_logging\_enabled | Controls if the ALB will log requests to S3. | `bool` | `false` | no |
| allow\_repo\_config | When true allows the use of atlantis.yaml config files within the source repos. | `string` | `"false"` | no |
| atlantis\_allowed\_repo\_names | Github repositories where webhook should be created | `list(string)` | `[]` | no |
| atlantis\_bitbucket\_base\_url | Base URL of Bitbucket Server, use for Bitbucket on prem (Stash) | `string` | `""` | no |
| atlantis\_bitbucket\_user | Bitbucket username that is running the Atlantis command | `string` | `""` | no |
| atlantis\_bitbucket\_user\_token | Bitbucket token of the user that is running the Atlantis command | `string` | `""` | no |
| atlantis\_bitbucket\_user\_token\_ssm\_parameter\_name | Name of SSM parameter to keep atlantis\_bitbucket\_user\_token | `string` | `"/atlantis/bitbucket/user/token"` | no |
| atlantis\_github\_user | GitHub username that is running the Atlantis command | `string` | `""` | no |
| atlantis\_github\_user\_token | GitHub token of the user that is running the Atlantis command | `string` | `""` | no |
| atlantis\_github\_user\_token\_ssm\_parameter\_name | Name of SSM parameter to keep atlantis\_github\_user\_token | `string` | `"/atlantis/github/user/token"` | no |
| atlantis\_gitlab\_hostname | Gitlab server hostname, defaults to gitlab.com | `string` | `"gitlab.com"` | no |
| atlantis\_gitlab\_user | Gitlab username that is running the Atlantis command | `string` | `""` | no |
| atlantis\_gitlab\_user\_token | Gitlab token of the user that is running the Atlantis command | `string` | `""` | no |
| atlantis\_gitlab\_user\_token\_ssm\_parameter\_name | Name of SSM parameter to keep atlantis\_gitlab\_user\_token | `string` | `"/atlantis/gitlab/user/token"` | no |
| atlantis\_image | Docker image to run Atlantis with. If not specified, official Atlantis image will be used | `string` | `""` | no |
| atlantis\_port | Local port Atlantis should be running on. Default value is most likely fine. | `number` | `4141` | no |
| atlantis\_repo\_whitelist | List of allowed repositories Atlantis can be used with | `list(string)` | n/a | yes |
| atlantis\_version | Verion of Atlantis to run. If not specified latest will be used | `string` | `"latest"` | no |
| aws\_ssm\_path | AWS ARN prefix for SSM (public AWS region or Govcloud). Valid options: aws, aws-us-gov. | `string` | `"aws"` | no |
| azs | A list of availability zones in the region | `list(string)` | `[]` | no |
| certificate\_arn | ARN of certificate issued by AWS ACM. If empty, a new ACM certificate will be created and validated using Route53 DNS | `string` | `""` | no |
| cidr | The CIDR block for the VPC which will be created if `vpc_id` is not specified | `string` | `""` | no |
| cloudwatch\_log\_retention\_in\_days | Retention period of Atlantis CloudWatch logs | `number` | `7` | no |
| container\_memory\_reservation | The amount of memory (in MiB) to reserve for the container | `number` | `128` | no |
| create\_route53\_record | Whether to create Route53 record for Atlantis | `bool` | `true` | no |
| custom\_container\_definitions | A list of valid container definitions provided as a single valid JSON document. By default, the standard container definition is used. | `string` | `""` | no |
| custom\_environment\_secrets | List of additional secrets the container will use (list should contain maps with `name` and `valueFrom`) | `list(map(string))` | `[]` | no |
| custom\_environment\_variables | List of additional environment variables the container will use (list should contain maps with `name` and `value`) | `list(map(string))` | `[]` | no |
| ecs\_service\_assign\_public\_ip | Should be true, if ECS service is using public subnets (more info: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_cannot_pull_image.html) | `bool` | `false` | no |
| ecs\_service\_deployment\_maximum\_percent | The upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment | `number` | `200` | no |
| ecs\_service\_deployment\_minimum\_healthy\_percent | The lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment | `number` | `50` | no |
| ecs\_service\_desired\_count | The number of instances of the task definition to place and keep running | `number` | `1` | no |
| ecs\_task\_cpu | The number of cpu units used by the task | `number` | `256` | no |
| ecs\_task\_memory | The amount (in MiB) of memory used by the task | `number` | `512` | no |
| name | Name to use on all resources created (VPC, ALB, etc) | `string` | `"atlantis"` | no |
| policies\_arn | A list of the ARN of the policies you want to apply | `list(string)` | <pre>[<br> "arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy"<br>]</pre> | no |
| private\_subnet\_ids | A list of IDs of existing private subnets inside the VPC | `list(string)` | `[]` | no |
| private\_subnets | A list of private subnets inside the VPC | `list(string)` | `[]` | no |
| public\_subnet\_ids | A list of IDs of existing public subnets inside the VPC | `list(string)` | `[]` | no |
| public\_subnets | A list of public subnets inside the VPC | `list(string)` | `[]` | no |
| route53\_zone\_name | Route53 zone name to create ACM certificate in and main A-record, without trailing dot | `string` | `""` | no |
| security\_group\_ids | List of one or more security groups to be added to the load balancer | `list(string)` | `[]` | no |
| ssm\_kms\_key\_arn | ARN of KMS key to use for entryption and decryption of SSM Parameters. Required only if your key uses a custom KMS key and not the default key | `string` | `""` | no |
| tags | A map of tags to use on all resources | `map(string)` | `{}` | no |
| vpc\_id | ID of an existing VPC where resources will be created | `string` | `""` | no |
| webhook\_ssm\_parameter\_name | Name of SSM parameter to keep webhook secret | `string` | `"/atlantis/webhook/secret"` | no |

## Outputs

Expand Down
12 changes: 9 additions & 3 deletions examples/github-repository-webhook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,18 @@ $ terraform apply
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Providers

| Name | Version |
|------|---------|
| terraform | n/a |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| github\_organization | Github organization | string | n/a | yes |
| github\_token | Github token | string | n/a | yes |
|------|-------------|------|---------|:-----:|
| github\_organization | Github organization | `string` | n/a | yes |
| github\_token | Github token | `string` | n/a | yes |

## Outputs

Expand Down
12 changes: 9 additions & 3 deletions examples/gitlab-repository-webhook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ $ terraform apply
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Providers

| Name | Version |
|------|---------|
| terraform | n/a |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| gitlab\_base\_url | Gitlab base_url | string | `""` | no |
| gitlab\_token | Gitlab token | string | n/a | yes |
|------|-------------|------|---------|:-----:|
| gitlab\_base\_url | Gitlab base\_url | `string` | `""` | no |
| gitlab\_token | Gitlab token | `string` | n/a | yes |

## Outputs

Expand Down
20 changes: 13 additions & 7 deletions modules/github-repository-webhook/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# Github repository webhook for Atlantis

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Providers

| Name | Version |
|------|---------|
| github | n/a |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| atlantis\_allowed\_repo\_names | List of names of repositories which belong to the organization specified in `github_organization` | list(string) | n/a | yes |
| create\_github\_repository\_webhook | Whether to create Github repository webhook for Atlantis | bool | `"true"` | no |
| github\_organization | Github organization to use when creating webhook | string | `""` | no |
| github\_token | Github token to use when creating webhook | string | `""` | no |
| webhook\_secret | Webhook secret | string | `""` | no |
| webhook\_url | Webhook URL | string | `""` | no |
|------|-------------|------|---------|:-----:|
| atlantis\_allowed\_repo\_names | List of names of repositories which belong to the organization specified in `github_organization` | `list(string)` | n/a | yes |
| create\_github\_repository\_webhook | Whether to create Github repository webhook for Atlantis | `bool` | `true` | no |
| github\_organization | Github organization to use when creating webhook | `string` | `""` | no |
| github\_token | Github token to use when creating webhook | `string` | `""` | no |
| webhook\_secret | Webhook secret | `string` | `""` | no |
| webhook\_url | Webhook URL | `string` | `""` | no |

## Outputs

Expand Down
22 changes: 14 additions & 8 deletions modules/gitlab-repository-webhook/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
# Gitlab repository webhook for Atlantis

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Providers

| Name | Version |
|------|---------|
| gitlab | n/a |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| atlantis\_allowed\_repo\_names | List of names of repositories which belong to the organization specified in `gitlab_organization` | list(string) | n/a | yes |
| create\_gitlab\_repository\_webhook | Whether to create Gitlab repository webhook for Atlantis | bool | `"true"` | no |
| gitlab\_base\_url | Gitlab base_url use | string | `""` | no |
| gitlab\_organization | Gitlab organization to use when creating webhook | string | `""` | no |
| gitlab\_token | Gitlab token to use when creating webhook | string | `""` | no |
| webhook\_secret | Webhook secret | string | `""` | no |
| webhook\_url | Webhook URL | string | `""` | no |
|------|-------------|------|---------|:-----:|
| atlantis\_allowed\_repo\_names | List of names of repositories which belong to the organization specified in `gitlab_organization` | `list(string)` | n/a | yes |
| create\_gitlab\_repository\_webhook | Whether to create Gitlab repository webhook for Atlantis | `bool` | `true` | no |
| gitlab\_base\_url | Gitlab base\_url use | `string` | `""` | no |
| gitlab\_organization | Gitlab organization to use when creating webhook | `string` | `""` | no |
| gitlab\_token | Gitlab token to use when creating webhook | `string` | `""` | no |
| webhook\_secret | Webhook secret | `string` | `""` | no |
| webhook\_url | Webhook URL | `string` | `""` | no |

## Outputs

Expand Down

0 comments on commit f4492a5

Please sign in to comment.