After bonsai upgrade: error: Configured provider 'terraform' has not been registered.


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.
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
  - 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.


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


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


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


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


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
in the provider or module configuration, etc - could you try reinstalling the terraform provider, by deleting
and running
garden util terraform-1-2-9
- alternatively, we have added terraform
in bonsai, could you maybe try using that instead of
in case it makes a difference? running
garden util terraform-1-4-6
should ensure it exists, or using the
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


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:
- name: terraform
    initRoot: ./infra
    workspace: ${}
(discord sucks for this)