Skip to content

fix(ces): make engine optional in DataStoreTool engineSource#17261

Open
msvechla wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
msvechla:fix/ces-tool-engine-optional
Open

fix(ces): make engine optional in DataStoreTool engineSource#17261
msvechla wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
msvechla:fix/ces-tool-engine-optional

Conversation

@msvechla
Copy link
Copy Markdown

@msvechla msvechla commented Apr 23, 2026

Summary

The engine field inside DataStoreTool.engineSource is currently marked as required: true in the Terraform provider schema. However, the CES API accepts engineSource with only dataStoreSources and no engine specified — in this case CES automatically uses its internally managed engine for the app.

This matches the behavior of creating a data store tool via the CES console UI, which produces an engineSource block with only dataStoreSources and no engine field.

Marking engine as optional (removing required: true) allows users to reference a data store directly without needing to manage a separate Discovery Engine resource, which is the common use case when linking a data store to a CES app via Terraform.

Changes

  • mmv1/products/ces/Tool.yaml: Remove required: true from engine field in DataStoreTool.engineSource

Notes

  • This is a non-breaking change — existing configurations with engine set continue to work unchanged
  • The existing example (ces_tool_data_store_tool_engine_source_basic) still uses engine and remains valid
ces: made `engine` optional in `engine_source` block of `google_ces_tool` `data_store_tool` to allow referencing a data store without specifying an explicit engine

The CES API accepts engineSource.dataStoreSources without specifying
an engine. When engine is omitted, CES automatically uses its
internally managed engine for the app, which is the same behavior
as creating a data store tool via the CES console UI.

This unblocks use cases where users want to reference a data store
directly without managing a separate engine resource.
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Apr 23, 2026
@github-actions github-actions Bot requested a review from BBBmau April 23, 2026 09:19
@github-actions
Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@BBBmau, 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.

@modular-magician modular-magician added service/ces and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Apr 23, 2026
@modular-magician
Copy link
Copy Markdown
Collaborator

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 ( 2 files changed, 8 insertions(+), 8 deletions(-))
google-beta provider: Diff ( 2 files changed, 8 insertions(+), 8 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 51
Passed tests: 48
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • ces

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccCESApp_update
  • TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample
  • TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample_update

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccCESApp_update [Error message] [Debug log]
TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample [Error message] [Debug log]
TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample_update [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@BBBmau
Copy link
Copy Markdown
Collaborator

BBBmau commented Apr 23, 2026

/gcbrun

@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Apr 23, 2026
@modular-magician
Copy link
Copy Markdown
Collaborator

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 ( 2 files changed, 8 insertions(+), 8 deletions(-))
google-beta provider: Diff ( 2 files changed, 8 insertions(+), 8 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 51
Passed tests: 51
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • ces

🟢 All tests passed!

View the build log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants