-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AWS] EC2 instance launch template (#96)
- Loading branch information
1 parent
a1ccf7b
commit f313cc2
Showing
5 changed files
with
87 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
resource "aws_launch_template" "my_launch_template" { | ||
name_prefix = "my_launch_template" | ||
image_id = "${data.aws_ami.ubuntu.id}" | ||
instance_type = "m5d.xlarge" | ||
|
||
block_device_mappings { | ||
device_name = "/dev/sda1" | ||
|
||
ebs { | ||
volume_size = 300 | ||
volume_type = "standard" | ||
delete_on_termination = true | ||
} | ||
} | ||
|
||
block_device_mappings { | ||
device_name = "/dev/sdb" | ||
virtual_name = "ephemeral0" | ||
} | ||
|
||
} | ||
|
||
resource "aws_instance" "ec2_with_lt" { | ||
launch_template { | ||
id = "${aws_launch_template.my_launch_template.id}" | ||
version = "$$Latest" | ||
} | ||
} |