Skip to content

Commit 915e878

Browse files
feat: Add support for EBS volumes (#205)
* feat: Adding support for EBS volumes * feat: Adding support for EBS volumes * feat: Add support for EBS volumes * feat: Add support for EBS volumes * chore: Update min required AWS provider version --------- Co-authored-by: Bryant Biggs <[email protected]>
1 parent e325378 commit 915e878

File tree

28 files changed

+318
-92
lines changed

28 files changed

+318
-92
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ module "ecs" {
160160
| Name | Version |
161161
|------|---------|
162162
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
163-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.37 |
163+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.59 |
164164

165165
## Providers
166166

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.3 |
30-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.37 |
30+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.59 |
3131

3232
## Providers
3333

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

3838
## Modules
3939

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 = ">= 5.37"
7+
version = ">= 5.59"
88
}
99
}
1010
}

examples/ec2-autoscaling/README.md

Lines changed: 4 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.3 |
30-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.37 |
30+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.59 |
3131

3232
## Providers
3333

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

3838
## Modules
3939

@@ -73,6 +73,8 @@ No inputs.
7373
| <a name="output_service_iam_role_name"></a> [service\_iam\_role\_name](#output\_service\_iam\_role\_name) | Service IAM role name |
7474
| <a name="output_service_iam_role_unique_id"></a> [service\_iam\_role\_unique\_id](#output\_service\_iam\_role\_unique\_id) | Stable and unique string identifying the service IAM role |
7575
| <a name="output_service_id"></a> [service\_id](#output\_service\_id) | ARN that identifies the service |
76+
| <a name="output_service_infrastructure_iam_role_arn"></a> [service\_infrastructure\_iam\_role\_arn](#output\_service\_infrastructure\_iam\_role\_arn) | Infrastructure IAM role ARN |
77+
| <a name="output_service_infrastructure_iam_role_name"></a> [service\_infrastructure\_iam\_role\_name](#output\_service\_infrastructure\_iam\_role\_name) | Infrastructure IAM role name |
7678
| <a name="output_service_name"></a> [service\_name](#output\_service\_name) | Name of the service |
7779
| <a name="output_service_task_definition_arn"></a> [service\_task\_definition\_arn](#output\_service\_task\_definition\_arn) | Full ARN of the Task Definition (including both `family` and `revision`) |
7880
| <a name="output_service_task_definition_revision"></a> [service\_task\_definition\_revision](#output\_service\_task\_definition\_revision) | Revision of the task in a particular family |

examples/ec2-autoscaling/main.tf

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,24 @@ module "ecs_service" {
9595
}
9696
}
9797

98+
create_infrastructure_iam_role = true
99+
volume_configuration = {
100+
ebs-volume = {
101+
managed_ebs_volume = {
102+
encrypted = true
103+
file_system_type = "xfs"
104+
size_in_gb = 5
105+
volume_type = "gp3"
106+
}
107+
}
108+
}
109+
98110
volume = {
99-
my-vol = {}
111+
my-vol = {},
112+
ebs-volume = {
113+
name = "ebs-volume"
114+
configure_at_launch = true
115+
}
100116
}
101117

102118
# Container definition(s)
@@ -115,6 +131,10 @@ module "ecs_service" {
115131
{
116132
sourceVolume = "my-vol",
117133
containerPath = "/var/www/my-vol"
134+
},
135+
{
136+
containerPath = "/ebs/data"
137+
sourceVolume = "ebs-volume"
118138
}
119139
]
120140

examples/ec2-autoscaling/outputs.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,13 @@ output "service_autoscaling_scheduled_actions" {
130130
description = "Map of autoscaling scheduled actions and their attributes"
131131
value = module.ecs_service.autoscaling_scheduled_actions
132132
}
133+
134+
output "service_infrastructure_iam_role_arn" {
135+
description = "Infrastructure IAM role ARN"
136+
value = module.ecs_service.infrastructure_iam_role_arn
137+
}
138+
139+
output "service_infrastructure_iam_role_name" {
140+
description = "Infrastructure IAM role name"
141+
value = module.ecs_service.infrastructure_iam_role_name
142+
}

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 = ">= 5.37"
7+
version = ">= 5.59"
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.3 |
30-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.37 |
30+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.59 |
3131

3232
## Providers
3333

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

3838
## Modules
3939

examples/fargate/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 = ">= 5.37"
7+
version = ">= 5.59"
88
}
99
}
1010
}

modules/cluster/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ module "ecs_cluster" {
137137
| Name | Version |
138138
|------|---------|
139139
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
140-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.37 |
140+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.59 |
141141

142142
## Providers
143143

144144
| Name | Version |
145145
|------|---------|
146-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.37 |
146+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.59 |
147147

148148
## Modules
149149

0 commit comments

Comments
 (0)