Skip to content

Commit 03f6620

Browse files
Berro321melinath
andauthored
Correct SecurityGateway to be global only (#12788)
Co-authored-by: Stephen Lewis (Burrows) <[email protected]>
1 parent c11b74b commit 03f6620

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

mmv1/products/beyondcorp/SecurityGateway.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,14 @@ autogen_status: U2VjdXJpdHlHYXRld2F5
4848
parameters:
4949
- name: location
5050
type: String
51-
description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
51+
description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. Must be omitted or set to `global`.
52+
deprecation_message: '`location` is deprecated and will be removed in a future major release.'
5253
immutable: true
5354
url_param_only: true
54-
required: true
55+
default_value: 'global'
56+
validation:
57+
regex: '^global$'
58+
required: false
5559
- name: securityGatewayId
5660
type: String
5761
description: |-
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
resource "google_beyondcorp_security_gateway" "{{$.PrimaryResourceId}}" {
22
security_gateway_id = "{{index $.Vars "security_gateway_name"}}"
3-
location = "global"
43
display_name = "My Security Gateway resource"
54
hubs { region = "us-central1" }
65
}

mmv1/third_party/terraform/services/beyondcorp/resource_beyondcorp_security_gateway_test.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func TestAccBeyondcorpSecurityGateway_beyondcorpSecurityGatewayBasicExample_upda
2727
ResourceName: "google_beyondcorp_security_gateway.example",
2828
ImportState: true,
2929
ImportStateVerify: true,
30-
ImportStateVerifyIgnore: []string{"location", "security_gateway_id"},
30+
ImportStateVerifyIgnore: []string{"security_gateway_id"},
3131
},
3232
{
3333
Config: testAccBeyondcorpSecurityGateway_beyondcorpSecurityGatewayBasicExample_update(context),
@@ -41,7 +41,7 @@ func TestAccBeyondcorpSecurityGateway_beyondcorpSecurityGatewayBasicExample_upda
4141
ResourceName: "google_beyondcorp_security_gateway.example",
4242
ImportState: true,
4343
ImportStateVerify: true,
44-
ImportStateVerifyIgnore: []string{"location", "security_gateway_id"},
44+
ImportStateVerifyIgnore: []string{"security_gateway_id"},
4545
},
4646
},
4747
})
@@ -51,7 +51,6 @@ func testAccBeyondcorpSecurityGateway_beyondcorpSecurityGatewayBasicExample_basi
5151
return acctest.Nprintf(`
5252
resource "google_beyondcorp_security_gateway" "example" {
5353
security_gateway_id = "default%{random_suffix}"
54-
location = "global"
5554
display_name = "My Security Gateway resource"
5655
hubs { region = "us-central1" }
5756
}
@@ -62,7 +61,6 @@ func testAccBeyondcorpSecurityGateway_beyondcorpSecurityGatewayBasicExample_upda
6261
return acctest.Nprintf(`
6362
resource "google_beyondcorp_security_gateway" "example" {
6463
security_gateway_id = "default%{random_suffix}"
65-
location = "global"
6664
display_name = "My Security Gateway resource"
6765
hubs { region = "us-east1" }
6866
}

0 commit comments

Comments
 (0)