Open louy opened 4 years ago
Thanks for reporting this! I can reproduce the issue with the configuration you provided.
I believe this is a bug in the Terraform Registry. Terraform core intentionally only supports Zip archives, so I believe that the registry should not have ingressed the tarball, and certainly not have provided it as a download URL:
$ curl -s https://registry.terraform.io/v1/providers/louy/uptimerobot/0.5.0/download/linux/amd64 | jq -r .download_url
https://github.com/louy/terraform-provider-uptimerobot/releases/download/v0.5.0/terraform-provider-uptimerobot_0.5.0_linux_amd64.tar.gz
I'm glad you were able to find a workaround! I'm passing this upstream to the Terraform Registry maintainers.
TL;DR: I made a terraform provider with the exact same config suggested (github actions & goreleaser config) except for a minor change: I told goreleaser to create a tar.gz archive as well as a zip one
TF then tried to install the tar.gz and run unzip on it, failing to do so and leaving the user in a broken state where TF thinks the provider is installed but it wasn’t
Terraform Version
Terraform Configuration Files
Debug Output
Fresh setup:
Subsequent tries:
Expected Behavior
Terraform shouldn’t care what else is in the release artifacts
Actual Behavior
Very bad UX. Error seen in logs above
Steps to Reproduce
Create empty folder with config file above, then run
terraform init
Additional Context
Issue was fixed by removing any other archive formats other than zip and re-releasing the provider.