Skip to content

Commit

Permalink
create ebs vol
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunmenon95 committed Jul 22, 2024
1 parent 7b886ab commit 4431fcc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ecs-task.cfndsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,12 @@
# add ebs volumes
ebs_volumes = external_parameters.fetch(:ebs_volumes, [])
ebs_volumes.each do |ebs_volume|
mount_points << { ContainerPath: ebs_volume['container_path'], SourceVolume: ebs_volume['name'], ReadOnly: false}
volumes << {Name: ebs_volume['name'], ConfiguredAtLaunch: true }
EBS_Volume(ebs_volume['name']) do
Size: 100
VolumeType: "gp3"
end
mount_points << { ContainerPath: ebs_volume['container_path'], SourceVolume: Ref(:EBS_Volume(ebs_volume['name'])), ReadOnly: false}
volumes << {Name: Ref(:EBS_Volume(ebs_volume['name'])), ConfiguredAtLaunch: true }
task_def.merge!({MountPoints: mount_points })
task_def.merge!({Volumes: volumes })
end
Expand Down

0 comments on commit 4431fcc

Please sign in to comment.