The steps to restore backend.tf and migrate state are currently buried in the "First-Time Setup" section, but they need to be performed after the bootstrap runs. Users may miss these steps or be confused about when to run them.
Let's add a new section after "Running the Bootstrap" and before "Outputs".
After Bootstrap Completes
- Restore the backend configuration:
mv backend.tf.disabled backend.tf
- Update
backend.tfto match your bucket name:
nano backend.tf
Change the bucket value to the same name you set in variables.tf, then save.
- Migrate the local state to S3:
terraform init -migrate-state
# or: tofu init -migrate-state
The steps to restore backend.tf and migrate state are currently buried in the "First-Time Setup" section, but they need to be performed after the bootstrap runs. Users may miss these steps or be confused about when to run them.
Let's add a new section after "Running the Bootstrap" and before "Outputs".
## After Bootstrap Completes
1. Restore the backend configuration:
```bash
mv backend.tf.disabled backend.tf
```
2. Update `backend.tf` to match your bucket name:
```bash
nano backend.tf
```
Change the `bucket` value to the same name you set in `variables.tf`, then save.
3. Migrate the local state to S3:
```bash
terraform init -migrate-state
# or: tofu init -migrate-state
```