mirror of
https://codeberg.org/scottslowe/learning-tools.git
synced 2026-03-11 09:04:37 +00:00
Add a simple Terraform configuration to spin up an Ubuntu 14.04 EC2 instance in the default VPC using the default security group. Signed-off-by: Scott S. Lowe <scott.lowe@scottlowe.org>
34 lines
835 B
HCL
34 lines
835 B
HCL
data "aws_ami" "ubuntu-1404-ami" {
|
|
most_recent = true
|
|
owners = ["099720109477"]
|
|
filter {
|
|
name = "root-device-type"
|
|
values = ["ebs"]
|
|
}
|
|
filter {
|
|
name = "architecture"
|
|
values = ["x86_64"]
|
|
}
|
|
filter {
|
|
name = "virtualization-type"
|
|
values = ["hvm"]
|
|
}
|
|
filter {
|
|
name = "name"
|
|
values = ["*ubuntu-trusty-14.04*"]
|
|
}
|
|
}
|
|
|
|
data "aws_vpc" "default-vpc" {
|
|
filter {
|
|
name = "isDefault"
|
|
values = ["true"]
|
|
}
|
|
}
|
|
|
|
data "aws_subnet" "default-subnet" {
|
|
filter {
|
|
name = "cidrBlock"
|
|
values = ["172.31.16.0/20"]
|
|
}
|
|
}
|