hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.36k stars 1.75k forks source link

Replace use of GetRegionFromSchema and standard field names with use of GetRegion #20430

Closed modular-magician closed 21 hours ago

modular-magician commented 21 hours ago

GetRegionFromSchema("region", "zone", d, config) is equivalent to GetRegion(d, config).

In this PR I'm trying to reduce direct usage of GetRegionFromSchema in resources so it's only used by resources who have non-standard location-type fields (for example google_redis_instance's use of location_id).

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

Derived from https://github.com/GoogleCloudPlatform/magic-modules/pull/12371