vertexai: add `psc_automation_configs` to resource `google_vertex_ai_index_endpoint` [WIP]
Closes https://github.com/hashicorp/terraform-provider-google/issues/25032
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.
vertexai: add `psc_automation_configs` to resource `google_vertex_ai_index_endpoint`
Updated to Ready for review to see the test results in CI.
Hello! I am a robot. Tests will require approval from a repository maintainer to run.
Googlers: For automatic test runs see go/terraform-auto-test-runs.
@slevenick, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.
You can help make sure that review is quick by doing a self-review and by running impacted tests locally.
@slevenick This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google provider: Diff ( 4 files changed, 234 insertions(+))
google-beta provider: Diff ( 4 files changed, 234 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 91 insertions(+))
Non-exercised tests
🔴 Tests were added that are skipped in VCR:
- TestAccVertexAIIndexEndpoint_psc_automation_config
Tests analytics
Total tests: 79 Passed tests: 75 Skipped tests: 4 Affected tests: 0
Click here to see the affected service packages
- vertexai
🟢 All tests passed!
View the build log
The following files are not formatted properly: mmv1/third_party/terraform/services/vertexai/resource_vertex_ai_index_endpoint_test.go
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google provider: Diff ( 4 files changed, 233 insertions(+))
google-beta provider: Diff ( 4 files changed, 233 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 91 insertions(+))
Tests analytics
Total tests: 79 Passed tests: 75 Skipped tests: 3 Affected tests: 1
Click here to see the affected service packages
- vertexai
Action taken
Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
- TestAccVertexAIIndexEndpoint_psc_automation_config
🔴 Tests failed during RECORDING mode:
TestAccVertexAIIndexEndpoint_psc_automation_config [Error message] [Debug log]
🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.
Do you know what's going on with the psc config here? It looks like it's not being read from the API in the normal way
error: ~ private_service_connect_config { # (2 unchanged attributes hidden)
+ psc_automation_configs { + network = "projects/project-id/global/networks/tf-test-network-ngg93yhol8" + project_id = "projects/project-id" } }
The initial POST looks good, but indeed these attributes seems to be missing in the GET.
POST
---[ REQUEST ]---------------------------------------
POST /v1/projects/masked/locations/us-central1/indexEndpoints?alt=json HTTP/1.1
Host: us-central1-aiplatform.googleapis.com
User-Agent: Terraform/1.13.5 (+https://www.terraform.io) Terraform-Plugin-SDK/2.37.0 terraform-provider-google/acc
Content-Length: 423
Content-Type: application/json
Accept-Encoding: gzip
{
"description": "A sample vertex endpoint",
"displayName": "tf-test-sample-endpoint-9irfyzah77",
"labels": {
"goog-terraform-provisioned": "true",
"label-one": "value-one"
},
"privateServiceConnectConfig": {
"enablePrivateServiceConnect": true,
"projectAllowlist": [
"masked"
],
"pscAutomationConfigs": [
{
"network": "projects/masked/global/networks/tf-test-network-9irfyzah77",
"projectId": "projects/masked"
}
]
}
}
GET
---[ REQUEST ]---------------------------------------
GET /v1/projects/masked/locations/us-central1/indexEndpoints/5188061008823844864?alt=json HTTP/1.1
Host: us-central1-aiplatform.googleapis.com
User-Agent: Terraform/1.13.5 (+https://www.terraform.io) Terraform-Plugin-SDK/2.37.0 terraform-provider-google/acc
Content-Type: application/json
Accept-Encoding: gzip
-----------------------------------------------------
2025/11/17 08:44:13 [DEBUG] Google API Response Details:
---[ RESPONSE ]--------------------------------------
HTTP/2.0 200 OK
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Type: application/json; charset=UTF-8
Date: Mon, 17 Nov 2025 07:44:13 GMT
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0
{
"name": "projects/masked/locations/us-central1/indexEndpoints/5188061008823844864",
"displayName": "tf-test-sample-endpoint-9irfyzah77",
"description": "A sample vertex endpoint",
"etag": "AMEw9yNng-zkaebEE_VCibN9rkdq2Z4wGYuhSEznDVmb1pP2OgJ-m9o61foul7dDOvor",
"labels": {
"goog-terraform-provisioned": "true",
"label-one": "value-one"
},
"createTime": "2025-11-17T07:44:02.620460Z",
"updateTime": "2025-11-17T07:44:03.408605Z",
"privateServiceConnectConfig": {
"enablePrivateServiceConnect": true,
"projectAllowlist": [
"masked"
]
},
"encryptionSpec": {}
}
I have the feeling this might be a bug in the endpoint?
I could add ignore_read: true, but that feels more like a workaround than a propper fix. Ideally the API just returns the value for pscAutomationConfigs.
@slevenick This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.
Yeah it would definitely be better if the API returned that value! I can ask their team about it. Ignore read would work, but I'm always wary of that because you can't tell if the feature is actually working!
Check, let's see how they respond. If there is more urgency on the feature we can always go with ignore_read and do additional manual testing.
@slevenick This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.
@GoogleCloudPlatform/terraform-team @slevenick This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.
@GoogleCloudPlatform/terraform-team @slevenick This PR has been waiting for review for 2 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.
@GoogleCloudPlatform/terraform-team @slevenick This PR has been waiting for review for 3 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.
I think lets go with ignore_read at this point
Because the fields were already subject to a custom_flatten I added the ignore_read logic via that custom_flatten in https://github.com/GoogleCloudPlatform/magic-modules/pull/15636/commits/95958e12a3d142958287b6e89f6ba758f24f5746 and reran the tests:
➜ make testacc TEST=./google/services/vertexai TESTARGS='-run=TestAccVertexAIIndexEndpoint_psc_automation_config'
sh -c "'/Users/ramon/go/src/github.com/hashicorp/terraform-provider-google/scripts/gofmtcheck.sh'"
==> Checking that code complies with gofmt requirements...
go vet
TF_ACC_REFRESH_AFTER_APPLY=1 TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google/services/vertexai -v -run=TestAccVertexAIIndexEndpoint_psc_automation_config -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google/version.ProviderVersion=acc"
=== RUN TestAccVertexAIIndexEndpoint_psc_automation_config
=== PAUSE TestAccVertexAIIndexEndpoint_psc_automation_config
=== CONT TestAccVertexAIIndexEndpoint_psc_automation_config
--- PASS: TestAccVertexAIIndexEndpoint_psc_automation_config (123.80s)
PASS
ok github.com/hashicorp/terraform-provider-google/google/services/vertexai (cached)
I also removed the computed fields, because if the whole pscAutomationConfigs is never returned by the API, we cannot provide these fields client-side.
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google provider: Diff ( 4 files changed, 150 insertions(+))
google-beta provider: Diff ( 4 files changed, 150 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 47 insertions(+))
Tests analytics
Total tests: 81 Passed tests: 77 Skipped tests: 3 Affected tests: 1
Click here to see the affected service packages
- vertexai
Action taken
Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
- TestAccVertexAIIndexEndpoint_psc_automation_config