Hello Guys,
I am actually facing a problem :
- I have my own VPC witch private and public subnet build with terraform.
I deploy launch configuration in this VPC, but i cant launch ELB to the VPC custom :
Error applying plan:
```1 error(s) occurred:
* module.base.aws_elb.terraform-elb: 1 error(s) occurred:
* aws_elb.terraform-elb: InvalidConfigurationRequest: Security group "sg-95daf2ec" does not belong to VPC "vpc-d69b22b3"
status code: 409, request id: 15a745ff-3f8a-11e7-9325-cd3b2a462e89
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.```
here is my elb configuration : resource "aws_elb" "terraform-elb" {
name = "${var.cluster_name}-elb"
availability_zones = ["${split(",", var.availability_zones)}"]
listener {
lb_port = 80
lb_protocol = "http"
instance_port = "${var.server_port}"
instance_protocol = "http"
}
health_check {
healthy_threshold = 2
unhealthy_threshold = 2
timeout = 3
interval = 30
target = "HTTP:${var.server_port}/"
}
}
it there any way to inform ELB of wich VPC he should get ? vpc_id is not working.
Thanks a lot for the help