Terraform
Security Commands
State encryption & security
5 commands
Commands
Enable state encryption
$ terraform init -backend-config="encrypt=true"
Initialize backend with encryption enabled (S3).
Replace provider
$ terraform state replace-provider old new
Replace provider reference in state (e.g., after fork).
Force unlock state
$ terraform force-unlock LOCK_ID
Force unlock stuck state (use with extreme caution).
Refresh without lock
$ terraform refresh -lock=false
Refresh state without acquiring state lock.
Custom lock timeout
$ terraform apply -lock-timeout=10m
Set custom timeout for state lock acquisition.