You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-5
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,9 @@ See `README.md` in `examples` for Github or Gitlab for complete details.
19
19
20
20
## Terraform versions
21
21
22
-
Terraform 0.12. Pin module version to `~> v2.0`. Submit pull-requests to `master` branch.
22
+
Terraform 0.12 or newer. Pin module version to `~> v2.0`. Submit pull-requests to `master` branch.
23
23
24
-
Terraform 0.11. Pin module version to `~> v1.0`. Submit pull-requests to `terraform011` branch.
24
+
Terraform 0.11. Pin module version to `~> v1.0`.
25
25
26
26
### Before using Atlantis and the code in this repository please make sure that you have read and understood the security implications described in [the official Atlantis documentation](https://www.runatlantis.io/docs/security.html).
27
27
@@ -57,7 +57,7 @@ $ cd terraform-aws-atlantis
57
57
### Run Atlantis as a Terraform module
58
58
59
59
This way allows integration with your existing Terraform configurations.
*[Complete Atlantis with GitHub webhook](https://github.com/terraform-aws-modules/terraform-aws-atlantis/tree/master/examples/github-complete)
160
161
*[GitHub repository webhook for Atlantis](https://github.com/terraform-aws-modules/terraform-aws-atlantis/tree/master/examples/github-repository-webhook)
161
162
*[GitLab repository webhook for Atlantis](https://github.com/terraform-aws-modules/terraform-aws-atlantis/tree/master/examples/gitlab-repository-webhook)
162
163
163
164
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
164
165
## Requirements
165
166
166
-
No requirements.
167
+
| Name | Version |
168
+
|------|---------|
169
+
| terraform | >= 0.12.7, < 0.14 |
170
+
| aws | >= 2.68, < 4.0 |
167
171
168
172
## Providers
169
173
170
174
| Name | Version |
171
175
|------|---------|
172
-
| aws |n/a|
176
+
| aws |>= 2.68, < 4.0|
173
177
| random | n/a |
174
178
175
179
## Inputs
@@ -210,33 +214,49 @@ No requirements.
210
214
| 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 |
211
215
| cidr | The CIDR block for the VPC which will be created if `vpc_id` is not specified |`string`|`""`| no |
212
216
| cloudwatch\_log\_retention\_in\_days | Retention period of Atlantis CloudWatch logs |`number`|`7`| no |
217
+
| command | The command that is passed to the container |`list(string)`|`null`| no |
218
+
| container\_depends\_on | The dependencies defined for container startup and shutdown. A container can contain multiple dependencies. When a dependency is defined for container startup, for container shutdown it is reversed. The condition can be one of START, COMPLETE, SUCCESS or HEALTHY | <pre>list(object({<br> containerName = string<br> condition = string<br> }))</pre> |`null`| no |
213
219
| container\_memory\_reservation | The amount of memory (in MiB) to reserve for the container |`number`|`128`| no |
214
220
| create\_route53\_record | Whether to create Route53 record for Atlantis |`bool`|`true`| no |
215
221
| 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 |
216
222
| custom\_environment\_secrets | List of additional secrets the container will use (list should contain maps with `name` and `valueFrom`) | <pre>list(object(<br> {<br> name = string<br> valueFrom = string<br> }<br> ))</pre> |`[]`| no |
217
223
| custom\_environment\_variables | List of additional environment variables the container will use (list should contain maps with `name` and `value`) | <pre>list(object(<br> {<br> name = string<br> value = string<br> }<br> ))</pre> |`[]`| no |
224
+
| docker\_labels | The configuration options to send to the `docker_labels`|`map(string)`|`null`| no |
225
+
| ecs\_container\_insights | Controls if ECS Cluster has container insights enabled |`bool`|`false`| no |
218
226
| 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 |
219
227
| 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 |
220
228
| 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 |
221
229
| ecs\_service\_desired\_count | The number of instances of the task definition to place and keep running |`number`|`1`| no |
222
230
| ecs\_task\_cpu | The number of cpu units used by the task |`number`|`256`| no |
223
231
| ecs\_task\_memory | The amount (in MiB) of memory used by the task |`number`|`512`| no |
232
+
| entrypoint | The entry point that is passed to the container |`list(string)`|`null`| no |
233
+
| essential | Determines whether all other containers in a task are stopped, if this container fails or stops for any reason. Due to how Terraform type casts booleans in json it is required to double quote this value |`bool`|`true`| no |
234
+
| firelens\_configuration | The FireLens configuration for the container. This is used to specify and configure a log router for container logs. For more details, see https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_FirelensConfiguration.html| <pre>object({<br> type = string<br> options = map(string)<br> })</pre> |`null`| no |
224
235
| github\_webhooks\_cidr\_blocks | List of CIDR blocks used by GitHub webhooks |`list(string)`| <pre>[<br> "140.82.112.0/20",<br> "185.199.108.0/22",<br> "192.30.252.0/22"<br>]</pre> | no |
225
236
| internal | Whether the load balancer is internal or external |`bool`|`false`| no |
237
+
| mount\_points | Container mount points. This is a list of maps, where each map should contain a `containerPath` and `sourceVolume`. The `readOnly` key is optional. |`list`|`[]`| no |
226
238
| name | Name to use on all resources created (VPC, ALB, etc) |`string`|`"atlantis"`| no |
227
239
| 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 |
228
240
| private\_subnet\_ids | A list of IDs of existing private subnets inside the VPC |`list(string)`|`[]`| no |
229
241
| private\_subnets | A list of private subnets inside the VPC |`list(string)`|`[]`| no |
230
242
| public\_subnet\_ids | A list of IDs of existing public subnets inside the VPC |`list(string)`|`[]`| no |
231
243
| public\_subnets | A list of public subnets inside the VPC |`list(string)`|`[]`| no |
244
+
| readonly\_root\_filesystem | Determines whether a container is given read-only access to its root filesystem. Due to how Terraform type casts booleans in json it is required to double quote this value |`bool`|`false`| no |
245
+
| repository\_credentials | Container repository credentials; required when using a private repo. This map currently supports a single key; "credentialsParameter", which should be the ARN of a Secrets Manager's secret holding the credentials |`map(string)`|`null`| no |
232
246
| route53\_record\_name | Name of Route53 record to create ACM certificate in and main A-record. If null is specified, var.name is used instead. Provide empty string to point root domain name to ALB. |`string`|`null`| no |
233
247
| route53\_zone\_name | Route53 zone name to create ACM certificate in and main A-record, without trailing dot |`string`|`""`| no |
234
248
| security\_group\_ids | List of one or more security groups to be added to the load balancer |`list(string)`|`[]`| no |
235
249
| ssm\_kms\_key\_arn | ARN of KMS key to use for encryption and decryption of SSM Parameters. Required only if your key uses a custom KMS key and not the default key |`string`|`""`| no |
250
+
| start\_timeout | Time duration (in seconds) to wait before giving up on resolving dependencies for a container |`number`|`30`| no |
251
+
| stop\_timeout | Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own |`number`|`30`| no |
236
252
| tags | A map of tags to use on all resources |`map(string)`|`{}`| no |
253
+
| ulimits | Container ulimit settings. This is a list of maps, where each map should contain "name", "hardLimit" and "softLimit" | <pre>list(object({<br> name = string<br> hardLimit = number<br> softLimit = number<br> }))</pre> |`null`| no |
254
+
| user | The user to run as inside the container. Can be any of these formats: user, user:group, uid, uid:gid, user:gid, uid:group. The default (null) will use the container's configured `USER` directive or root if not set. |`string`|`null`| no |
255
+
| volumes\_from | A list of VolumesFrom maps which contain "sourceContainer" (name of the container that has the volumes to mount) and "readOnly" (whether the container can write to the volume) | <pre>list(object({<br> sourceContainer = string<br> readOnly = bool<br> }))</pre> |`[]`| no |
237
256
| vpc\_id | ID of an existing VPC where resources will be created |`string`|`""`| no |
238
257
| webhook\_ssm\_parameter\_name | Name of SSM parameter to keep webhook secret |`string`|`"/atlantis/webhook/secret"`| no |
239
258
| whitelist\_unauthenticated\_cidr\_blocks | List of allowed CIDR blocks to bypass authentication |`list(string)`|`[]`| no |
259
+
| working\_directory | The working directory to run commands inside the container |`string`|`null`| no |
240
260
241
261
## Outputs
242
262
@@ -249,7 +269,12 @@ No requirements.
249
269
| atlantis\_url\_events | Webhook events URL of Atlantis |
250
270
| ecs\_security\_group | Security group assigned to ECS Service in network configuration |
251
271
| ecs\_task\_definition | Task definition for ECS service (used for external triggers) |
272
+
| private\_subnet\_ids | IDs of the VPC private subnets that were created or passed in |
273
+
| public\_subnet\_ids | IDs of the VPC public subnets that were created or passed in |
252
274
| task\_role\_arn | The Atlantis ECS task role arn |
275
+
| task\_role\_id | The Atlantis ECS task role id |
276
+
| task\_role\_name | The Atlantis ECS task role name |
277
+
| task\_role\_unique\_id | The stable and unique string identifying the Atlantis ECS task role. |
253
278
| vpc\_id | ID of the VPC that was created or passed in |
Configuration in this directory creates the necessary infrastructure and resources for running Atlantis on Fargate plus GitHub repository webhooks configured to Atlantis URL.
4
+
5
+
An existing Route53 hosted zone and domain is required to deploy this example.
6
+
7
+
GitHub's personal access token can be generated at https://github.com/settings/tokens
8
+
9
+
## Usage
10
+
11
+
To run this code you need to copy `terraform.tfvars.sample` into `terraform.tfvars` and update the values locally or specify them using environment variables (`TF_VAR_github_token=xxx`, `TF_VAR_github_organization=xxx`, etc.). Once ready, execute:
12
+
13
+
```bash
14
+
$ terraform init
15
+
$ terraform plan
16
+
$ terraform apply
17
+
```
18
+
19
+
Note - if you receive the following error when running apply:
20
+
21
+
`Error: InvalidParameterException: The new ARN and resource ID format must be enabled to add tags to the service. Opt in to the new format and try again. "atlantiscomplete"`
22
+
23
+
Go to https://eu-west-1.console.aws.amazon.com/ecs/home?region=eu-west-1#/settings (update for your region of use) and change `Container instance`, `Service`, and `Task` to `Enabled`.
24
+
25
+
⚠️ This example will create resources which cost money. Run `terraform destroy` when you don't need these resources. ⚠️
26
+
27
+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
28
+
## Requirements
29
+
30
+
No requirements.
31
+
32
+
## Providers
33
+
34
+
| Name | Version |
35
+
|------|---------|
36
+
| aws | n/a |
37
+
38
+
## Inputs
39
+
40
+
| Name | Description | Type | Default | Required |
0 commit comments