I am VERY new to Terraform but I like it so far...
We have just started using Terraform in our existing AWS environment. Like many others, we are anxiously awaiting the ability to determine existing AWS environment state to be added.
Until then, we are creating tf files individually per server which I know is not the best way but I have to follow, for now.
I am trying to build an instance (tf file below) and I keep getting the above error. I am using the correct AWS keys and I know the subnet ID is correct. What am I missing? Is there a way to specify the VPC?
If I remove the subnet line it complains about the default VPC which no longer exists (before I got here).
resource "aws_instance" "<name>" {
ami = "ami-XXX"
instance_type = "m3.medium"
subnet_id = "subnet-XXX"
associate_public_ip_address = true
source_dest_check = false
iam_instance_profile = "<name>"
user_data = "${replace(replace(file("files/standard-cloud-init.yaml"),"<serverhostname>", "hostname-1"),"<serverenvironment>","prod")}"
key_name = "<name>"
security_groups = ["sg-XXX"]
tags {
Name = "<hostname"
Tier = "presentation"
Customer = "<customer>"
Profiles = "apache"
Role = "cloud-proxy"
Environment = "prod"
}
ebs_block_device {
device_name = "/dev/sdf"
volume_type = "gp2"
volume_size = "25"
}
ebs_block_device {
device_name = "/dev/sda"
volume_type = "gp2"
volume_size = "8"
}
}
John Kennedy (_8(|)
I have a yellow dog:
http://www.theyellowdogproject.com/The_Yellow_Dog_Project/About.html
Anatidaephobia is the fear that somehow, somewhere a duck is watching you -
urbandictionary.comThe Dunning-Kruger effect occurs when incompetent people not only fail to realize their incompetence, but consider themselves much more competent than everyone else. Basically - they're too stupid to know that they're stupid.
VGSR Disclaimer: The opinions expressed in this email are mine and do not reflect the opinions of VGSR or their board of directors.