Why local state fails for a team
- No sharing. A teammate’s
plan/previewcan’t see your local state file, so it doesn’t know what already exists. - No locking. Two people running
apply/upat the same moment can corrupt state or double-create resources. - No history. Nothing records who ran what, or lets you roll back to a previous state snapshot.
- No durability. One lost laptop is one lost source of truth.
Terraform: remote backends
Recommended for beginners heading to production: Terraform Cloud (HCP Terraform). It’s free for small teams, stores state remotely, locks automatically, and keeps a run history.tags, not name, if you want this to keep working with the terraform workspace new/select pattern from the environments tutorial: name pins the configuration to exactly one HCP Terraform workspace, so there’s nothing left for terraform workspace new to switch between. With tags, each local CLI workspace maps to its own matching HCP Terraform workspace instead.
Run terraform login once, then terraform init migrates any existing local state into the cloud workspace automatically.
Advanced: a self-hosted S3-compatible backend
Advanced: a self-hosted S3-compatible backend
Terraform’s
backend "s3" block works against any S3-compatible endpoint, not just AWS. Biznet GIO’s own NEO Object Storage is S3-compatible, so it’s possible to point state at a bucket you provisioned with biznetgio_object_storage and biznetgio_object_storage_bucket:Pulumi: state backends
The default is Pulumi Cloud, and it’s what the quickstart already used without any extra configuration; runningpulumi login with no arguments logs in there. It stores state, locks automatically, keeps history, and manages secret encryption for you. The free tier covers small teams.
Advanced: self-hosted backends
Advanced: self-hosted backends
Pulumi can also store state in a local folder or an S3-compatible bucket, useful if you want to keep state entirely off Pulumi Cloud:Self-managed backends also need a passphrase for secret encryption instead of Pulumi Cloud’s managed key:Losing that passphrase means losing the ability to decrypt secret config values; the stack can still be updated, but you can’t read secrets back out of it.
Moving state between backends
Both tools can export and re-import a snapshot, which is how you migrate without starting over:The one rule that matters more than which backend you pick
Never hand-edit a state file. If state and reality disagree, fix it withterraform import / pulumi import, or by adjusting your configuration to match reality, not by opening the JSON. And whichever backend you land on, always run plan/preview before apply/up, so someone sees the diff before it becomes real, which is exactly what the CI/CD tutorial automates.
Next steps
- Manage secrets the right way - get your API token into that shared backend and into CI safely