You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Hashicorp Cloud to store state file. I'd like to review/approve plans with the tofu controller/CLI. The backend for Hashicorp is configured in my Terraform with a section like the one below
backendConfig:
# See: https://github.com/flux-iac/tofu-controller/blob/90ae7db8a627e37ff77409e8a0fbd9227dfd7781/controllers/tf_controller_backend.go#L76
# We pass along an empty configuration so that the TOFU conroller won't override the backend we have configured in our Terraform.
customConfiguration: |
// Empty custom configuration so that backend configuration
// defined in the terraform will be used
This seems to be working as expected.
No action needed. Merely wanted to document this in case other people hit this issue.
The text was updated successfully, but these errors were encountered:
I'm using Hashicorp Cloud to store state file. I'd like to review/approve plans with the tofu controller/CLI. The backend for Hashicorp is configured in my Terraform with a section like the one below
It took me a while to understand how to configure the backend in the Terraform resource.
It looks like the controller will try to define a file "backend_override.tf" with a backend stanza e.g.
That code is here
tofu-controller/controllers/tf_controller_backend.go
Line 76 in 90ae7db
You can disable that by disabling the backendConfig
But then I couldn't find my plan anywhere. It looks like if you disable the backend then a dummy terrraform plan gets saved
tofu-controller/runner/server_save_tfplan.go
Line 21 in 90ae7db
However, it looks like I can use backendCustomConfiguration to avoid disabling the backend while not adding a new backend definition.
tofu-controller/controllers/tf_controller_backend.go
Line 76 in 90ae7db
So I changed my configuration to
This seems to be working as expected.
No action needed. Merely wanted to document this in case other people hit this issue.
The text was updated successfully, but these errors were encountered: