Skip to content

Commit ef08f91

Browse files
author
James Crowley
authored
Merge pull request #21 from sourcefuse/chore/fix-gh-action
readme updates
2 parents e5ced17 + 3883572 commit ef08f91

File tree

3 files changed

+38
-7
lines changed

3 files changed

+38
-7
lines changed

.github/workflows/update-docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@ jobs:
1414
uses: dmnemec/copy_file_to_another_repo_action@main
1515
env:
1616
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17-
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
17+
API_TOKEN_GITHUB: ${{ secrets.ARC_DOCS_API_TOKEN_GITHUB }}
1818
with:
1919
source_file: 'README.md'
2020
destination_repo: 'sourcefuse/arc-docs'
2121
destination_folder: 'docs/arc-iac-docs/modules/terraform-aws-refarch-ecs'
2222
user_email: 'github-actions@github.com'
23-
user_name: 'github-actions'
23+
user_name: ${{ github.actor }}
2424
commit_message: ${{ github.event.head_commit.message }}
2525
- name: Pushes to another repository
2626
uses: cpina/github-action-push-to-another-repository@main
2727
env:
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29-
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
29+
API_TOKEN_GITHUB: ${{ secrets.ARC_DOCS_API_TOKEN_GITHUB }}
3030
with:
3131
source-directory: 'static'
3232
destination-github-username: 'sourcefuse'
3333
destination-repository-name: 'arc-docs'
3434
target-directory: 'docs/arc-iac-docs/modules/terraform-aws-refarch-ecs/static'
3535
user-email: 'github-actions@github.com'
36-
user-name: 'github-actions'
36+
user-name: ${{ github.actor }}
3737
target-branch: main
3838
commit-message: ${{ github.event.head_commit.message }}

README.md

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,54 @@ Terraform Module for AWS ECS by the SourceFuse ARC team.
66

77
The module assumes that upstream dependencies, namely networking dependencies, are created upstream and the values are passed into this module via mechanisms such as Terraform data source queries.
88

9-
![Module Components](./static/ecs_module_hla.png)
9+
![Module Structure](./static/ecs_module_hla.png)
1010

1111
The module provisions
1212

1313
* ECS Cluster - we are focusing on the Fargate launch type, so we do not provision any underlying EC2 instances for the ECS launch type.
14-
* Application Load Balancer
15-
* Health Check Service - vanilla Nginx service that is used as the default route for the load balancer. The purpose of the health check service is to ensure that the core infrastructure, networking, security groups, etc. are configured correctly.
14+
* Application Load Balancer - default port 80 to 443 redirect.
15+
* Health Check Service - vanilla HTTP echo service that is used as the default target group for the load balancer. The purpose of the health check service is to ensure that the core infrastructure, networking, security groups, etc. are configured correctly.
1616
* Task execution IAM role - used by downstream services for task execution.
17+
* Utilizes ACM to generate a certificate specific to the ALB.
1718
* Tags/SSM params - the module tags resources and outputs SSM params that can be used in data source lookups downstream for ECS services to reference to deploy into the cluster.
1819

20+
![Module Structure](./static/arc_ecs_basic_components.png)
21+
1922
Our approach to ECS Fargate clusters is to provision a cluster and allow downstream services to attach to it via convention based data source queries.
2023

24+
**Note**: the example below is does not have a pinned version. Be sure to pin your version. Refer to the `example` folder for a working example version.
2125
## Usage
2226

2327
```hcl
2428
module "ecs" {
2529
source = "git::https://github.com/sourcefuse/terraform-aws-refarch-ecs"
30+
31+
environment = var.environment
32+
namespace = var.namespace
33+
34+
vpc_id = data.aws_vpc.vpc.id
35+
alb_subnet_ids = data.aws_subnets.public.ids
36+
health_check_subnet_ids = data.aws_subnets.private.ids
37+
38+
// --- Devs: DO NOT override, otherwise tests will fail --- //
39+
access_logs_enabled = false
40+
alb_access_logs_s3_bucket_force_destroy = true
41+
alb_access_logs_s3_bucket_force_destroy_enabled = true
42+
// -------------------------- END ------------------------- //
43+
44+
## create acm certificate and dns record for health check
45+
route_53_zone = local.route_53_zone
46+
acm_domain_name = "healthcheck-ecs-${var.namespace}-${var.environment}.${local.route_53_zone}"
47+
acm_subject_alternative_names = []
48+
health_check_route_53_records = [
49+
"healthcheck-ecs-${var.namespace}-${var.environment}.${local.route_53_zone}"
50+
]
51+
52+
service_discovery_private_dns_namespace = [
53+
"${var.namespace}.${var.environment}.${local.route_53_zone}"
54+
]
55+
56+
tags = module.tags.tags
2657
}
2758
```
2859

static/arc_ecs_basic_components.png

51.9 KB
Loading

0 commit comments

Comments
 (0)