Filters: how to

Hello,
where can i read up on the application of “filters”?
In particular, i want to know how can I apply a logical “or” to them. e.g:

data "aws_ami" "AM2" {
  most_recent = true
  filter {
    name   = "name"
    values = ["amzn2-ami-kernel*"]
  } 
}

with the “or”:

data "aws_ami" "AM2" {
  most_recent = true
  
filter {
    name   = "name"
    values = ["amzn2-ami-kernel*"]
  }
"OR"
filter {
    name   = "name"
    values = ["amzn3-ami-kernel*"]
  } 
 }

You are asking about a feature of the aws_ami data source, so you should refer to the documentation of that particular data source.

These filters are not a general Terraform feature.

When you refer to that documentation, you’ll find that it refers you to the AWS documentation, and when you follow that, you’ll find it says:

If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

meaning that AWS doesn’t implement OR logical combination.