fix(setup): each provider workspace uses its own tfvars by default #199

Merged
jfraeys merged 1 commit from jfraeys/fix/workspace-default-var-file into main 2026-10-15 18:05:57 -04:00
Owner

Region, instance type and image are provider-specific, but lived in the vault as TF_VAR_region/_instance_type/_image (Linode values, equal to the root variable defaults) and as defaults. An OVH plan that lost its var-file then asked OVH for ca-central: No suitable endpoint could be found in the service catalog (seen live 2026-10-15). ./setup now passes the workspace's own tfvars by default (default_var_file: linode -> linode/prod.tfvars (new), ovh -> ovh/prod.tfvars, ovh-dr -> ovh/dr.tfvars, linode-dr -> linode/dr.tfvars once copied from the example), also on passthrough plan/apply/destroy/import/console/refresh via with_var_file; an explicit --var-file or -var-file wins; staging workspaces are unchanged. .env.example drops the instance type and image lines. Test: scripts/tests/test-setup-var-file.sh (in lint.yml).

After merge, the operator removes the three redundant vault keys: vault-set.py delete TF_VAR_region TF_VAR_instance_type TF_VAR_image (one at a time), then vault-pr.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ge5tovcwdEUBtPwUktsZZZ

Region, instance type and image are provider-specific, but lived in the vault as TF_VAR_region/_instance_type/_image (Linode values, equal to the root variable defaults) and as defaults. An OVH plan that lost its var-file then asked OVH for `ca-central`: `No suitable endpoint could be found in the service catalog` (seen live 2026-10-15). `./setup` now passes the workspace's own tfvars by default (`default_var_file`: linode -> linode/prod.tfvars (new), ovh -> ovh/prod.tfvars, ovh-dr -> ovh/dr.tfvars, linode-dr -> linode/dr.tfvars once copied from the example), also on passthrough plan/apply/destroy/import/console/refresh via `with_var_file`; an explicit `--var-file` or `-var-file` wins; staging workspaces are unchanged. `.env.example` drops the instance type and image lines. Test: scripts/tests/test-setup-var-file.sh (in lint.yml). After merge, the operator removes the three redundant vault keys: `vault-set.py delete TF_VAR_region TF_VAR_instance_type TF_VAR_image` (one at a time), then vault-pr. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Ge5tovcwdEUBtPwUktsZZZ
fix(setup): each provider workspace uses its own tfvars by default; region/instance type/image leave .env.example
All checks were successful
Lint / lint (pull_request) Successful in 2m38s
Secret scan / scan (pull_request) Successful in 14s
0419ff11a0
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ge5tovcwdEUBtPwUktsZZZ
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfraeys/infra!199
No description provided.