-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Computed map type variable cuts keys short, when key contains dot #19258
Comments
Hi @greg-szabo! Sorry for this weird behavior. Funnily enough, this has actually already been fixed for v0.12.0 in the master branch, and that is actually the reason why your plugin executable didn't work against a build of Terraform from the master branch: fixing this required changes to the provider protocol, which previously would use periods to separate the elements of paths into complex data structures. If you upgrade the vendored copy of Terraform in the template provider to latest master and rebuild the provider you should find that it is compatible and that the issue you encountered is fixed. The alpha2 prerelease builds have builds of certain providers (including Since the fix for this is already in master, I'm going to close this out. If you find other weirdness with the provider protocol once you have the latest Terraform master branch code in both the Regarding the change to the template provider you're working on: returning all the rendered files in outputs might be quite invasive in terms of state file size and might cause problems for people already using this data source, so once you've finished your initial exploration I'd like to talk this through in a github issue in the template provider repository before moving forward to implementation. The |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Terraform Version
Terraform Custom Provider Code
Terraform Config to test custom provider
Debug Output
https://gist.github.com/greg-szabo/9a6393bb35b3e041e96a5dea6d648d93
The debug log is from a bigger custom provider. This custom provider implements template_dir data source for the template provider. (I was planning to submit it when the bugs were all fixed.)
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform init
terraform apply
Additional Context
I was happily finalizing my addition to the template provider (a template_dir data source) to allow slurping in a directory of templates (it would be useful for recursive S3 uploads or multiple config files in a directory) when I realized that my tests are failing. The reason: the rendered map (key = filenames with path ; value = rendered template) is providing the keys without the file extensions (filename: monkey.txt -> rendered["monkey"], instead of rendered["monkey.txt"])
I tried running the binary against a terraform build from master (
0.12.0 dev
) but I guess the provider boilerplate changed because it was complaining thatIncompatible API version with plugin. Plugin version: 4, Client versions: [5]
. I guess the provider libraries will need some updates before 0.12 release. (If I can write a provider against 0.12, please give me some pointers.)I'm happy to dig into the terraform source, if you give some pointers on where the problem could be. Since I only looked at providers yet, I thought I'll ask before I go through everything.
I use Go 1.11.1 on OSX Mojave.
References
It would help resolve hashicorp/terraform-provider-template/issues/34 , hashicorp/terraform-provider-template/issues/37 and most probably it would give a more robust solution than hashicorp/terraform-provider-template/pull/13
The text was updated successfully, but these errors were encountered: