hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.31k stars 1.73k forks source link

add enablePrivateServiceConnect to google_vertex_ai_endpoint #17836

Open imrannayer opened 5 months ago

imrannayer commented 5 months ago

Community Note

Description

add enablePrivateServiceConnect to google_vertex_ai_endpoint

New or Affected Resource(s)

Potential Terraform Configuration

resource "google_vertex_ai_endpoint" "endpoint" {
  name         = "endpoint-name"
  display_name = "sample-endpoint"
  description  = "A sample vertex endpoint"
  location     = "us-central1"
  region       = "us-central1"

  enable_Private_Service_Connect = true

  depends_on   = [
    google_service_networking_connection.vertex_vpc_connection
  ]
}

References

https://cloud.google.com/vertex-ai/docs/general/psc-endpoints

b/334930807

SarahFrench commented 5 months ago

Note prior to the triage later today: the enablePrivateServiceConnect field appears to be deprecated in the API.

imrannayer commented 5 months ago

I am not sure why it is shown deprecated when this is a prefered way of exposing endpoint.

SarahFrench commented 5 months ago

Note from triage: Adding support for deprecated fields isn't usually a blocker for adding provider support, so we're forwarding to the relevant service team. If there's a recommended alternative they'll know

rm-jeremyduplessis commented 1 month ago

Has there been any progress on this?

I notice that while enablePrivateServiceConnect is deprecated in the API, privateServiceConnectConfig is present and appears to be the canonical way to create a PSC endpoint. For example, in Python we can do:

psc_endpoint = aiplatform.PrivateEndpoint.create(
display_name=VERTEX_AI_ENDPOINT_NAME,
project=PROJECT_ID,
location=REGION,
private_service_connect_config=aiplatform.PrivateEndpoint.PrivateServiceConnectConfig(
    project_allowlist=["ALLOWED_PROJECTS"],
    ),
)

I also notice this has been implemented for google_vertex_ai_index_endpoint several months ago - I would be super grateful if this could be prioritised!