Skip to content

Add missing tool types and schema enhancements to google_ces_tool resource#17758

Open
sirohia wants to merge 6 commits into
GoogleCloudPlatform:mainfrom
sirohia:feat-ces-tool
Open

Add missing tool types and schema enhancements to google_ces_tool resource#17758
sirohia wants to merge 6 commits into
GoogleCloudPlatform:mainfrom
sirohia:feat-ces-tool

Conversation

@sirohia
Copy link
Copy Markdown
Contributor

@sirohia sirohia commented May 28, 2026

Add missing tool types and schema enhancements to google_ces_tool

This PR completes the schema coverage for the google_ces_tool resource in Magic Modules to bring it into full parity with the Customer Engagement Suite (CES) REST API. It adds entirely missing customer-managed tool types, exposes read-only platform-managed tool blocks, and resolves several missing attribute gaps in the existing tools.

Documentation

https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/reference/rest/v1/projects.locations.apps.tools#resource:-tool

Technical Details

  • Added Missing Tools:
    • agentTool
    • fileSearchTool
    • widgetTool
  • Exposed Read-Only (Output-Only) Tool Types:
    • remoteAgentTool
    • connectorTool
    • mcpTool
  • Fixed Gaps in Existing Tools:
    • Added promptConfig with custom textPrompt and voicePrompt settings to googleSearchTool.
    • Added dataStoreSource and filterParameterBehavior to dataStoreTool (with mutual exclusivity conflicts: tags configured against engineSource).
    • Added serviceDirectoryConfig to the top-level pythonFunction.
  • Resource Documentation & Note:
    • Added a docs.note block at the top of Tool.yaml detailing the relationship between google_ces_tool and google_ces_toolset.
    • Created 3 new example templates (ces_tool_agent_basic.tf.tmpl, ces_tool_file_search_basic.tf.tmpl, and ces_tool_widget_basic.tf.tmpl) to showcase the new tools.

Verification Results

  • Code generation successful for both GA and Beta.
  • Acceptance tests passed successfully for all newly implemented tools and documentation examples for both GA and beta
ces: added `agent_tool`, `file_search_tool`, and `widget_tool` support to the `google_ces_tool` resource
ces: added `prompt_config` to `google_search_tool` and `data_store_source` to `data_store_tool` in the `google_ces_tool` resource
ces: exposed `remote_agent_tool`, `connector_tool`, and `mcp_tool` as read-only (output-only) attributes in `google_ces_tool`

@github-actions github-actions Bot requested a review from hao-nan-li May 28, 2026 18:46
@github-actions
Copy link
Copy Markdown

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

@hao-nan-li, 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
Copy link
Copy Markdown
Collaborator

modular-magician commented May 28, 2026

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit ee804ff:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 5 files changed, 6652 insertions(+), 2027 deletions(-)
google-beta provider View Diff 5 files changed, 6652 insertions(+), 2027 deletions(-)
terraform-google-conversion View Diff 1 file changed, 951 insertions(+), 14 deletions(-)
Open in Cloud Shell View Diff 12 files changed, 397 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_ces_tool (33 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_ces_tool" "primary" {
  data_store_tool {
    data_store_source {
      data_store {
        name = # value needed
      }
      filter = # value needed
    }
    filter_parameter_behavior = # value needed
  }
  python_function {
    service_directory_config {
      service = # value needed
    }
  }
  widget_tool {
    data_mapping {
      python_function {
        name        = # value needed
        python_code = # value needed
        service_directory_config {
          service = # value needed
        }
      }
      source_tool_name = # value needed
    }
    parameters {
      additional_properties = # value needed
      any_of                = # value needed
      default               = # value needed
      defs                  = # value needed
      description           = # value needed
      enum                  = # value needed
      items                 = # value needed
      max_items             = # value needed
      maximum               = # value needed
      min_items             = # value needed
      minimum               = # value needed
      nullable              = # value needed
      prefix_items          = # value needed
      ref                   = # value needed
      required              = # value needed
      title                 = # value needed
      unique_items          = # value needed
    }
    text_response_config {
      text_response_instruction = # value needed
    }
  }
}

