S3 backend and versioning
The S3 backend stores state at a configured bucket and key. The bucket must already exist before backend initialization. Protect access and enable versioning for recovery. Backend credentials should come from supported secure credential mechanisms rather than hardcoded secrets in configuration or copied plan files. For example, an environment uses key dev/network.tfstate in a restricted versioned bucket separate from its managed application bucket.
An environment uses key dev/network.tfstate in a restricted versioned bucket separate from its managed application bucket.
An environment uses key dev/network.tfstate in a restricted versioned bucket separate from its managed application bucket.
Do not overlook this operational distinction: Backend credentials should come from supported secure credential mechanisms rather than hardcoded secrets in configuration or copied plan files.