Is there a way to import the `aws_autoscaling_attachment` resource?

I’m working on moving some existing infrastructure into a new remote state and tf repository and would need to import an aws_autoscaling_attachment resource for tracking my eks-managed node group attachment to a NLB target group, but looking at the docs I couldn’t find the import instructions at the bottom of the screen.

So is there a way to import it?

You are correct, the aws_autoscaling_attachment resource does not currently support import. Browsing the code ,I don’t see anything obvious that would prevent adding import support, so a feature request is probably the best way to describe the use case and start collecting community support for prioritization.

1 Like

Got it! Thanks for the quick reply.

I’m planning to try it myself, found this link which looks like a good guide to get started.

Do you know any other docs that can help me? it will be my first contribution to the project

The contributor guide is a great place to start, especially for instructions on setting up the project and development environment.

Beyond that you can look to other SDKv2 based resource which support import as examples. For this case, another “attachment-like” resource such as aws_iam_role_policy_attachment would be a good candidate:

The only note I’d make about this example is that we prefer comma-delimited multi-part IDs whenever possible. This resource has been around for a long time and uses a non-preferred delimiter (/) which, while not ideal, we don’t intend to make a breaking change to address.

Hope this helps!