Skip to content
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

Problem: Terraform Provider Upgrade breaks Semaphore Task #2595

Open
lug-gh opened this issue Nov 28, 2024 · 2 comments
Open

Problem: Terraform Provider Upgrade breaks Semaphore Task #2595

lug-gh opened this issue Nov 28, 2024 · 2 comments
Assignees
Labels

Comments

@lug-gh
Copy link
Contributor

lug-gh commented Nov 28, 2024

Issue

If you raise the version of a provider in your Terraform configuration, semaphore fails with the following error:


│ Error: Failed to query available provider packages
│ Could not retrieve the list of available versions for provider
│ telmate/proxmox: locked provider registry.terraform.io/telmate/proxmox
│ 3.0.1-rc4 does not match configured version constraint 3.0.1-rc6; must use
│ terraform init -upgrade to allow selection of new versions
╵

I can work around this by going into the semaphore container and executing the terraform command manually, but this is not a practical way of working, as updating a terraform provider is an everyday thing.

Additional information

The terraform init -upgrade command should be executable from the web interface, or alternatively not have to be confirmed at all. If I adjust the provider version in my Terraform code, then there is a good reason for this.

@fiftin fiftin self-assigned this Dec 2, 2024
@fiftin fiftin added the bug label Dec 2, 2024
@allancassaro
Copy link

allancassaro commented Dec 5, 2024

I know this is not a solution, but you can workaround this problem adding an environment variable to your execution:

TF_CLI_ARGS_init="-upgrade=true"

This will add the -upgrade switch during the init call.

Hope it helps.

@fiftin
Copy link
Collaborator

fiftin commented Dec 18, 2024

I added flag -upgrade to UI for terraform/opentofu tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants