@@ -4,6 +4,8 @@ Simple Terraform module to deploy an ECS task using AWS Fargate including addons
44
55## Example usage
66
7+ ### Bootstrapped setup
8+
79``` hcl
810module "ecr" {
911 source = "tbobm/ecs/aws"
@@ -19,6 +21,36 @@ module "ecr" {
1921}
2022```
2123
24+ ### Restricted setup
25+
26+ Simply setup an ECS Cluster and Service based on ` container.image ` .
27+
28+ ``` hcl
29+ module "ecr" {
30+ source = "tbobm/ecs/aws"
31+ version = "0.0.1"
32+
33+ container = {
34+ image = "particuleio/helloworld"
35+ }
36+
37+ vpc = {
38+ id = "vpc-xxxxxxxx"
39+ }
40+ addons = {
41+ iam = {
42+ enabled = false
43+ }
44+ ecr = {
45+ enabled = false
46+ }
47+ loadbalancer = {
48+ enabled = false
49+ }
50+ }
51+ }
52+ ```
53+
2254## Doc generation
2355
2456Code formatting and documentation for variables and outputs is generated using
@@ -60,27 +92,28 @@ No modules.
6092
6193| Name | Type |
6294| ------| ------|
63- | [ aws_ecr_repository.repository ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository ) | resource |
64- | [ aws_ecr_repository_policy.policy ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository_policy ) | resource |
65- | [ aws_ecs_cluster.cluster ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_cluster ) | resource |
66- | [ aws_ecs_service.service ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_service ) | resource |
67- | [ aws_ecs_task_definition.task ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_task_definition ) | resource |
95+ | [ aws_ecr_repository.this ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository ) | resource |
96+ | [ aws_ecr_repository_policy.this ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository_policy ) | resource |
97+ | [ aws_ecs_cluster.this ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_cluster ) | resource |
98+ | [ aws_ecs_service.this ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_service ) | resource |
99+ | [ aws_ecs_task_definition.this ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_task_definition ) | resource |
68100| [ aws_iam_access_key.publisher] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_access_key ) | resource |
69- | [ aws_iam_role.fargate ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role ) | resource |
70- | [ aws_iam_role_policy.fargate ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy ) | resource |
101+ | [ aws_iam_role.this ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role ) | resource |
102+ | [ aws_iam_role_policy.this ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy ) | resource |
71103| [ aws_iam_user.publisher] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_user ) | resource |
72104| [ aws_iam_user_policy.publisher] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_user_policy ) | resource |
73- | [ aws_lb.alb ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb ) | resource |
74- | [ aws_lb_listener.front_end ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener ) | resource |
75- | [ aws_lb_target_group.group ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group ) | resource |
76- | [ aws_subnet.subnets ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnet ) | data source |
77- | [ aws_subnet_ids.subnets ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnet_ids ) | data source |
78- | [ aws_vpc.vpc ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc ) | data source |
105+ | [ aws_lb.this ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb ) | resource |
106+ | [ aws_lb_listener.this ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener ) | resource |
107+ | [ aws_lb_target_group.this ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group ) | resource |
108+ | [ aws_subnet.this ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnet ) | data source |
109+ | [ aws_subnet_ids.this ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnet_ids ) | data source |
110+ | [ aws_vpc.this ] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc ) | data source |
79111
80112## Inputs
81113
82114| Name | Description | Type | Default | Required |
83115| ------| -------------| ------| ---------| :--------:|
116+ | <a name =" input_addons " ></a > [ addons] ( #input\_ addons ) | Configuration of each addon that can be toggles on and off | ` any ` | ` {} ` | no |
84117| <a name =" input_aws_region " ></a > [ aws\_ region] ( #input\_ aws\_ region ) | AWS region | ` string ` | ` "eu-west-3" ` | no |
85118| <a name =" input_container " ></a > [ container] ( #input\_ container ) | Container configuration to deploy | ` any ` | ` {} ` | no |
86119| <a name =" input_ecr_values " ></a > [ ecr\_ values] ( #input\_ ecr\_ values ) | AWS ECR configuration | ` any ` | ` {} ` | no |
@@ -92,6 +125,7 @@ No modules.
92125
93126| Name | Description |
94127| ------| -------------|
128+ | <a name =" output_addons " ></a > [ addons] ( #output\_ addons ) | The Addons configuration |
95129| <a name =" output_app_url " ></a > [ app\_ url] ( #output\_ app\_ url ) | The public ALB DNS |
96130| <a name =" output_aws_region " ></a > [ aws\_ region] ( #output\_ aws\_ region ) | The AWS region used |
97131| <a name =" output_container_name " ></a > [ container\_ name] ( #output\_ container\_ name ) | Container name for the ECS task |
0 commit comments