Clean up Terraform: remove duplicate workspace-based config

- Remove root-level main.tf, variables.tf, outputs.tf, versions.tf
  (duplicated the module-based approach)
- Remove duplicate terraform/templates/ directory
- Remove stale terraform.tfvars.example and .terraform.lock.hcl
- Remove outdated scripts/import-production.sh
- Fix non-prod SMTP error by using merge() to completely omit
  SMTP fields instead of setting them to null
- Update README to remove workspace migration section

The environment directories approach (terraform/environments/*) is now
the only supported method.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jjbruntonandClaude Opus 4.5 committed 2026-01-24 21:21:54 +00:00
1 parent 7e2e723880
commit c309fbaa98
14 files changed
+32 -1574

No files matched your search

-26
View File
@@ -167,29 +167,3 @@ For team environments, configure a remote backend in each environment's `version
- Use GitHub Secrets for CI/CD
- OAuth provider credentials are set in Supabase Dashboard, not Terraform
## Migration from Workspace-Based Setup
If you previously used Terraform workspaces, migrate as follows:
1. Export state from old setup:
```bash
cd terraform # old location
terraform workspace select production
terraform state pull > prod.tfstate
terraform workspace select non-production
terraform state pull > non-prod.tfstate
```
2. Import state to new environments:
```bash
cd environments/prod
terraform init
terraform state push ../../prod.tfstate
cd ../non-prod
terraform init
terraform state push ../../non-prod.tfstate
```
3. Verify with `terraform plan` in each environment
4. Delete old workspace-based files from terraform root