Test report

Analytics

Total Tests Passed Skipped Affected
73 66 0 7
Affected Service Packages
  • ces

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccCESTool_cesToolAgentBasicExample
  • TestAccCESTool_cesToolAgentToolBasicExample_update
  • TestAccCESTool_cesToolFileSearchBasicExample
  • TestAccCESTool_cesToolFileSearchToolBasicExample_update
  • TestAccCESTool_cesToolGoogleSearchToolBasicExample_update
  • TestAccCESTool_cesToolWidgetBasicExample
  • TestAccCESTool_cesToolWidgetToolBasicExample_update

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccCESTool_cesToolAgentBasicExample
✅ Log TestAccCESTool_cesToolAgentToolBasicExample_update
✅ Log TestAccCESTool_cesToolFileSearchBasicExample
✅ Log TestAccCESTool_cesToolFileSearchToolBasicExample_update
✅ Log TestAccCESTool_cesToolGoogleSearchToolBasicExample_update
✅ Log TestAccCESTool_cesToolWidgetBasicExample
✅ Log TestAccCESTool_cesToolWidgetToolBasicExample_update

🟢 All tests passed!

View the recording VCR build log or the debug logs folder for detailed results.

@sirohia, @hao-nan-li VCR tests complete for ee804ff!

@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 28, 2026

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit c8690d4:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 5 files changed, 6648 insertions(+), 2024 deletions(-)
google-beta provider View Diff 5 files changed, 6648 insertions(+), 2024 deletions(-)
terraform-google-conversion View Diff 1 file changed, 951 insertions(+), 14 deletions(-)
Open in Cloud Shell View Diff 12 files changed, 397 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_ces_tool (33 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_ces_tool" "primary" {
  data_store_tool {
    data_store_source {
      data_store {
        name = # value needed
      }
      filter = # value needed
    }
    filter_parameter_behavior = # value needed
  }
  python_function {
    service_directory_config {
      service = # value needed
    }
  }
  widget_tool {
    data_mapping {
      python_function {
        name        = # value needed
        python_code = # value needed
        service_directory_config {
          service = # value needed
        }
      }
      source_tool_name = # value needed
    }
    parameters {
      additional_properties = # value needed
      any_of                = # value needed
      default               = # value needed
      defs                  = # value needed
      description           = # value needed
      enum                  = # value needed
      items                 = # value needed
      max_items             = # value needed
      maximum               = # value needed
      min_items             = # value needed
      minimum               = # value needed
      nullable              = # value needed
      prefix_items          = # value needed
      ref                   = # value needed
      required              = # value needed
      title                 = # value needed
      unique_items          = # value needed
    }
    text_response_config {
      text_response_instruction = # value needed
    }
  }
}

Test report

Analytics

Total Tests Passed Skipped Affected
73 73 0 0
Affected Service Packages
  • ces

Learn how VCR tests work


Step 1: Replaying Mode

🟢 All tests passed in Replaying mode! No Recording was needed.

View the replaying VCR build log

@sirohia, @hao-nan-li VCR tests complete for c8690d4!

@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 28, 2026

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 4688cd2:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 5 files changed, 6825 insertions(+), 2024 deletions(-)
google-beta provider View Diff 5 files changed, 6825 insertions(+), 2024 deletions(-)
terraform-google-conversion View Diff 1 file changed, 951 insertions(+), 14 deletions(-)
Open in Cloud Shell View Diff 12 files changed, 397 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_ces_tool (31 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_ces_tool" "primary" {
  python_function {
    service_directory_config {
      service = # value needed
    }
  }
  widget_tool {
    data_mapping {
      python_function {
        name        = # value needed
        python_code = # value needed
        service_directory_config {
          service = # value needed
        }
      }
      source_tool_name = # value needed
    }
    parameters {
      additional_properties = # value needed
      any_of                = # value needed
      default               = # value needed
      defs                  = # value needed
      description           = # value needed
      enum                  = # value needed
      items                 = # value needed
      max_items             = # value needed
      maximum               = # value needed
      min_items             = # value needed
      minimum               = # value needed
      nullable              = # value needed
      prefix_items          = # value needed
      ref                   = # value needed
      required              = # value needed
      title                 = # value needed
      unique_items          = # value needed
    }
    text_response_config {
      text_response_instruction = # value needed
    }
  }
}

Test report

Analytics

Total Tests Passed Skipped Affected
74 71 0 3
Affected Service Packages
  • ces

Learn how VCR tests work


Step 1: Replaying Mode

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
  • TestAccCESTool_cesToolDataStoreSourceBasicExample_update
  • TestAccCESTool_cesToolPythonFunctionBasicExample_update
  • TestAccCESTool_cesToolWidgetToolBasicExample_update

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccCESTool_cesToolDataStoreSourceBasicExample_update
❌ Error · Log - TestAccCESTool_cesToolPythonFunctionBasicExample_update
❌ Error · Log - TestAccCESTool_cesToolWidgetToolBasicExample_update

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@sirohia, @hao-nan-li VCR tests complete for 4688cd2!

@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 28, 2026

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 5600967:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 5 files changed, 6825 insertions(+), 2024 deletions(-)
google-beta provider View Diff 5 files changed, 6825 insertions(+), 2024 deletions(-)
terraform-google-conversion View Diff 1 file changed, 951 insertions(+), 14 deletions(-)
Open in Cloud Shell View Diff 12 files changed, 397 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
74 72 0 2
Affected Service Packages
  • ces

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccCESTool_cesToolPythonFunctionBasicExample_update
  • TestAccCESTool_cesToolWidgetToolBasicExample_update

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
❌ Error · Log - TestAccCESTool_cesToolPythonFunctionBasicExample_update
❌ Error · Log - TestAccCESTool_cesToolWidgetToolBasicExample_update

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@sirohia, @hao-nan-li VCR tests complete for 5600967!

@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 28, 2026

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 7c119b6:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 5 files changed, 6871 insertions(+), 2028 deletions(-)
google-beta provider View Diff 5 files changed, 6871 insertions(+), 2028 deletions(-)
terraform-google-conversion View Diff 1 file changed, 951 insertions(+), 14 deletions(-)
Open in Cloud Shell View Diff 12 files changed, 397 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
74 72 0 2
Affected Service Packages
  • ces

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccCESTool_cesToolPythonFunctionBasicExample_update
  • TestAccCESTool_cesToolWidgetToolBasicExample_update

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
❌ Error · Log - TestAccCESTool_cesToolPythonFunctionBasicExample_update
❌ Error · Log - TestAccCESTool_cesToolWidgetToolBasicExample_update

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@sirohia, @hao-nan-li VCR tests complete for 7c119b6!

@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 28, 2026

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 12aefac:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 5 files changed, 6867 insertions(+), 2024 deletions(-)
google-beta provider View Diff 5 files changed, 6867 insertions(+), 2024 deletions(-)
terraform-google-conversion View Diff 1 file changed, 951 insertions(+), 14 deletions(-)
Open in Cloud Shell View Diff 12 files changed, 397 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
74 72 0 2
Affected Service Packages
  • ces

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccCESTool_cesToolPythonFunctionBasicExample_update
  • TestAccCESTool_cesToolWidgetToolBasicExample_update

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
❌ Error · Log - TestAccCESTool_cesToolPythonFunctionBasicExample_update
❌ Error · Log - TestAccCESTool_cesToolWidgetToolBasicExample_update

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@sirohia, @hao-nan-li VCR tests complete for 12aefac!

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.

2 participants