https://garden.io logo
#🌱|help-and-getting-started
After bonsai upgrade: error: Configured provider 'terraform' has not been registered.
# 🌱|help-and-getting-started
r

rough-kilobyte-44808

05/25/2023, 4:31 PM
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

bright-policeman-43626

05/25/2023, 8:12 PM
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

rough-kilobyte-44808

05/25/2023, 11:38 PM
Happy to help test or whatever as time permits.
c

calm-family-29323

05/26/2023, 1:45 AM
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

rough-kilobyte-44808

05/26/2023, 3:16 AM
1. Via homebrew - brew upgrade
2. Did that. Didn't help.
a

ancient-diamond-80011

05/26/2023, 3:56 PM
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

rough-kilobyte-44808

05/26/2023, 4:41 PM
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

ancient-diamond-80011

06/06/2023, 12:57 PM
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

quaint-dress-831

06/07/2023, 11:37 AM
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

ancient-diamond-80011

06/07/2023, 11:52 AM
ouch, sorry about that 🙇‍♂️ back to the drawing board for further debugging
c

calm-family-29323

06/09/2023, 12:46 PM
hey @rough-kilobyte-44808, thanks for bringing this up. It should now be fixed via https://github.com/garden-io/garden/pull/4583
r

rough-kilobyte-44808

06/16/2023, 6:49 PM
i'll try again soon. thanks!
3 Views