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

Support Partial Backend Configuration #212

Closed
rodrigorfk opened this issue Nov 16, 2023 · 0 comments · Fixed by #213
Closed

Support Partial Backend Configuration #212

rodrigorfk opened this issue Nov 16, 2023 · 0 comments · Fixed by #213
Labels
enhancement New feature or request needs:triage

Comments

@rodrigorfk
Copy link
Contributor

What problem are you facing?

Currently it's possible to define backend configuration at ProviderConfig level via the configuration field, that definitely works for some use cases, however terraform also support partial backend configuration as documented here, this feature allows module authors to partially define the terraform backend in the module codebase as following:

# backend.tf
terraform {
  backend "s3" {}
}

and then have an extra backend configuration file defining the backend fields as following

# crossplane.remote.tfbackend
encrypt = true
bucket = "some-s3-bucket"
dynamodb_table = "some-dynamodb-table"
key = "terraform.tfstate"
workspace_key_prefix = "some-prexy"
region = "some-aws-region"

The mentioned backend configuration file is then provided as an argument during terraform init as following:

terraform init -backend-config=crossplane.remote.tfbackend ...

How could Official Terraform Provider help solve your problem?

It would be great if the Terraform Provider could support partial backend configuration. This support would enable companies that already have modules written for Partial Backend Configuration to seamlessly transition to using Crossplane without needing to make any changes to their modules. Currently, there's a limitation in using modules with partial backend configuration alongside the existing backend configuration support in the Terraform Provider, if an existing module has a partial backend defined in its codebase, and the ProviderConfig is set up to define the full backend in the configuration as well, the Terraform CLI will encounter an error and abort, the error message will indicate that multiple backends are defined, creating a conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs:triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant