Skip to content

Commit fb4f6bc

Browse files
vertexai: add psc_automation_configs argument to google_vertex_ai_endpoint (#15515)
1 parent 19614d1 commit fb4f6bc

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

mmv1/products/vertexai/Endpoint.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ examples:
6565
- name: 'vertex_ai_endpoint_private_service_connect'
6666
primary_resource_id: 'endpoint'
6767
primary_resource_name: 'fmt.Sprintf("endpoint-name%s", context["random_suffix"])'
68+
vars:
69+
network_name: 'psc-network'
6870
- name: 'vertex_ai_endpoint_dedicated_endpoint'
6971
primary_resource_id: 'endpoint'
7072
primary_resource_name: 'fmt.Sprintf("endpoint-name%s", context["random_suffix"])'
@@ -462,6 +464,48 @@ properties:
462464
type: Boolean
463465
description:
464466
'If set to true, enable secure private service connect with IAM authorization. Otherwise, private service connect will be done without authorization. Note latency will be slightly increased if authorization is enabled.'
467+
- name: 'pscAutomationConfigs'
468+
type: Array
469+
description:
470+
'List of projects and networks where the PSC endpoints will be created. This field is used by Online Inference(Prediction) only.'
471+
item_type:
472+
type: NestedObject
473+
description:
474+
'PSC config that is used to automatically create PSC endpoints in the user projects.'
475+
properties:
476+
- name: 'projectId'
477+
type: String
478+
required: true
479+
description:
480+
'Project id used to create forwarding rule.'
481+
- name: 'network'
482+
type: String
483+
required: true
484+
description:
485+
'The full name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get): projects/{project}/global/networks/{network}.'
486+
- name: 'ipAddress'
487+
type: String
488+
output: true
489+
description:
490+
'IP address rule created by the PSC service automation.'
491+
- name: 'forwardingRule'
492+
type: String
493+
output: true
494+
description:
495+
'Forwarding rule created by the PSC service automation.'
496+
- name: 'state'
497+
type: Enum
498+
output: true
499+
description:
500+
'The state of the PSC service automation.'
501+
enum_values:
502+
- PSC_AUTOMATION_STATE_FAILED
503+
- PSC_AUTOMATION_STATE_SUCCESSFUL
504+
- name: 'errorMessage'
505+
type: String
506+
output: true
507+
description:
508+
'Error message if the PSC service automation failed.'
465509
- name: 'modelDeploymentMonitoringJob'
466510
type: String
467511
description:

mmv1/templates/terraform/examples/vertex_ai_endpoint_private_service_connect.tf.tmpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
resource "google_compute_network" "default" {
2+
name = "{{index $.Vars "network_name"}}-%{random_suffix}"
3+
}
4+
15
resource "google_vertex_ai_endpoint" "{{$.PrimaryResourceId}}" {
26
name = "endpoint-name%{random_suffix}"
37
display_name = "sample-endpoint"
@@ -12,6 +16,11 @@ resource "google_vertex_ai_endpoint" "{{$.PrimaryResourceId}}" {
1216
project_allowlist = [
1317
"${data.google_project.project.project_id}"
1418
]
19+
20+
psc_automation_configs {
21+
project_id = data.google_project.project.project_id
22+
network = google_compute_network.default.id
23+
}
1524
}
1625
}
1726

0 commit comments

Comments
 (0)