Skip to content

Commit

Permalink
Add optional region field (GoogleCloudPlatform#7770)
Browse files Browse the repository at this point in the history
* Add optional region field

* Add field to example and test
  • Loading branch information
trodge authored and ravisiddhu committed Apr 25, 2023
1 parent 51a6738 commit 02d3e7e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions mmv1/products/vertexai/Endpoint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ parameters:
url_param_only: true
required: true
immutable: true
- !ruby/object:Api::Type::String
name: region
description: The region for the resource
url_param_only: true
immutable: true
properties:
- !ruby/object:Api::Type::String
name: name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ resource "google_vertex_ai_endpoint" "<%= ctx[:primary_resource_id] %>" {
display_name = "sample-endpoint"
description = "A sample vertex endpoint"
location = "us-central1"
region = "us-central1"
labels = {
label-one = "value-one"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestAccVertexAIEndpoint_vertexAiEndpointNetwork(t *testing.T) {
ResourceName: "google_vertex_ai_endpoint.endpoint",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"etag", "location"},
ImportStateVerifyIgnore: []string{"etag", "location", "region"},
},
{
Config: testAccVertexAIEndpoint_vertexAiEndpointNetworkUpdate(context),
Expand All @@ -54,7 +54,7 @@ func TestAccVertexAIEndpoint_vertexAiEndpointNetwork(t *testing.T) {
ResourceName: "google_vertex_ai_endpoint.endpoint",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"etag", "location"},
ImportStateVerifyIgnore: []string{"etag", "location", "region"},
},
},
})
Expand All @@ -67,6 +67,7 @@ resource "google_vertex_ai_endpoint" "endpoint" {
display_name = "sample-endpoint"
description = "A sample vertex endpoint"
location = "us-central1"
region = "us-central1"
labels = {
label-one = "value-one"
}
Expand Down Expand Up @@ -114,6 +115,7 @@ resource "google_vertex_ai_endpoint" "endpoint" {
display_name = "new-sample-endpoint"
description = "An updated sample vertex endpoint"
location = "us-central1"
region = "us-central1"
labels = {
label-two = "value-two"
}
Expand Down

0 comments on commit 02d3e7e

Please sign in to comment.