terraform-provider-ec
terraform-provider-ec copied to clipboard
Dash in `tags` doesn't match a query for that tag
Readiness Checklist
- [X] I am running the latest version
- [X] I checked the documentation and found no answer
- [X] I checked to make sure that this issue has not already been filed
- [X] I am reporting the issue to the correct repository (for multi-repository projects)
Expected Behavior
Return results for strings in tags that contain a dash -
Current Behavior
## Terraform definition
ec_deployments
Steps to Reproduce
Running
data "ec_deployments" "cross_cluster_sources" {
tags = {
"region" = "us-east-1"
}
}
Context
does not return clusters that contain this in tags.
Possible Solution
Inserting the tags by replacing dashes with underscores and then doing the same when searching for deployments.
data "ec_deployments" "cross_cluster_sources" {
tags = {
"region" = replace(var.region, "-", "_")
}
}
Your Environment
- Version used: 0.7.0
- Running against Elastic Cloud SaaS or Elastic Cloud Enterprise and version: Elastic Cloud
- Environment name and version (e.g. Go 1.9):
- Server type and version:
- Operating System and version:
- Link to your project: