Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid or unknown key: filter #5133

Closed
saikrishnaburugula opened this issue Jul 9, 2018 · 5 comments
Closed

invalid or unknown key: filter #5133

saikrishnaburugula opened this issue Jul 9, 2018 · 5 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@saikrishnaburugula
Copy link

saikrishnaburugula commented Jul 9, 2018

Hello,

I'm using terraform v0.11.3 version, but assigning an elastic ip address to an Ec2 instance using data filter or tags is not supported with this version. It is giving me invalid or unknown key when using filter or tags in the query to look at the elastic ip's.

Terraform Version

Terraform v0.11.3

  • provider.aws v1.25.0
  • provider.template v1.0.0

Affected Resource(s)

aws_eip_association
data.aws_eip

Terraform Configuration Files

data "aws_eip" "example" {
filter {
name = "tag:Name"
values = ["test"]
}
}
resource "aws_eip_association" "eip_assoc" {
instance_id = "${aws_instance.test.id}"
allocation_id = "${data.aws_eip.test.id}"
}

Debug Output

Panic Output

Expected Behavior

terraform apply

Actual Behavior

Error: data.aws_eip.test: : invalid or unknown key: filter

Steps to Reproduce

  1. terraform apply

Important Factoids

Looks like the issue is fixed in some version but not supporting
$ terraform --version
Terraform v0.11.3

  • provider.aws v1.25.0
  • provider.template v1.0.0

References

  • #0000
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. labels Jul 10, 2018
@kl4w
Copy link
Contributor

kl4w commented Jul 17, 2018

@porschberg
Copy link

The same for Terraform v0.11.8 .

@praveenprem
Copy link

I'm seeing the same error for aws_route_tables as well when I used with Data Source.

Terraform Version

Terraform v0.11.8

  • provider.aws v1.25.0
  • provider.external v1.0.0
  • provider.null v1.0.0
  • provider.template v1.0.0

Terrafrom Config

data "aws_route_tables" "aurora_cluster_rtbs" {
  vpc_id = "${var.data_vpc}"

  filter {
    name = "tag:Name"
    values = [ "data-aurora.aurora_subnet" ]
  }
}

Behavior

➜  infrastructure git:(develop) ✗ terraform plan

Error: data.aws_route_tables.aurora_cluster_rtbs: : invalid or unknown key: filter

Is there any workaround for this?

@bflad bflad added this to the v1.44.0 milestone Nov 13, 2018
@bflad
Copy link
Contributor

bflad commented Nov 13, 2018

Hi folks 👋 Very sorry for the lengthy delays with merging this support, there were a few conflicting pull requests to the same code which needed to get sorted out. Good news is that the following will be supported in version 1.44.0 of the AWS provider, likely releasing later today or tomorrow:

  • Search by filter
  • Search by tags
  • EC2-Classic support

@praveenprem it looks like aws_route_tables data source support for filter was added via #5035 which was released in version 1.26.0 of the AWS provider.

@bflad bflad closed this as completed Nov 13, 2018
@ghost
Copy link

ghost commented Apr 2, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

No branches or pull requests

5 participants