Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional region field #14362

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/7770.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
vertexai: added `region` field to `google_vertex_ai_endpoint`
```
6 changes: 6 additions & 0 deletions google/resource_vertex_ai_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ func ResourceVertexAIEndpoint() *schema.Resource {
ForceNew: true,
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.`,
},
"region": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Description: `The region for the resource`,
},
"create_time": {
Type: schema.TypeString,
Computed: true,
Expand Down
6 changes: 4 additions & 2 deletions google/resource_vertex_ai_endpoint_test.go
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
5 changes: 5 additions & 0 deletions website/docs/r/vertex_ai_endpoint.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,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,10 @@ The following arguments are supported:
(Optional)
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.

* `region` -
(Optional)
The region for the resource

* `project` - (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.

Expand Down