Skip to content

Commit 77ae067

Browse files
committed
feat: Add support for EBS volumes
1 parent 4544f94 commit 77ae067

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

examples/ec2-autoscaling/main.tf

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

96+
create_infrastructure_iam_role = true
97+
volume_configuration = {
98+
ebs-volume = {
99+
managed_ebs_volume = {
100+
encrypted = true
101+
file_system_type = "xfs"
102+
size_in_gb = 5
103+
volume_type = "gp3"
104+
}
105+
}
106+
}
107+
96108
volume = {
97-
my-vol = {}
109+
my-vol = {},
110+
ebs-volume = {
111+
name = "ebs-volume"
112+
configure_at_launch = true
113+
}
98114
}
99115

100116
# Container definition(s)
@@ -113,6 +129,10 @@ module "ecs_service" {
113129
{
114130
sourceVolume = "my-vol",
115131
containerPath = "/var/www/my-vol"
132+
},
133+
{
134+
containerPath = "/ebs/data"
135+
sourceVolume = "ebs-volume"
116136
}
117137
]
118138

0 commit comments

Comments
 (0)