Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage.Bucket incorrectly triggers replacement when using configured dual-region location on each update #868

Closed
robertvanhoesel opened this issue Aug 4, 2022 · 2 comments
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@robertvanhoesel
Copy link

What happened?

Since July 28 2022, Google Cloud Storage made configured dual-region locations generally available.

Configured dual regions are now the preferred way of defining the location. Where previously just 3 presets were available (NAM4, ASIA1, EUR4) user can now configure 2 regions and specify them in the location field using the format of {region}+{region} (e.g. EUROPE-WEST4+EUROPE-WEST1).

The current GCP Provider incorrectly reads the containing multi region (EU, US, etc) instead of the configured dual region, causing a replacement to be scheduled.

Steps to reproduce

Configure a bucket like below, run two subsequent pulumi ups and notice that on every update the bucket gets replaced because it detects a change in location.

new gcp.storage.Bucket( "dual-region-bucket",
    {
        location: "EUROPE-WEST4+EUROPE-WEST1"
    },
);

In the GCP Console you will see the bucket being created using the two regions.

CleanShot 2022-08-04 at 16 27 30@2x

Expected Behavior

No changes to the bucket are detected and no replacement is scheduled.

Actual Behavior

The provider incorrectly reads EU as the location instead of the configuration syntax and schedules a replacement.

   ++gcp:storage/bucket:Bucket: (create-replacement)
      ~ location: "EU" => "EUROPE-WEST4+EUROPE-WEST1"

When using a dual-region preset like EUR4 the everything works as expected.

Versions used

CLI          
Version.  3.37.0
Go Version   go1.17.12
Go Compiler   gc

Plugins
NAME   VERSION
gcp  6.32.0

Host     
OS.  darwin
Version   12.2.1
Arch   arm64

Additional context

Release notes: https://cloud.google.com/storage/docs/release-notes#July_28_2022

Creating a dual region bucket through the GCP Console no longer supports using the presets and forces picking 2 regions.

image

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@robertvanhoesel robertvanhoesel added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Aug 4, 2022
@stack72
Copy link
Contributor

stack72 commented Aug 5, 2022

Hi @robertvanhoesel

We will require this to be upgraded in the TF provider before it makes it's way here - I will look into this

Paul

@stack72 stack72 added awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). and removed needs-triage Needs attention from the triage team labels Aug 5, 2022
@mikhailshilkov mikhailshilkov added the resolution/fixed This issue was fixed label Jan 30, 2023
@mikhailshilkov
Copy link
Member

I believe the dual-region support was added later in GoogleCloudPlatform/magic-modules#6619

This functionality was implemented with the customPlacementConfig property.

I'll go ahead and close the issue as done, please open a new one if anybody struggles with customPlacementConfig usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

3 participants