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
# Terraform Module to setup Atlantis in ECS with self managed EC2 instances
1
+
# Terraform Module to Setup Atlantis in ECS with Self-Managed EC2 Instances
2
2
3
3
This Terraform module automates the deployment of the Atlantis server on an ECS cluster with self-managed EC2 instances. It includes the configuration of an Application Load Balancer (ALB) for traffic routing. The module simplifies the process of setting up and managing Atlantis, enabling automated Terraform pull request workflows.
4
4
5
5
## Prerequisites
6
6
7
-
- Domain with acm certificate attached
7
+
- Domain with ACM certificate attached
8
8
- Application secrets stored in AWS SSM Parameter Store with the following names and descriptions:
9
-
10
-
-`/atlantis/ATLANTIS_GH_USER`: The GitHub username used by Atlantis. Obtain this from your GitHub account settings.
11
9
-`/atlantis/ATLANTIS_GH_TOKEN`: A GitHub personal access token with repo and admin:repo_hook permissions. Generate this from GitHub Developer settings.
12
10
-`/atlantis/ATLANTIS_GH_WEBHOOK_SECRET`: The secret used to validate GitHub webhooks. Create a random secret string for this.
13
11
-`/atlantis/AWS_ACCESS_KEY_ID`: The AWS Access Key ID for an IAM user with necessary permissions. Obtain this from AWS IAM user security credentials.
14
12
-`/atlantis/AWS_SECRET_ACCESS_KEY`: The AWS Secret Access Key for the same IAM user. Obtain this from AWS IAM user security credentials.
13
+
-`/atlantis/ATLANTIS_GOOGLE_CLIENT_ID`: The Client ID for Google OAuth. Obtain this from Google Cloud Console.
14
+
-`/atlantis/ATLANTIS_GOOGLE_CLIENT_SECRET`: The Client Secret for Google OAuth. Obtain this from Google Cloud Console.
15
15
16
+
- Set up the following in the Google Cloud Console for the OAuth consent screen:
17
+
-**Authorized JavaScript origins**:
18
+
- Use the value of `ATLANTIS_URL` from your `locals.tf`, which is defined as:
Copy file name to clipboardExpand all lines: README.md
+36-36Lines changed: 36 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,49 +1,43 @@
1
-
# Terraform Module to setup Atlantis in ECS with self managed EC2 instances
1
+
# Terraform Module to Setup Atlantis in ECS with Self-Managed EC2 Instances
2
2
3
3
This Terraform module automates the deployment of the Atlantis server on an ECS cluster with self-managed EC2 instances. It includes the configuration of an Application Load Balancer (ALB) for traffic routing. The module simplifies the process of setting up and managing Atlantis, enabling automated Terraform pull request workflows.
4
4
5
5
## Prerequisites
6
6
7
-
- Domain with acm certificate attached
7
+
- Domain with ACM certificate attached
8
8
- Application secrets stored in AWS SSM Parameter Store with the following names and descriptions:
9
-
10
-
-`/atlantis/ATLANTIS_GH_USER`: The GitHub username used by Atlantis. Obtain this from your GitHub account settings.
11
9
-`/atlantis/ATLANTIS_GH_TOKEN`: A GitHub personal access token with repo and admin:repo\_hook permissions. Generate this from GitHub Developer settings.
12
10
-`/atlantis/ATLANTIS_GH_WEBHOOK_SECRET`: The secret used to validate GitHub webhooks. Create a random secret string for this.
13
11
-`/atlantis/AWS_ACCESS_KEY_ID`: The AWS Access Key ID for an IAM user with necessary permissions. Obtain this from AWS IAM user security credentials.
14
12
-`/atlantis/AWS_SECRET_ACCESS_KEY`: The AWS Secret Access Key for the same IAM user. Obtain this from AWS IAM user security credentials.
| <aname="input_atlantis_repo_allowlist"></a> [atlantis\_repo\_allowlist](#input\_atlantis\_repo\_allowlist)| Comma delimited string containing repos to use atlantis |`string`|`"github.com/Rahul-4480/test-atlantis"`| no |
62
+
| <a name="input_atlantis_gh_user"></a> [atlantis\_gh\_user](#input\_atlantis\_gh\_user) | The GitHub username used by Atlantis to access repositories | `string` | n/a | yes |
63
+
| <a name="input_atlantis_repo_allowlist"></a> [atlantis\_repo\_allowlist](#input\_atlantis\_repo\_allowlist) | Comma delimited string containing repos to use atlantis | `string` | n/a | yes |
66
64
| <a name="input_base_domain"></a> [base\_domain](#input\_base\_domain) | Your base domain with acm certificate attached to it. | `string` | n/a | yes |
67
-
| <aname="input_ecs_cluster_name"></a> [ecs\_cluster\_name](#input\_ecs\_cluster\_name)| (Required) Name of the cluster. |`string`| n/a | yes |
68
-
| <aname="input_ecs_container_definations_name"></a> [ecs\_container\_definations\_name](#input\_ecs\_container\_definations\_name)| Name of the ECS container defination. |`string`| n/a | yes |
| <aname="input_ecs_service_name"></a> [ecs\_service\_name](#input\_ecs\_service\_name)| (Required) Name of the service. |`string`| n/a | yes |
72
-
| <aname="input_ecs_task_definition_family"></a> [ecs\_task\_definition\_family](#input\_ecs\_task\_definition\_family)| (Required) A unique name for your task definition. |`string`| n/a | yes |
73
-
| <aname="input_launch_template_key_name"></a> [launch\_template\_key\_name](#input\_launch\_template\_key\_name)| (Optional) The key name to use for the instance. |`string`| n/a | yes |
65
+
| <a name="input_container_memory_reservation"></a> [container\_memory\_reservation](#input\_container\_memory\_reservation) | Soft limit (in MiB) of memory to reserve for the container. When system memory is under contention, Docker attempts to keep the container memory to this soft limit | `number` | n/a | yes |
66
+
| <a name="input_ecs_auto_scaling_group_desired_capacity"></a> [ecs\_auto\_scaling\_group\_desired\_capacity](#input\_ecs\_auto\_scaling\_group\_desired\_capacity) | (Optional) Number of Amazon EC2 instances that should be running in the group. | `number` | `null` | no |
67
+
| <a name="input_ecs_auto_scaling_group_max_size"></a> [ecs\_auto\_scaling\_group\_max\_size](#input\_ecs\_auto\_scaling\_group\_max\_size) | (Required) Maximum size of the Auto Scaling Group. | `number` | n/a | yes |
68
+
| <a name="input_ecs_auto_scaling_group_min_size"></a> [ecs\_auto\_scaling\_group\_min\_size](#input\_ecs\_auto\_scaling\_group\_min\_size) | (Required) Minimum size of the Auto Scaling Group | `number` | n/a | yes |
69
+
| <a name="input_ecs_launch_template_image_id"></a> [ecs\_launch\_template\_image\_id](#input\_ecs\_launch\_template\_image\_id) | (Optional) The AMI from which to launch the instance. | `string` | `null` | no |
70
+
| <a name="input_ecs_launch_template_instance_type"></a> [ecs\_launch\_template\_instance\_type](#input\_ecs\_launch\_template\_instance\_type) | (Optional) The type of the instance. | `string` | `null` | no |
71
+
| <a name="input_ecs_launch_type_cpu"></a> [ecs\_launch\_type\_cpu](#input\_ecs\_launch\_type\_cpu) | EC2 instance CPU | `number` | `null` | no |
| <a name="input_ecs_service_desired_count"></a> [ecs\_service\_desired\_count](#input\_ecs\_service\_desired\_count) | (Optional) Number of instances of the task definition to place and keep running. | `number` | `null` | no |
74
+
| <a name="input_launch_template_key_name"></a> [launch\_template\_key\_name](#input\_launch\_template\_key\_name) | The key name to use for the instance. | `string` | n/a | yes |
74
75
| <a name="input_private_subnet_ids"></a> [private\_subnet\_ids](#input\_private\_subnet\_ids) | List of Private subnet ids to deploy Atlantis server. | `list(string)` | n/a | yes |
75
76
| <a name="input_public_subnet_ids"></a> [public\_subnet\_ids](#input\_public\_subnet\_ids) | List of Public subnet ids to deploy application load balancers. | `list(string)` | n/a | yes |
76
-
| <aname="input_region"></a> [region](#input\_region)| AWS region to create resources in |`string`|`"ap-south-1"`| no |
77
77
| <a name="input_sub_domain"></a> [sub\_domain](#input\_sub\_domain) | Your desired sub domain | `string` | n/a | yes |
78
-
| <aname="input_system_name"></a> [system\_name](#input\_system\_name)| Name of the System |`string`| n/a | yes |
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | VPC ID for creating Atlantis Resources. | `string` | n/a | yes |
81
79
82
80
## Outputs
83
81
84
82
| Name | Description |
85
83
|------|-------------|
86
84
| <a name="output_alb_dns_name"></a> [alb\_dns\_name](#output\_alb\_dns\_name) | The DNS name of the ALB |
85
+
| <a name="output_authorized_javascript_origin"></a> [authorized\_javascript\_origin](#output\_authorized\_javascript\_origin) | The base URL for your application that is authorized to use JavaScript for OAuth requests. |
86
+
| <a name="output_authorized_redirect_uri"></a> [authorized\_redirect\_uri](#output\_authorized\_redirect\_uri) | The redirect URI used by your OAuth provider to return responses to your application. |
87
87
| <a name="output_ecs_service_name"></a> [ecs\_service\_name](#output\_ecs\_service\_name) | The name of the ECS service |
88
88
| <a name="output_ecs_task_definition_arn"></a> [ecs\_task\_definition\_arn](#output\_ecs\_task\_definition\_arn) | The ARN of the ECS task definition |
89
89
| <a name="output_github_webhook_url"></a> [github\_webhook\_url](#output\_github\_webhook\_url) | The URL for GitHub webhook |
0 commit comments