Skip to content

[Enhancement]: d/aws_ami: Upgrade warning diagnostic to a suppressible error #40198

Closed
@jar-b

Description

@jar-b

Description

#40197 documented the use case for a warning diagnostic on the aws_ami data source to notify practitioners of certain cases when filtering criteria are missing. In v6.0.0 of the AWS provider, this warning diagnostic should be changed to an error diagnostic which can be suppressed by setting a new, optional argument ignore_missing_filter_error (naming TBD).

Affected Resource(s) and/or Data Source(s)

  • aws_ami

Potential Terraform Configuration

# Example affected configuration
#
# - most_recent is true
# - owners is not set
# - there are no filters on owner-id or image-id
data "aws_ami" "test" {
  most_recent = true

  filter {
    name   = "architecture"
    values = ["x86_64"]
  }

  filter {
    name   = "name"
    values = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"]
  }
  
  # This argument will allow the data source to continue to be used with
  # the same filters prior to this change
  ignore_missing_filter_error = true
}

References

Relates #40197
Relates #14158
Relates #25566
Relates #25521

Would you like to implement a fix?

Yes

Metadata

Metadata

Assignees

Labels

breaking-changeIntroduces a breaking change in current functionality; usually deferred to the next major release.enhancementRequests to existing resources that expand the functionality or scope.service/ec2Issues and PRs that pertain to the ec2 service.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions