Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
Fix missing snapshot id in ebs devices in nomad cluster
Browse files Browse the repository at this point in the history
If the volume_size is 0 then we assume that a snapshotid is available and use that one instead.
AWS requires either a volume size or a snapshotid.
It seems that Terraform filters a volume size of 0 out of the request to AWS.
  • Loading branch information
pp23 committed May 11, 2020
1 parent 5ecf115 commit 08aaa4d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/nomad-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ resource "aws_launch_configuration" "launch_configuration" {
content {
device_name = ebs_block_device.value["device_name"]
volume_size = ebs_block_device.value["volume_size"]
snapshot_id = ebs_block_device.value["snapshot_id"]
iops = lookup(ebs_block_device.value, "iops", null)
encrypted = lookup(ebs_block_device.value, "encrypted", null)
delete_on_termination = lookup(ebs_block_device.value, "delete_on_termination", null)
Expand Down

0 comments on commit 08aaa4d

Please sign in to comment.