You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
terraform version
Terraform v1.8.3
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v5.50.0
Terraform Configuration Files
$ cat import.tfimport {
id="vpc-81939bxx"# Resource ID in the cloudto=aws_vpc.this# Resource address in OpenTofu configuration
}
Debug Output
$ terraform plan -generate-config-out=generated_resources.tf
aws_vpc.this: Preparing import... [id=vpc-81939bxx]
aws_vpc.this: Refreshing state... [id=vpc-81939bxx]
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Warning: Config generation is experimental
│
│ Generating configuration during import is currently experimental, and the generated configuration format may change in future versions.
╵
╷
│ Error: Missing required argument
│
│ with aws_vpc.this,
│ on generated_resources.tf line 12:
│ (source code not available)
│
│ "ipv6_netmask_length": all of `ipv6_ipam_pool_id,ipv6_netmask_length` must be specified
Expected Behavior
No error
Actual Behavior
get error
╷
│ Error: Missing required argument
│
│ with aws_vpc.this,
│ on generated_resources.tf line 12:
│ (source code not available)
│
│ "ipv6_netmask_length": all of `ipv6_ipam_pool_id,ipv6_netmask_length` must be specified
Steps to Reproduce
$ cat import.tf
import {
id = "vpc-81939bxx" # Resource ID in the cloud
to = aws_vpc.this# Resource address in OpenTofu configuration
}
$ terraform plan -generate-config-out=generated_resources.tf
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered:
The problem seems to be that the AWS Provider does not include all necessary attributes on resource read. These are then transformed by terraform's config driven import feature to generate the necessary HCL.
I'll move this issue over to the AWS provider 👍
Edit: Seems like I don't have the right permissions to do that, I'll search for someone 🔎
Hi @ozbillwang, opening a new issue would be easiest. We used to transfer issues but with the modern state of GitHub Action workflows etc, it makes it a lot messier (tagging gets especially screwed up). Thanks!
Terraform Version
Terraform Configuration Files
Debug Output
Expected Behavior
No error
Actual Behavior
get error
Steps to Reproduce
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: