Getting errors while trying to find unnassociated EIPs with terraform data source for aws_eips

83 views Asked by At

I am using a terraform data source for aws_eip target the usage of specific EIPs in my account that are currently unused. I have some other filters, e.g to get ones from a specific range and ones that have a specific tag - these are all working fine.

As soon as I add the filter to check for EIPs that aren't currently associated with anything, I get no results. Using the same filter on the aws console returns all the unused EIPs

I've tried the following:

  filter {
    name = "instance-id"
    values = []
  }
  filter {
    name = "instance-id"
    values = [""]
  }
  filter {
    name = "association-id"
    values = []
  }

  filter {
    name = "association-id"
    values = [""]
  }

And they all result in: Error: no matching EC2 EIP found

0

There are 0 answers