-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interpolation Support for URL #11
Comments
Hi @leflamm thanks for opening an issue. What's interesting is that at one point in terraform (I'd guess summer of 2017), this did work since I was using a similar approach. More recently, I know that it does not work, and the only workaround was to hardcode the url endpoint - definitely a bummer. What's interesting is that the current terraform provider docs do say that this type of provider configuration is not supported: https://www.terraform.io/docs/configuration/providers.html#interpolation. Anecdotally, I've definitely seen some issues with using outputs of modules in other resources, e.g.:
Some of the workarounds above might also work in this case. |
Hi @phillbaker thanks for your reply. Seems like I was on the wrong track here. I had a look at the actual output value provider "elasticsearch" {
url = "https://${module.es.endpoint}"
version = "0.5.0"
insecure = true
} ... and this seems to work fine! Thanks + cheers, Christian. |
Pulling in from #111 for reference, this could probably be achieved by applying the underlying module first. E.g.: terraform apply -target=my.elasticsearch.cluster.module
...
terraform apply # entire plan |
Created #119 to address |
Hi,
I'm trying to use this ElasticSearch provider for Terraform.
My ElasticSearch endpoint URL is not static. There's Terraform code responsible for creating the ElasticSearch cluster (AWS ElasticSearch Service) and there's Terraform code responsible for configuring indexes.
So I have a module creating the ES cluster that outputs the cluster's endpoint (
aws_elasticsearch_domain.<name>.endpoint
) that I need to use to configure your ElasticSearch provider.It seems like the variable interpolation doesn't work here. When setting an explicit value (like
https://<blabla>.eu-central-1.es.amazonaws.com
) it works fine. But using a variable (module output in this case) has the same result as an empty string:So my questions are
url
?Cheers + thanks, Christian
The text was updated successfully, but these errors were encountered: