Closed mcduffie closed 1 year ago
One way to fix the AMI issue to refer to the latest of a given type:
data "aws_ssm_parameter" "ami" {
name = "/path/to/ami"
}
resource "aws_instance" "nginx" {
ami = data.aws_ssm_parameter.ami.value # pull value from parameter store
instance_type = "t2.micro"
provisioner "remote-exec" {
inline = [
"sudo yum install nginx -y",
"sudo service nginx start"
]
}
}
The AMI used for Dockstore should be updated to the latest one due to security issues. Instead of hard coding the AMI ID, grab the latest.