terraform - terrafrom aws_instance subnet_id - Error launching source instance: Unsupported: The requested configuration is currently not supported -


i trying build vpc , subnet within vpc. thirdly trying create aws instances within subnet. sounds simple, subnet_id parameter seems break terraform 'apply' (plan works fine). missing something?

extract main.tf

resource "aws_vpc" "poc-vpc" {   cidr_block       = "10.0.0.0/16"   instance_tenancy = "dedicated"   enable_dns_hostnames = "true" }  resource "aws_subnet" "poc-subnet" {   vpc_id     = "${aws_vpc.poc-vpc.id}"   cidr_block = "10.0.1.0/24"   map_public_ip_on_launch = "true"   availability_zone = "${var.availability_zone}" }   resource "aws_instance" "poc-instance" {   ami = "${lookup(var.amis, var.region)}"   instance_type = "${var.instance_type}"   availability_zone = "${var.availability_zone}"   associate_public_ip_address = true   key_name = "pipeline-poc-key-pair"   vpc_security_group_ids = ["${aws_security_group.poc-sec-group.id}"]   subnet_id = "${aws_subnet.poc-subnet.id}" } 

if remove subnet_id 'apply' works, instance created in default vpc. not aim.

any appreciated. newbie terraform please gentle.

i worked out , wanted post saves others time.

the issue conflict of subnet_id in aws_instance provisioner , instance_tennancy in aws_vpc provisioner. remove instance tenancy , fixed (or set default)

the error message meaningless. i've asked whether can improved.


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -