|
@@ -19,11 +19,22 @@ If this is your first time using this module, remove the `backend.tf` file, then
|
|
|
terraform apply
|
|
|
```
|
|
|
|
|
|
-Save the output as `backend.tf` (replacing the key with a unique string), and run `terraform apply` again to migrate the state of this module back to S3.
|
|
|
+1. Save the output config as `backend.tf`
|
|
|
+1. Edit `backend.tf` and copy the `bucket` name to the `key` name.
|
|
|
+1. Run `terraform init`. Answer YES to whether to copy the backend.tf
|
|
|
+1. If it was successful, run `rm terraform.tfstate*`
|
|
|
+1. Run a final `terraform apply`
|
|
|
|
|
|
-You can use the output again in other projects.
|
|
|
|
|
|
-If you wish to recreate, do _not_ update the config. You must `terraform destroy`, remove `backend.tf`, make changes, then `terraform apply`
|
|
|
+### Later usage
|
|
|
+
|
|
|
+Run `terraform output` to get the config, and copy it as a `backend.tf` in your other projects. Be careful not to reuse the key.
|
|
|
+
|
|
|
+
|
|
|
+### Making Changes
|
|
|
+
|
|
|
+Once you've migrated the backend to s3, you probably do not want to make changes. Do so at your own risk.
|
|
|
+
|
|
|
|
|
|
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
|
|
|
## Requirements
|