Harden generated config temp path creation
This commit is contained in:
@@ -31,6 +31,22 @@ Current intent:
|
||||
3. Add Proxmox inventory/configuration scaffolding and imports later.
|
||||
4. Introduce Ansible workflow after Terraform-managed inventory is trustworthy.
|
||||
|
||||
|
||||
## Plan-to-config helper script
|
||||
|
||||
Use `scripts/reconcile_from_plan.sh` to automate Terraform configuration generation from `terraform plan` output (via Terraform's `-generate-config-out`).
|
||||
|
||||
From a Terraform module directory (for example `infrastructure/terraform/docker`):
|
||||
|
||||
```bash
|
||||
../../scripts/reconcile_from_plan.sh --output-file zz_generated_from_plan.auto.tf
|
||||
```
|
||||
|
||||
Notes:
|
||||
- Best used with an import-first workflow that already contains `import {}` blocks.
|
||||
- The script writes generated config into a `.auto.tf` file and runs `terraform fmt` on it.
|
||||
- Always review generated arguments before apply.
|
||||
|
||||
## Safety notes
|
||||
|
||||
- State files are intentionally gitignored for safety and portability.
|
||||
|
||||
Reference in New Issue
Block a user