Skip to content

Commit 2811ba1

Browse files
Replace use of GetRegionFromSchema and standard field names with use of GetRegion (#12371) (#20430)
[upstream:1a5380a3588f6df2e57f8d8a6df86b6ba457dd76] Signed-off-by: Modular Magician <[email protected]>
1 parent fdf0b3e commit 2811ba1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.changelog/12371.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google/services/artifactregistry/resource_artifact_registry_repository.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2559,7 +2559,7 @@ func expandArtifactRegistryRepositoryEffectiveLabels(v interface{}, d tpgresourc
25592559
func resourceArtifactRegistryRepositoryEncoder(d *schema.ResourceData, meta interface{}, obj map[string]interface{}) (map[string]interface{}, error) {
25602560
config := meta.(*transport_tpg.Config)
25612561
if _, ok := d.GetOk("location"); !ok {
2562-
location, err := tpgresource.GetRegionFromSchema("region", "zone", d, config)
2562+
location, err := tpgresource.GetRegion(d, config)
25632563
if err != nil {
25642564
return nil, fmt.Errorf("Cannot determine location: set in this resource, or set provider-level 'region' or 'zone'.")
25652565
}

0 commit comments

Comments
 (0)