Issue
I was checking through terraform documentation for two things which i could not find.
- Disassociating an elastic IP from an existing EC2 so that it can be assigned to a newer instance.
- Getting the EC2 instance attachment information from EBS volume id.
Please let me know if the above two features exist in terraform or there are alternative ways to get the above information. Can such features be requested to be added to terraform anywhere.
Solution
Disassociating an elastic IP from an existing EC2 so that it can be assigned to a newer instance.
To create association you have to use aws_eip_association. Subsequently, to delete the association, you remove aws_eip_association
from your TF code.
Getting the EC2 instance attachment information the its volume id.
Its not supported. You can develop your own external data source to get any information you want and which is not directly supported by TF.
Can such features be requested to be added to terraform anywhere.
Yes, you can make Issues
on github: https://github.com/hashicorp/terraform-provider-aws
Answered By - Marcin