delightful-table-96636
02/28/2024, 5:08 PM- root
|- > environment
| - > dev.tfvars
| - > prod.tfvars
|-> *.tf
To islolate this in state, I'm using workspaces (without cloud), and I am using the Github action.
However, I cannot for the life of me, get the infracost to pick up the workspace and use the correct tfvars as needed based on the workspace name..
Any advice or examples? I've done a lot of googling and either no one is doing this, its really simple or im doing something stupid and why would any one?mysterious-teacher-68276
02/28/2024, 5:12 PMmysterious-teacher-68276
02/28/2024, 5:13 PMinfracost generate config
look like when you run it in the root of your repodelightful-table-96636
02/28/2024, 7:34 PMversion: 0.1
projects:
- path: .
name: main-production
terraform_var_files:
- production/production.tfvars
skip_autodetect: true
- path: .
name: main-staging
terraform_var_files:
- staging/staging.tfvars
skip_autodetect: true
So the generate has picked up the required tfvars, would I just add this to the config in the root of the folder ; what about workspaces or are they not really needed in this contextmysterious-teacher-68276
02/28/2024, 7:54 PMdiff/breakdown
commands (run in the root of your repo) will autodetect the same projects (main/staging).delightful-table-96636
02/28/2024, 7:58 PM