Closed GeorgeGkinis closed 1 month ago
💚 CLA has been signed
@tobio @gigerdo Could you please take a look at this? I am curious why validators.Known() was needed for ec.endpoint and as such if this is a breaking change. I suppose not, because everyone had to explicitly set ec.endpoint up until now.
Maybe this should be fixed in validators.Known()? If there is a default value the Known validator should always return no problem?
Thanks!
Yes, I think you are right. It should be fine to remove the validation, so it works to use variables in the config.
cc @dimuon
@gigerdo I believe the regression test error is unrelated to my change?
@GeorgeGkinis , looks like it caused by https://github.com/hashicorp/terraform-provider-aws/issues/39676.
@dimuon Should I make another pull request to implement the workaround in providers.tf or should we wait until it is resolved by Hashicorp?
@GeorgeGkinis let's proceed with the workaround. Thanks for the contribution!
@dimuon Maybe try running these test once again? I rebased this branch on top of master with https://github.com/elastic/terraform-provider-ec/pull/867
@dimuon Njoy the weekend!
Thank you @GeorgeGkinis, wishing you a great weekend too!
@dimuon Is there a known release date with this fix? We cannot deploy from our CI/CD until this is released, but we can wait a week or 2.
@GeorgeGkinis , there is no specific date for the new release but I suppose we can release the fix soon.
This removes validators.Known() from the ec.endpoint parameter. This will allow setting ec.endpoint as a variable and prevents an error "Value must be known" during terraform plan
Description
We want to dynamically change the endpoint URL using variables during CI/CD deployments. It is currently not possible because during terraform plan ec.endpoint is not filled with the given variable:
local.auto.tfvars:
The endpoint field is also declared as optional in the code and according to documentation has a default value of "https://api.elastic-cloud.com"
Related Issues
https://github.com/elastic/terraform-provider-ec/issues/869
Motivation and Context
How Has This Been Tested?
Types of Changes
Readiness Checklist