Skip to content

Commit 32a563e

Browse files
feat: Add support for CANARY/LINEAR deployment configuration (#370)
* feat: Add support for CANARY/LINEAR deployment configuration * docs: update tf module inputs * fix: resolve tf fmt errors * Revert "docs: update tf module inputs" This reverts commit 9c56ed4. * fix: Correct variable definitions, examples, and propagate to root module --------- Co-authored-by: Bryant Biggs <[email protected]>
1 parent 69ee449 commit 32a563e

File tree

26 files changed

+116
-29
lines changed

26 files changed

+116
-29
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

examples/complete/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ Note that this example may create resources which will incur monetary charges on
2727
| Name | Version |
2828
|------|---------|
2929
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
30-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.14 |
30+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.21 |
3131

3232
## Providers
3333

3434
| Name | Version |
3535
|------|---------|
36-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.14 |
36+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.21 |
3737

3838
## Modules
3939

examples/complete/main.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,16 @@ module "ecs" {
179179
}
180180
}
181181

182+
# Linear deployment
183+
deployment_configuration = {
184+
strategy = "LINEAR"
185+
186+
linear_configuration = {
187+
step_percent = 20
188+
step_bake_time_in_minutes = 1
189+
}
190+
}
191+
182192
service_connect_configuration = {
183193
namespace = aws_service_discovery_http_namespace.this.arn
184194
service = [

examples/complete/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.14"
7+
version = ">= 6.21"
88
}
99
}
1010
}

examples/container-definition/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Note that this example may create resources which will incur monetary charges on
2222
| Name | Version |
2323
|------|---------|
2424
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
25-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.14 |
25+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.21 |
2626
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 3.2 |
2727

2828
## Providers

examples/container-definition/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.14"
7+
version = ">= 6.21"
88
}
99
null = {
1010
source = "hashicorp/null"

examples/ec2-autoscaling/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ Note that this example may create resources which will incur monetary charges on
2727
| Name | Version |
2828
|------|---------|
2929
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
30-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.14 |
30+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.21 |
3131

3232
## Providers
3333

3434
| Name | Version |
3535
|------|---------|
36-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.14 |
36+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.21 |
3737

3838
## Modules
3939

examples/ec2-autoscaling/main.tf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,31 @@ module "ecs_service" {
8484
name = local.name
8585
cluster_arn = module.ecs_cluster.arn
8686

87+
# Canary deployment
88+
deployment_configuration = {
89+
strategy = "CANARY"
90+
91+
canary_configuration = {
92+
canary_percent = 10.0
93+
canary_bake_time_in_minutes = 5
94+
}
95+
96+
# # Example config using lifecycle hooks
97+
# lifecycle_hook = {
98+
# success = {
99+
# hook_target_arn = aws_lambda_function.hook_success.arn
100+
# role_arn = aws_iam_role.global.arn
101+
# lifecycle_stages = ["POST_SCALE_UP", "POST_TEST_TRAFFIC_SHIFT"]
102+
# hook_details = jsonencode("test")
103+
# }
104+
# failure = {
105+
# hook_target_arn = aws_lambda_function.hook_failure.arn
106+
# role_arn = aws_iam_role.global.arn
107+
# lifecycle_stages = ["TEST_TRAFFIC_SHIFT", "POST_PRODUCTION_TRAFFIC_SHIFT"]
108+
# }
109+
# }
110+
}
111+
87112
# Task Definition
88113
requires_compatibilities = ["EC2"]
89114
capacity_provider_strategy = {

examples/ec2-autoscaling/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.14"
7+
version = ">= 6.21"
88
}
99
}
1010
}

examples/fargate/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ Note that this example may create resources which will incur monetary charges on
2727
| Name | Version |
2828
|------|---------|
2929
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
30-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.14 |
30+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.21 |
3131

3232
## Providers
3333

3434
| Name | Version |
3535
|------|---------|
36-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.14 |
36+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.21 |
3737

3838
## Modules
3939

0 commit comments

Comments
 (0)