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
Cannot create a consul key/value with an actual empty string #165
Comments
Thanks @rnsc, this is a bug that dates from the time when Apparently the case where a key with an empty value needed to be created had not been considered, #166 should fix this. |
@remilapeyre , thanks for the quick response. |
I'm working on fixing #160 and hope to make a release after that. |
Thanks for the fix! Just wanted to note that I'm still seeing an issue with empty string values in provider version 2.6.1. While the keys are created as expected and all works well if there are no other changes to apply, any keys with empty strings show up in the - key {
- delete = true -> null
- flags = 0 -> null
- path = "configuration/global/env_vars/TO_BE_DELETED" -> null
- value = "foobar" -> null
}
...
- key {
- delete = true -> null
- flags = 0 -> null
- path = "configuration/global/env_vars/UNCHANGED_EMPTY_STRING" -> null
}
+ key {
+ delete = true
+ flags = 0
+ path = "configuration/global/env_vars/UNCHANGED_EMPTY_STRING"
+ value = (known after apply)
} I'm able to reproduce this consistently. Let me know if there's any further information I can provide. |
I can reproduce this too, this is because the In my test, the end result was correct and |
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
Affected Resource(s)
Terraform Configuration Files
The above script is an extract of my Terraform module.
I have multiple other values that are set just fine (those values are not empty).
However, for a specific set of values, it happens that the value can be just empty.
Our tools expect that key to exist after the Terraform deployment, even if it's empty.
Expected Behavior
I was assuming that the key would be created in my KV with an empty string value.
Actual Behavior
The key is not even created as Terraform considers the empty string to be null.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: