Skip to content

Commit

Permalink
docs: reflect prefix location optionality in upgrading guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Tensho committed Jan 6, 2023
1 parent 2dd29ce commit f2c9cb9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/upgrading_to_v2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ The v2.0 release of the terraform-google-cloud-storage module is a backwards inc

- The module now uses for_each instead of count.
- The minimum Terraform version was increased to 0.13.
- The bucket doesn't have location as mandatory part of the name prefix.

## Migration Instructions

Expand Down Expand Up @@ -36,6 +37,13 @@ terraform state mv module.cloud_storage.google_storage_bucket.buckets[0] 'module
terraform state mv module.cloud_storage.google_storage_bucket.buckets[1] 'module.cloud_storage.google_storage_bucket.buckets["two"]'
```

Bucket prefix contained `location` before, so to preserve the same bucket name with `location` in prefix you should make some adjustments:

```diff
- prefix = var.project_id
+ prefix ="${var.project_id}-${var.location}"
```

Re-running the plan should show that the storage bucket resources are no longer showing a diff.

```
Expand Down

0 comments on commit f2c9cb9

Please sign in to comment.