According to the official documentation, you can either specify a "valid" version (but which could become invalid when the version is no longer available) or a "regex" for the version that can match a whole minor release list. ec_stack | Data Sources | elastic/ec | Terraform Registry
In your case,
data "ec_stack" "latest" {
version_regex = "8.2.?"
region = var.region
}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.