It's not currently possible.
The aws_vpc
resource has support for enabling ClassicLink but there's no way to attach an EC2 instance to a VPC via ClassicLink. There's an existing, stale feature request for it but not much interest in it.
Unfortunately EC2 Classic things are deprecated in favour of VPC based EC2 resources and it's not even possible for a person without an EC2 Classic enabled account to be able to test the functionality either so feature requests like this must be driven entirely by the very few AWS customers still using EC2 Classic but are also using Terraform for automation. If you feel up to the task you could raise a pull request to expose the functionality requested in that issue via the AttachClassicLinkVPC API call
.
I'd recommend migrating your remaining EC2 Classic instances to VPC based ones to avoid issues around the use of EC2 Classic.