Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: resource aws_eip_association doesn't support import #4876

Closed
ghost opened this issue Jun 18, 2018 · 3 comments · Fixed by #5006
Closed

Error: resource aws_eip_association doesn't support import #4876

ghost opened this issue Jun 18, 2018 · 3 comments · Fixed by #5006
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@ghost
Copy link

ghost commented Jun 18, 2018

This issue was originally opened by @JamieGruener as hashicorp/terraform#18281. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.11.7
+ provider.aws v1.14.1

Terraform Configuration Files

resource "aws_eip" "openvpn" {
  vpc = true
  instance = "${aws_instance.openvpn.id}"
  depends_on = ["aws_internet_gateway.default"]
}

resource "aws_eip_association" "openvpn_eip_assoc" {
  instance_id   = "${aws_instance.openvpn.id}"
  allocation_id = "${aws_eip.openvpn.id}"
}

Debug Output

2018/06/18 16:15:11 [TRACE] root: eval: *terraform.EvalImportState
2018/06/18 16:15:11 [ERROR] root: eval: *terraform.EvalImportState, err: import aws_eip_association.openvpn-eip-assoc (id: eipassoc-6xxxxxx9): resource aws_eip_association doesn't support import
2018/06/18 16:15:11 [ERROR] root: eval: *terraform.EvalSequence, err: import aws_eip_association.openvpn-eip-assoc (id: eipassoc-6xxxxxx9): resource aws_eip_association doesn't support import
2018/06/18 16:15:11 [TRACE] [walkImport] Exiting eval tree: aws_eip_association.openvpn-eip-assoc (import id: eipassoc-6xxxxxx9)
2018/06/18 16:15:11 [TRACE] dag/walk: upstream errored, not walking "provider.aws (close)"

Crash Output

Expected Behavior

Terraform would import the resource.

Actual Behavior

PS> terraform import aws_eip_association.ovpn_eip_assoc eipassoc-6xxxxxx9
aws_eip_association.ovpn_eip_assoc: Importing from ID "eipassoc-6xxxxxx9"...

Error: aws_eip_association.ovpn_eip_assoc (import id: eipassoc-6xxxxxx9): import aws_eip_association.ovpn_eip_assoc (id: eipassoc-69411059): resource aws_eip_association doesn't support import

Steps to Reproduce

  1. terraform import aws_eip_association.openvpn-eip-assoc eipassoc-6xxxxxx9

Additional Context

The EIP existed prior to being documented in Terraform. Also, the documentation suggests that the resource exists specifically to solve the problem I'm having, namely connecting an existing EIP to an aws_instance resource. (https://www.terraform.io/docs/providers/aws/r/eip_association.html)

Just in case I misunderstood the documentation, I've tried both the allocation ID and association ID as the resource ID to import.

References

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. labels Jun 21, 2018
@bflad bflad added this to the v1.26.0 milestone Jun 27, 2018
@bflad
Copy link
Contributor

bflad commented Jun 27, 2018

Support for this has been merged into master and will release with version 1.26.0 of the AWS provider, likely middle of next week. 👍

@bflad
Copy link
Contributor

bflad commented Jul 4, 2018

This has been released in version 1.26.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link
Author

ghost commented Apr 4, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant