After bonsai upgrade: error: Configured provider '...
# 🌱|help-and-getting-started
r
After upgrading to bonsai (and changing nothing else at all), I am stuck with this error and cannot deploy at all. I tried deleting the .terraform dir and lock file, and then it got worse. I did a re-init with:
garden tools terraform.terraform-1-2-9 -- -chdir=infra init
And that worked, but garden still will not start with the below error.
Copy code
Error: Configured provider 'terraform' has not been registered.    
at /snapshot/project/tmp/pkg/cli/node_modules/@garden-io/core/src/garden.ts:723:17    
at tryCatcher (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/util.js:16:23)    
at MappingPromiseArray._promiseFulfilled (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/map.js:68:38)    
at MappingPromiseArray.<anonymous> (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/promise_array.js:115:31)    
at MappingPromiseArray.init (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/promise_array.js:79:10)    
at MappingPromiseArray._asyncInit (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/map.js:37:10)    
at _drainQueueStep (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/async.js:97:12)    
at _drainQueue (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/async.js:86:9)    
at Async._drainQueues (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/async.js:102:5)    
at Immediate.<anonymous> (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/async.js:15:14)    
at processImmediate (node:internal/timers:471:21)

Error Details:
name: terraform
availablePlugins:
  - exec
  - container
  - hadolint
  - kubernetes
  - local-kubernetes
  - octant
  - templated
I am unable to use my system at all with bonsai. The ONLY thing that has changed is the version of garden. I will try to downgrade, and I have warned my team not to upgrade. Not a fun surprise for the morning.
b
Oh; this is definitely not the experience we wanted for you guys; I'm going to try to replicate this issue and get back to you to write a formal issue and raise priority as this looks like a regression. Thanks a lot for reporting and I'm so sorry for the issues @rough-kilobyte-44808
r
Happy to help test or whatever as time permits.
c
We use the terraform provider internally as well so it's rather odd that it's in such a broken state for you. We'll look into this asap. @rough-kilobyte-44808 if you could assist with these two it would be a help. 1. How did you update to Bonsai? 2. Could you see if deleting the entire .garden directory helps
r
1. Via homebrew - brew upgrade
2. Did that. Didn't help.
a
sorry to hear about this issue! a couple of thoughts: - do you have a repro you could share, just in case there's something in the configuration files. for example, are you setting the terraform
version
in the provider or module configuration, etc - could you try reinstalling the terraform provider, by deleting
~/.garden/tools/terraform-1-2-9
and running
garden util terraform-1-2-9
- alternatively, we have added terraform
1.4.6
in bonsai, could you maybe try using that instead of
1.2.9
in case it makes a difference? running
garden util terraform-1-4-6
should ensure it exists, or using the
version
field in your garden yaml config - and just in case, could you run
garden --version
to check the installed version, and possibly run
garden self-update
if needed
r
I did delete the .garden dir once, and still got where i am. I've had to downgrade so can't easily test things without a pretty big disruption. here's the provider block for terraform:
Copy code
- name: terraform
    initRoot: ./infra
    workspace: ${environment.name}
    variables: 
      ...
(discord sucks for this)
a
we have implemented a bunch of fixes and finally published releases containing those fixes - sorry for the delay! 🙇‍♂️ https://github.com/garden-io/garden/releases when you get the chance, please try the newest
0.13.1
and let us know if it works
q
Hi @rough-kilobyte-44808 I've tested 13.1 and I'm getting the same errors as you. I've opened an issue at https://github.com/garden-io/garden/issues/4529 feel free to add to it if I've missed anything!
a
ouch, sorry about that 🙇‍♂️ back to the drawing board for further debugging
c
hey @rough-kilobyte-44808, thanks for bringing this up. It should now be fixed via https://github.com/garden-io/garden/pull/4583
r
i'll try again soon. thanks!
3 Views