1.5 KiB
1.5 KiB
Terraform Docker Mirror Layer
This directory tracks selected existing Docker containers in Terraform for inventory/documentation purposes.
Purpose
- Mirror specific running containers as Terraform resources.
- Reconcile imported state into maintainable code.
- Produce structured outputs/reminders that support documentation workflows.
Boundary with Docker Compose
Docker Compose + services-up.sh remain runtime composition authority.
Terraform resources here are not the primary day-to-day deployment mechanism for app services.
Current contents
main.tf— import-first workflow notes and minimal scaffolding.searxng-webapp.tf— generated/reconciled example container resource.outputs.tf— documentation-oriented reminders/outputs.terraform.tfvars.example— safe template for local values.
Import/reconciliation workflow
- Start with one existing container.
- Import with
import {}block orterraform import. - Inspect state / generated config.
- Reduce generated attributes to meaningful, stable arguments.
- Keep lifecycle
ignore_changesnarrow and justified. - Iterate until plan is clean for the intended resource.
Guardrails
- Do not attempt to mirror all containers in one pass.
- Do not commit local state or real credentials.
- Treat generated config as draft input that needs review.