_This issue was originally opened by @dattatrayakumbhar as hashicorp/terraform#15980. It was migrated here as a result of the provider split. The original body of the issue is below._
Terraform v0.10.3
[Same code with terraform 0.9.1, works fine]
resource "aws_instance" "edge_i" {
instance_type = "t2.small"
ami = "ami-5a969821"
key_name = "dateast1"
subnet_id = "subnet-363c631a"
vpc_security_group_ids = ["sg-b9e9bec9"]
}
resource "aws_eip" "edge_eip" {
vpc = "true"
instance = "${aws_instance.edge_i.id}"
}
resource "aws_instance" "asa_i" {
instance_type = "c3.large"
ami = "ami-b5e0ada2"
key_name = "dateast1"
vpc_security_group_ids = ["sg-b9e9bec9"]
subnet_id = "subnet-363c631a"
}
resource "aws_eip" "asa_eip" {
vpc = "true"
instance = "${aws_instance.asa_i.id}"
}
instance should come up and public IP should get associated.
instance came up but public IP failed to associate with below error:
aws_eip.edgedatta: 1 error(s) occurred:
aws_eip.edgedatta: MissingParameter: Either public IP or association id must be specified
status code: 400, request id: bd049797-2f2d-4874-b819-ae0abd96f38b
aws_eip.asadatta: 1 error(s) occurred:
aws_eip.asadatta: MissingParameter: Either public IP or association id must be specified
status code: 400, request id: 4dd49ef0-4108-4127-85c8-8d3643a95614
Steps:
I can confirm this behaviour. I had to manually delete some things due to a dependency issue when recreating a complete VPC. After having manually deleted an instance with an EIP attached, this happened.
Can downgrading the provisioner version get us out of this problem? Any workarounds? Thanks.
The workaround is to go and manually assign EIP to your instance. After that plan shows no required changes for EIP resource
@boldandbusted: I compiled the provider manually with darkowlzz's fix; stuck it into a plugins folder and referenced the full-path in my ~/.terraformrc (I believe there's a bug in TF that it does not search PATH for plugins).
Compile process was very straight forward too (I left my overkill-notes in the PR thread)
Any news on this? We're experiencing the same issue- version 0.10.7
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!
Most helpful comment
Any news on this? We're experiencing the same issue- version 0.10.7