0.8.6
resource "aws_subnet" "main-1a" {
vpc_id = "${aws_vpc.main.id}"
cidr_block = "10.1.0.0/20"
availability_zone = "${format("%s%s", var.region, "a")}"
default_for_az = true
map_public_ip_on_launch = true
}
The defined subnet gets set as the default subnet for the AZ.
* aws_subnet.main-1a: : invalid or unknown key: default_for_az
terraform planHi @jangrewe
Sorry for the issue here. This parameter is not part of Terraform - this is why the error is being returned
Thanks
Paul
Hi @stack72, i don't follow, it's mentioned in the docs?
And it's also part of Terraform: https://github.com/hashicorp/terraform/blob/master/builtin/providers/aws/data_source_aws_subnet.go
Argh, i just noticed that this was for the Data Source, not the Resource... my bad.
Hi @jangrewe
you are mixing up data_sources and resources - we should try and make this much clearer in the documentation
Apologies for this
Paul
I got a similar response while trying to set dns hostnames for a vpc invalid or unknown key: enable_dns_hostnames.
Did not realize the difference between data_resources and resources. As you noted would be nice to have this clearly documented.
resource "aws_instance" "test" {
ami = "ami-0ac019f4fcb7cb7e6"
key_name = "hello"
instance_type = "t2.micro"
tags = {
Name="test"
}
Error: aws_instance.test: invalid or unknown key: command
can anyone help me ???
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Hi @jangrewe
you are mixing up data_sources and resources - we should try and make this much clearer in the documentation
Apologies for this
Paul