Skip to content

Commit dae529d

Browse files
author
Abdul Wahid
authored
Upgrade to 5.x + Fixes (#74)
* chore: upgrade to 5.x compatibility * fix: setting container_name is now mandatory to utilise multiple container names set externally to module * fix: protocol set to HTTP by default * chore: changelog + add versions files for examples * chore: set examples to 5 to demonstrate compatability
1 parent 9909245 commit dae529d

File tree

15 files changed

+105
-80
lines changed

15 files changed

+105
-80
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
args: ['--allow-missing-credentials']
1919
- id: trailing-whitespace
2020
- repo: https://github.com/antonbabenko/pre-commit-terraform
21-
rev: v1.77.2
21+
rev: v1.81.0
2222
hooks:
2323
- id: terraform_fmt
2424
- id: terraform_docs

CHANGELOG.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,21 @@ All notable changes to this project will be documented in this file.
55
<a name="unreleased"></a>
66
## [Unreleased]
77

8-
- Comment about 'target_type' for Fargate
9-
- Revert container name to original
10-
- Remove square brackets as input is a list
11-
- Lint fixes
12-
- Turn cloudwatch logging optional - fix
13-
- Turn cloudwatch logging optional
14-
- chore: Update documentation
15-
- Turn cloudwatch logging optional
16-
- Refactored container definitions out of module
8+
- fix: protocol set to HTTP by default
9+
- fix: setting container_name is now mandatory to utilise multiple container names set externally to module
10+
- chore: upgrade to 5.x compatibility
11+
12+
13+
<a name="7.0.0"></a>
14+
## [7.0.0] - 2023-04-12
15+
16+
- Refactored container definitions out of module ([#69](https://github.com/umotif-public/terraform-aws-ecs-fargate/issues/69))
17+
18+
19+
<a name="6.7.1"></a>
20+
## [6.7.1] - 2023-03-28
21+
22+
- Make egress rule configurable ([#71](https://github.com/umotif-public/terraform-aws-ecs-fargate/issues/71))
1723

1824

1925
<a name="6.7.0"></a>
@@ -272,7 +278,9 @@ All notable changes to this project will be documented in this file.
272278
- Initial commit
273279

274280

275-
[Unreleased]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.7.0...HEAD
281+
[Unreleased]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/7.0.0...HEAD
282+
[7.0.0]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.7.1...7.0.0
283+
[6.7.1]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.7.0...6.7.1
276284
[6.7.0]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.6.0...6.7.0
277285
[6.6.0]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.5.2...6.6.0
278286
[6.5.2]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.5.1...6.5.2

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ Module managed by [uMotif](https://github.com/umotif-public/).
8585
| Name | Version |
8686
|------|---------|
8787
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.11 |
88-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.6.0, < 5.0.0 |
88+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.6.0 |
8989

9090
## Providers
9191

9292
| Name | Version |
9393
|------|---------|
94-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.6.0, < 5.0.0 |
94+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.6.0 |
9595

9696
## Modules
9797

examples/core/main.tf

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
terraform {
2-
required_version = ">= 1.0.11"
3-
4-
required_providers {
5-
aws = ">= 4.6.0"
6-
}
7-
}
8-
9-
provider "aws" {
10-
region = "eu-west-1"
11-
}
12-
131
#####
142
# VPC and subnets
153
#####
@@ -116,6 +104,7 @@ module "fargate" {
116104
{
117105
target_group_name = "tg-example"
118106
container_port = 80
107+
container_name = "ecs-fargate-example" # should be equal to container_name in container definition
119108
}
120109
]
121110

examples/core/versions.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
terraform {
2+
required_version = "1.0.11"
3+
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
version = "~> 5"
8+
}
9+
}
10+
}
11+
12+
provider "aws" {
13+
region = "eu-west-1"
14+
}

examples/external-container-definitions/main.tf

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
terraform {
2-
required_version = ">= 1.0.11"
3-
4-
required_providers {
5-
aws = ">= 4.8.0"
6-
}
7-
}
8-
9-
provider "aws" {
10-
region = "eu-west-1"
11-
}
12-
131
#####
142
# VPC and subnets
153
#####
@@ -48,7 +36,7 @@ resource "aws_ecs_cluster_capacity_providers" "cluster" {
4836

4937
module "container_1" {
5038
source = "cloudposse/ecs-container-definition/aws"
51-
version = "0.58.2"
39+
version = "0.60.0"
5240

5341
container_name = "example"
5442
container_image = "hello-world:latest"
@@ -65,7 +53,7 @@ module "container_1" {
6553

6654
module "container_2" {
6755
source = "cloudposse/ecs-container-definition/aws"
68-
version = "0.58.2"
56+
version = "0.60.0"
6957

7058
container_name = "example-2"
7159
container_image = "hello-world:latest"
@@ -164,7 +152,7 @@ module "fargate" {
164152

165153
target_groups = [
166154
{
167-
container_name = "example"
155+
container_name = "example" # should be equal to container_name in container definition
168156
target_group_name = "tg-example"
169157
container_port = 80
170158
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
terraform {
2+
required_version = ">= 1.3.0"
3+
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
version = "~> 5"
8+
}
9+
}
10+
}
11+
12+
provider "aws" {
13+
region = "eu-west-1"
14+
}

examples/fargate-efs/main.tf

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
terraform {
2-
required_version = ">= 1.0.11"
3-
4-
required_providers {
5-
aws = ">= 4.8.0"
6-
}
7-
}
8-
9-
provider "aws" {
10-
region = "eu-west-1"
11-
}
12-
131
#####
142
# VPC and subnets
153
#####
@@ -86,7 +74,7 @@ resource "aws_efs_file_system" "efs" {
8674
# ECS cluster and fargate
8775
#####
8876
resource "aws_ecs_cluster" "cluster" {
89-
name = "ecs-spot-test"
77+
name = "ecs-efs-test"
9078
setting {
9179
name = "containerInsights"
9280
value = "disabled"
@@ -124,6 +112,7 @@ module "fargate" {
124112
{
125113
target_group_name = "efs-example"
126114
container_port = 80
115+
container_name = "ecs-fargate-example"
127116
}
128117
]
129118

examples/fargate-efs/versions.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
terraform {
2+
required_version = ">= 1.0.11"
3+
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
version = "~> 5"
8+
}
9+
}
10+
}
11+
12+
provider "aws" {
13+
region = "eu-west-1"
14+
}

examples/fargate-spot/main.tf

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
terraform {
2-
required_version = ">= 1.0.11"
3-
4-
required_providers {
5-
aws = ">= 4.6.0"
6-
}
7-
}
8-
9-
provider "aws" {
10-
region = "eu-west-1"
11-
}
12-
131
#####
142
# VPC and subnets
153
#####

0 commit comments

Comments
 (0)