Selection can be made by state or by filter.
Official example:
data "aws_availability_zones" "example" {
filter {
name = "opt-in-status"
values = ["opt-in-not-required"]
}
}
Related
See also
- AWS Availability Zone (AZ), Terraform:
availability zone
, Data Source: aws_availability_zones
, Single-AZ
, Multi-AZ
- Terraform data sources:
aws_vpc
, template_file
, aws_subnet_ids
, terraform remote state
, aws_eks_cluster
, aws_ami, aws_availability_zones, aws_partition, archive_file