Skip to content

Conversation

@ericgribkoff
Copy link
Contributor

Checklist

Readiness

  • Yes, merge this PR after it is approved
  • No, don't merge this PR after it is approved

Style

Testing

Intended location

  • Yes, this sample will be (or already is) included on cloud.google.com
    Location(s):

  • No, this sample won't be included on cloud.google.com
    Reason:

API enablement

  • If the sample needs an API enabled to pass testing, I have added the service to the Test setup file

Review

  • If this sample adds a new directory, I have added codeowners to the CODEOWNERS file

@ericgribkoff ericgribkoff requested review from a team as code owners November 4, 2024 21:51
@snippet-bot
Copy link

snippet-bot bot commented Nov 4, 2024

Here is the summary of changes.

You are about to add 7 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@glasnt
Copy link
Contributor

glasnt commented Nov 5, 2024

/gcbrun

@glasnt
Copy link
Contributor

glasnt commented Nov 5, 2024

Build failures:

 Unable to remove Service Networking Connection, err: Error waiting for Delete Service Networking Connection: Error code 9, message: Failed to delete connection; Producer services (e.g. CloudSQL, Cloud Memstore, etc.) are still using this connection.

@ericgribkoff
Copy link
Contributor Author

Thanks. Pushed two commits that should address the test failures (destroying google_service_networking_connection resources doesn't seem to play nicely with residual PSA resources, see commit message for more context).

@ericgribkoff
Copy link
Contributor Author

Friendly ping on this

@glasnt
Copy link
Contributor

glasnt commented Nov 21, 2024

/gcbrun

@glasnt
Copy link
Contributor

glasnt commented Nov 21, 2024

/gcbrun

@glasnt
Copy link
Contributor

glasnt commented Nov 21, 2024

New issue:

Error: Error creating IndexEndpointDeployedIndex: googleapi: Error 400: There exists a DeployedIndex with same ID "deployed_index_id" either in failed state or being undeployed at the following IndexEndpoint: projects/189629635876/locations/us-central1/indexEndpoints/4010996427894292480. It will be deleted automatically, please retry again later or use a different ID.

From https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/vertex_ai_index_endpoint_deployed_index#deployed_index_id-1

The ID must be unique within the project it is created in.

Due to CI (currently 4 threads, and this has five samples), all the deployed indexes in this sample must have unique names. I'll update each index to include this.

@glasnt
Copy link
Contributor

glasnt commented Nov 21, 2024

/gcbrun

@ericgribkoff
Copy link
Contributor Author

Thanks @glasnt. The PSC tests in CI were failing with "Error waiting for Creating IndexEndpointDeployedIndex: Error code 5, message: A resource needed to create the ServiceAttachment could not be found: 'ci-tf-samples-2'. Please ensure that all input resources exist." I couldn't replicate this exact error, but the allowlist config was wrong (it should have been project_id). I updated the PR, and confirmed in a fresh GCP project that the PSC examples work. Can you please retrigger the CI? Thanks!

@ericgribkoff
Copy link
Contributor Author

/gcbrun

@ericgribkoff
Copy link
Contributor Author

@msampathkumar Would you be able to trigger the CI build? I don't think I have proper permissions to trigger the cloud build.

@msampathkumar
Copy link
Contributor

/gcbrun

@ericgribkoff
Copy link
Contributor Author

Thanks @msampathkumar ! The CI passed. Can this be merged now?

@ericgribkoff
Copy link
Contributor Author

Friendly ping on this

@glasnt glasnt enabled auto-merge (squash) December 9, 2024 06:00
@glasnt
Copy link
Contributor

glasnt commented Dec 9, 2024

/gcbrun

@glasnt
Copy link
Contributor

glasnt commented Dec 10, 2024

The current error on this for index_endpoint_deploy_vpc:

Error: Error when reading or editing IndexEndpoint: googleapi: Error 400: The IndexEndpoint "projects/[PROJECT]/locations/us-central1/indexEndpoints/[INDEXENDPOINT]" has deployed or being-deployed DeployedIndex(s). Please undeploy all DeployedIndex(s) before deleting the IndexEndpoint.

I'm not sure if this is an eventual consistency issue, as the same resource association (index, endpoint, deployed_index) exists in the index_endpoint_deploy sample (already in the repo).

index_endpoint_deploy_vpc is failing first before index_endpoint_deploy_psc has a chance to finish, and since CI fails early I can't confirm the state of index_endpoint_deploy_psc's tests.

I'm going to re-run the tests again and confirm if it's the same issue.

/gcbrun

@ericgribkoff
Copy link
Contributor Author

The tests passed this time; not sure how to interpret that, as I'm having trouble locating the logs of the earlier failed run. My initial thought then was that the deployed endpoint hadn't been fully deleted when the terraform teardown of the endpoint itself is attempted. This is probably what you were referring to with the eventual consistency possibility mentioned in the last comment, or is that a different possible cause?

@glasnt
Copy link
Contributor

glasnt commented Dec 10, 2024

/gcbrun

@glasnt
Copy link
Contributor

glasnt commented Dec 10, 2024

It's possibly an eventual consistency issue, since the last tests ran. If the current rebased-changes run clean, this sample will be automerged.

@glasnt glasnt merged commit 6aaaf12 into terraform-google-modules:main Dec 10, 2024
5 checks passed
@glasnt
Copy link
Contributor

glasnt commented Dec 10, 2024

@ericgribkoff this has been merged!

niharika-98 pushed a commit to niharika-98/terraform-docs-samples that referenced this pull request Sep 7, 2025
…-google-modules#755)

* feat(vector search): Add examples for mutate, PSC, and VPC

* set PSC allowlist project to name instead of number

* Allow destruction of google_service_networking_connection when residual resources still exist

See hashicorp/terraform-provider-google#18729 and
b/308248337#comment7 for more context

* Make deployed_index_ids unique

* Fix PSC allowlist project ids

---------

Co-authored-by: Katie McLaughlin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants