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

Allow setting the storage location for google_compute_image resource #6082

Comments

@chrisob
Copy link

chrisob commented Apr 9, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

Currently, the google_compute_image resource doesn't allow setting the location of the image storage (storageLocations in the API).

The image location defaults to us, which is usually fine except when organizations have constraints/conditions in place to prevent using US-based storage 🙂

New or Affected Resource(s)

  • google_compute_image

Potential Terraform Configuration

resource "google_compute_image" "rhcos-image" {
  name = "rhcos-image"
  raw_disk {
    source = "https://storage.googleapis.com/rhcos/rhcos/rhcos-44-81-202003062006-0-gcp-x86-64.tar.gz"
  }
  location = "eu"
}

References

b/221093509

@ghost ghost added the enhancement label Apr 9, 2020
@danawillow danawillow added this to the Goals milestone Apr 13, 2020
@mjlshen
Copy link

mjlshen commented May 21, 2021

Is there a way I can work on this? From my understanding, since this resource is autogenerated any PR I make would be rejected, is this true?

modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Jun 3, 2022
* Adding JSONPath content matching fields.

* Make json_path required if including json_path_matcher

Signed-off-by: Modular Magician <magic-modules@google.com>
modular-magician added a commit that referenced this issue Jun 3, 2022
* Adding JSONPath content matching fields.

* Make json_path required if including json_path_matcher

Signed-off-by: Modular Magician <magic-modules@google.com>
@rosmo
Copy link

rosmo commented Aug 19, 2022

@mjlshen The resource is autogenerated, but you can make the PR against the magic-modules repository.

In this case, adding something like this to mmv1/products/compute/api.yaml under Image objects properties should do the trick:

      - !ruby/object:Api::Type::Array
        name: 'storageLocations'
        description: |
          Cloud Storage bucket storage location of the image (regional or multi-regional).
        item_type: Api::Type::String

@melinath
Copy link
Collaborator

melinath commented Sep 9, 2022

@mjlshen I'm assigning this to a contributor - if you're already working on a fix & nearly complete we can go with that instead.

@melinath
Copy link
Collaborator

melinath commented Sep 9, 2022

ah @c2thorn already beat me to it.

@mjlshen
Copy link

mjlshen commented Sep 9, 2022

I haven't gotten around to it yet, thanks!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.