find the right AMI for instance

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-05-28 14:42:16 -04:00
parent 11819f90d2
commit df664bd2f6
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 25 additions and 0 deletions

18
main.tf
View File

@ -39,3 +39,21 @@ resource "aws_s3_bucket" "tf-state" {
}
/* RESOURCES ------------------------------------*/
data "aws_ami" "debian" {
most_recent = true
filter {
name = "name"
values = ["debian-stretch-hvm-arm64-gp2-2019-04-28-63458"]
}
}
//resource "aws_instance" "dev-dapps" {
// ami = "${data.aws_ami.ubuntu.id}"
// instance_type = "t3.medium"
//
// tags = {
// Name = "${var.name}-${format("%02d", count.index+1)}.${local.dc}.${var.env}.${local.stage}"
// }
//}

View File

@ -19,3 +19,10 @@ variable public_domain {
description = "Public DNS Domain address"
default = "dap.ps"
}
/* ENVIRONMENT ----------------------------------*/
variable env {
description = "Name of environment to create"
default = "dapps"
}