nf backend validate
Check that the resources of the state backend the settings choose exist.
Synopsis
nf backend validate
Behavior
validate builds the backend the settings choose (see nf backend) and checks,
without changing anything, whether bootstrapping it would create anything. It exits 1 when its
resources are missing, so it can gate a CI job:
- does the state bucket exist?
- is the lock table in place?
- can this machine reach them?
Some backend types report that validation is not implemented (a local backend needs no resources); that is not a failure.
Examples
nf backend validate
nf --backend-type s3 --backend-s3-bucket acme-nf-state --backend-s3-region us-east-1 backend validate