-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat: terraform autodiscovery #1621
feat: terraform autodiscovery #1621
Conversation
3b0dedf
to
4c601bf
Compare
While this a great PR, I have one important change and a few questions Jsonschema The variable
needs the mapping for Terraform similarly to the other entries, that variable is used to generate the Jsonschema spec which is ultimately used to generate the website documentation and IDE. Default Autodiscovery The variable Platform I did a quick test with the following manifest on https://github.com/jenkins-infra/azure
and it complained about missing platform, I had to use
It's been a while since I had to maintain Terraform and I don't remember the purpose of that platform setting, could it be detected? If not that's ok but then we shouldn't add the terraform plugin to the default list of plugin execute as it will always fail |
AutodiscoverySpecsMapping I'll add that. Default Autodiscovery It can be added, but only if we solve Platform Platform When running An option is provide a sensible default maybe just |
Thanks for the information,
That's what I initially tried but it was confusing because Updatecli reported some changes such as bump version from "1.0.0" to "1.0.0" basically I had to specify the four platforms to show me the correct result. If it's not possible to detect what platform is in used within the lock then I guess the best approach is to not run the terraform autodiscovery by default |
Yeah that would be because the hashes would have been removed for the other platforms, there's probably some additional logging required for when that happens.
Detecting platforms would be expensive as I don't think there's anyway to look up hashes origin without downloading all of the artefacts and cross checking them. Should there be a default added so the empty config works? autodiscovery:
crawlers:
terraform: |
I think I would do something like
|
Also added log message:
|
Thanks for the quick feedback, I just did some testing and it works great |
Thanks @mcwarman for the PR |
@mcwarman I almost forgot but that would be great to have some documentation on https://github.com/updatecli/website/tree/master/content/en/docs/plugins/autodiscovery |
@olblak Added the following:
|
Fix #534
Add terraform autodiscovery support for lock files.
Test
To test this pull request, you can run the following commands:
Additional Information
Tradeoff
Potential improvement
terraform/providers