AWS charges for unused or unallocated Elastic IPs as these are a finite resource. Elastic IPs can sometimes be overlooked when infrastructure is decommissioned. Its is sub-optimal to pay for a resource you aren’t using. Checking for unused Elastic IPs enables costs to be aligned with usage.
In the unlikely event that you have an unallocated elastic IP in Terraform, then you will need to de-provision it with Terraform destroy:
resource “aws_eip” “lonely-ip” {}
CloudFormation
Resource: “AWS::EC2::EIP” If you have managed to provision an unassociated Elastic IP in Cloudformation, you will need to find the resource that has the type: “Type” : “AWS::EC2::EIP” and delete that section. Make sure there is no AWS::EC2::EIPAssociation for that Elastic IP and double check its association before attempting the edit.