Skip to content

Commit fa6c8b2

Browse files
Add optional region field (#7770) (#14362)
* Add optional region field * Add field to example and test Signed-off-by: Modular Magician <[email protected]>
1 parent 1f0fe47 commit fa6c8b2

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

.changelog/7770.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
vertexai: added `region` field to `google_vertex_ai_endpoint`
3+
```

google/resource_vertex_ai_endpoint.go

+6
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ func ResourceVertexAIEndpoint() *schema.Resource {
9393
ForceNew: true,
9494
Description: `The full name of the Google Compute Engine [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks) to which the Endpoint should be peered. Private services access must already be configured for the network. If left unspecified, the Endpoint is not peered with any network. Only one of the fields, network or enable_private_service_connect, can be set. [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert): 'projects/{project}/global/networks/{network}'. Where '{project}' is a project number, as in '12345', and '{network}' is network name.`,
9595
},
96+
"region": {
97+
Type: schema.TypeString,
98+
Optional: true,
99+
ForceNew: true,
100+
Description: `The region for the resource`,
101+
},
96102
"create_time": {
97103
Type: schema.TypeString,
98104
Computed: true,

google/resource_vertex_ai_endpoint_test.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func TestAccVertexAIEndpoint_vertexAiEndpointNetwork(t *testing.T) {
4545
ResourceName: "google_vertex_ai_endpoint.endpoint",
4646
ImportState: true,
4747
ImportStateVerify: true,
48-
ImportStateVerifyIgnore: []string{"etag", "location"},
48+
ImportStateVerifyIgnore: []string{"etag", "location", "region"},
4949
},
5050
{
5151
Config: testAccVertexAIEndpoint_vertexAiEndpointNetworkUpdate(context),
@@ -54,7 +54,7 @@ func TestAccVertexAIEndpoint_vertexAiEndpointNetwork(t *testing.T) {
5454
ResourceName: "google_vertex_ai_endpoint.endpoint",
5555
ImportState: true,
5656
ImportStateVerify: true,
57-
ImportStateVerifyIgnore: []string{"etag", "location"},
57+
ImportStateVerifyIgnore: []string{"etag", "location", "region"},
5858
},
5959
},
6060
})
@@ -67,6 +67,7 @@ resource "google_vertex_ai_endpoint" "endpoint" {
6767
display_name = "sample-endpoint"
6868
description = "A sample vertex endpoint"
6969
location = "us-central1"
70+
region = "us-central1"
7071
labels = {
7172
label-one = "value-one"
7273
}
@@ -114,6 +115,7 @@ resource "google_vertex_ai_endpoint" "endpoint" {
114115
display_name = "new-sample-endpoint"
115116
description = "An updated sample vertex endpoint"
116117
location = "us-central1"
118+
region = "us-central1"
117119
labels = {
118120
label-two = "value-two"
119121
}

website/docs/r/vertex_ai_endpoint.html.markdown

+5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ resource "google_vertex_ai_endpoint" "endpoint" {
3737
display_name = "sample-endpoint"
3838
description = "A sample vertex endpoint"
3939
location = "us-central1"
40+
region = "us-central1"
4041
labels = {
4142
label-one = "value-one"
4243
}
@@ -114,6 +115,10 @@ The following arguments are supported:
114115
(Optional)
115116
The full name of the Google Compute Engine [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks) to which the Endpoint should be peered. Private services access must already be configured for the network. If left unspecified, the Endpoint is not peered with any network. Only one of the fields, network or enable_private_service_connect, can be set. [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert): `projects/{project}/global/networks/{network}`. Where `{project}` is a project number, as in `12345`, and `{network}` is network name.
116117

118+
* `region` -
119+
(Optional)
120+
The region for the resource
121+
117122
* `project` - (Optional) The ID of the project in which the resource belongs.
118123
If it is not provided, the provider project is used.
119124

0 commit comments

Comments
 (0)