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

google_compute_instance documentation reports the zone as being required #8027

Closed

Comments

@ferrarimarco
Copy link

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

To date (3.51.0 version of the Google Cloud provider), the documentation reports that the zone is a required parameter. It actually is, but if you don't specify it, the default one you set for the provider gets picked for you.

Other resources that support this behavior have a different description for the zone or region arguments. Here's an example:

(Optional) The region in which the created registry should reside. If it is not provided, the provider region is used.

New or Affected Resource(s)

  • google_compute_instance
@upodroid
Copy link
Contributor

On a sidenote, some resources have zone/region marked as required when it shouldn't be. All resources should infer zone/region from provider and then fail if it is empty.

 REDACTED  MCW0CDP3YY  ~  go  …  github.com  hashicorp  terraform-provider-google-beta   master  19⬇  4✎  $    grep -B 4 "\"region\": {" -r google-beta/*.go  --exclude *_test.go | grep Required
google-beta/data_source_google_compute_vpn_gateway.go-                          Required: true,
google-beta/resource_compute_interconnect_attachment.go-traffic will traverse through. Required if type is DEDICATED, must not
google-beta/resource_compute_region_per_instance_config.go-                             Required:    true,
google-beta/resource_dataflow_flex_template_job.go-                             Required: true,
google-beta/resource_memcache_instance.go-                              Required:    true,
google-beta/resource_vpc_access_connector.go-                           Required:    true,
 REDACTED  MCW0CDP3YY  ~  go  …  github.com  hashicorp  terraform-provider-google-beta   master  19⬇  4✎  $    grep -B 4 "\"zone\": {" -r google-beta/*.go  --exclude *_test.go | grep Required
google-beta/data_source_google_compute_instance_serial_port.go-                         Required: true,
google-beta/resource_bigtable_instance.go-                                                      Required:    true,
google-beta/resource_bigtable_instance_migrate.go-                                                      Required: true,
google-beta/resource_compute_instance_group_named_port.go-                              Required:    true,
google-beta/resource_compute_network_endpoint.go-                               Required:    true,
google-beta/resource_compute_per_instance_config.go-                            Required:    true,
google-beta/resource_dataflow_job.go-                           Required:    true,
google-beta/resource_tpu_node.go-                               Required:    true,

@ghost
Copy link

ghost commented Feb 14, 2021

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Feb 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.