terraform-google-cloud-storage icon indicating copy to clipboard operation
terraform-google-cloud-storage copied to clipboard

feat: location inverse control in bucket name prefix

Open Tensho opened this issue 3 years ago • 1 comments

Right now the bucket location always appears in the name. It would be nice to have ful control over prefix via respective input variable. Moreover, I'd prefer to have the same for suffix too (there is already example described in example folder). But let's have incremental changes and dedicate this one to location in prefix exclusively.

This change introduces a contract change, ergo it's a breaking change. Major version release is required according to the semver.

Before

module "abc" {
  ...
  location = var.location
  prefix   = var.project_id
  ...
}

You get the location in the bucket name.

After

module "abc" {
  ...
  location = var.location
  prefix     = "${var.project_id}-${var.location}" # Inverse control of prefix value
  ...
}

Tensho avatar Sep 15 '22 13:09 Tensho

@Tensho Thanks for the PR! 🚀
✅ Lint checks have passed.

comment-bot-dev avatar Sep 15 '22 13:09 comment-bot-dev

Could we have this merged please?

Tensho avatar Nov 03 '22 23:11 Tensho

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Jan 03 '23 23:01 github-actions[bot]

@bharathkkb Hey, please could you check this out? PR has was marked as stale and I start to worry this change won't be addressed.

Tensho avatar Jan 03 '23 23:01 Tensho

Thanks for the PR @Tensho. Since this is a breaking change, can you also add an doc here detailing to upgrade to this version? Otherwise LGTM.

g-awmalik avatar Jan 05 '23 17:01 g-awmalik

@g-awmalik Added upgrade doc and rebase everything on the latest upstream master. Let me know if there's anything else you can think of.

Tensho avatar Jan 06 '23 16:01 Tensho

@g-awmalik Added upgrade doc and rebase everything on the latest upstream master. Let me know if there's anything else you can think of.

Sorry I should've been more clear. This change will go in v4.0 so we'll need a new doc upgrading_to_v4.0.md. Secondly, please explain with code snippets what a v3.x user would have to do to make sure they don't see any changes in their tf plan when they run this module with v4.0. Hopefully that gives you better direction.

g-awmalik avatar Jan 06 '23 19:01 g-awmalik

@g-awmalik Done.

Tensho avatar Jan 09 '23 21:01 Tensho

@Tensho Thanks for the PR! 🚀
✅ Lint checks have passed.

comment-bot-dev avatar Jan 18 '23 00:01 comment-bot-dev