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 importing ec2 #35362

Open
DON77 opened this issue Jun 19, 2024 · 2 comments
Open

error importing ec2 #35362

DON77 opened this issue Jun 19, 2024 · 2 comments
Labels
bug new new issue not yet triaged waiting for reproduction unable to reproduce issue without further information waiting-response An issue/pull request is waiting for a response from the community

Comments

@DON77
Copy link

DON77 commented Jun 19, 2024

Terraform Version

terraform version
Terraform v1.4.6
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v5.54.1

Your version of Terraform is out of date! The latest version
is 1.8.5. You can update by downloading from https://www.terraform.io/downloads.html

Terraform Configuration Files

# Import the existing EC2 instance
  8 resource "aws_instance" "existing_ec2" {
  9   instance_id = real_instance_id
 10 }```


### Debug Output

can't replicate the issue to post output

### Expected Behavior

ec2 instance imported to terraform

### Actual Behavior

....o:sqs armensadoyan$ terraform import aws_instance.existing_ec2 i-00f2a3030eab61456
aws_instance.existing_ec2: Importing from ID "i-00f2a3030eab61456"...
aws_instance.existing_ec2: Import prepared!
  Prepared aws_instance for import
aws_instance.existing_ec2: Refreshing state... [id=i-00f2a3030eab61456]
╷
│ Error: no schema available for aws_iam_instance_profile_attachment.ec2_instance_profile_attachment to validate for self-references; this is a bug in Terraform and should be reported


### Steps to Reproduce

terraform init
terraform import:q

### Additional Context

_No response_

### References

_No response_
@DON77 DON77 added bug new new issue not yet triaged labels Jun 19, 2024
@jbardin
Copy link
Member

jbardin commented Jun 19, 2024

Hi @DON77,

Thanks for filing the issue. Without an example to reproduce the issue it's probably not going to be possible to pinpoint what may have gone wrong here. Can you show the configuration for the aws_iam_instance_profile_attachment in the error message, or how it might exist in the state?

I would also suggest updating to a current release of Terraform, since there have been many updates and fixes to the import system, most notably the addition of the import block for a more declarative process.

@jbardin jbardin added waiting-response An issue/pull request is waiting for a response from the community waiting for reproduction unable to reproduce issue without further information labels Jun 19, 2024
@DON77
Copy link
Author

DON77 commented Jun 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug new new issue not yet triaged waiting for reproduction unable to reproduce issue without further information waiting-response An issue/pull request is waiting for a response from the community
Projects
None yet
Development

No branches or pull requests

2 participants