padok-team / burrito

🌯 Burrito is a TACoS Kubernetes Operator - "ArgoCD for Terraform"
https://padok-team.github.io/burrito
Apache License 2.0
330 stars 12 forks source link

Support for `plan`/`apply` with .tfvars #377

Open smeelock opened 1 week ago

smeelock commented 1 week ago

Context

Currently, Burrito doesn't support Terraform codebases based on .tfvars. I have a project with the following structure:

layers
├── alb_controller
│   ├── _backend.tf
│   ├── _providers.tf
│   ├── _version.tf
│   ├── production.tfvars
│   ├── staging.tfvars
│   ├── main.tf
│   └── variables.tf
├── api_gateway
│   ├── _backend.tf
│   ├── _providers.tf
│   ├── _version.tf
│   ├── production.tfvars
│   ├── staging.tfvars
│   ├── main.tf
│   └── variables.tf
...

and I would like to run Terraform command terraform plan --var-file production.tfvars and terraform apply --var-file production.tfvars

Request

Add support in Burrito Layer configuration for a .tfvars file

seboudry commented 1 week ago

I use TF_CLI_ARGS and a set of TF_VAR_* to bypass this use case.

https://developer.hashicorp.com/terraform/cli/config/environment-variables#tf_cli_args-and-tf_cli_args_name https://developer.hashicorp.com/terraform/language/values/variables#environment-variables