Skip to content

feat(discoveryengine): add action, BAP, and destination config support to google_discovery_engine_data_connector#16290

Merged
trodge merged 2 commits intoGoogleCloudPlatform:mainfrom
phillipweston:main
Feb 27, 2026
Merged

feat(discoveryengine): add action, BAP, and destination config support to google_discovery_engine_data_connector#16290
trodge merged 2 commits intoGoogleCloudPlatform:mainfrom
phillipweston:main

Conversation

@phillipweston
Copy link
Copy Markdown
Contributor

@phillipweston phillipweston commented Feb 3, 2026

Adds the missing API surface for Gemini Enterprise / Agentspace data connectors to google_discovery_engine_data_connector, enabling full configuration of action connectors, BAP settings, destination routing, and data source versioning.

New fields

action_config block

Configures action capabilities for connectors using the ACTIONS connector mode (e.g. Jira actions).

  • action_params (map, write-only) — connection credentials and configuration (instance URI, client ID, client secret, auth type)
  • is_action_configured (bool, computed) — whether the action connector is fully configured
  • create_bap_connection (bool, write-only) — whether to create a BAP connection

bap_config block

Controls which actions are enabled for connectors using the ACTIONS connector mode.

  • enabled_actions (list of strings) — actions to enable, e.g. create_issue, update_issue, change_issue_status, create_comment, update_comment, upload_attachment
  • supported_connector_modes (list of strings) — connector modes for the BAP configuration, e.g. ACTIONS

destination_configs block

Configures where data is served for the connector.

  • key (string) — destination config key, e.g. url
  • destinations — list of destination objects, each with a host (string)

data_source_version (integer)

Specifies the version of the data source, e.g. 3 for Jira v3.

Example usage

resource "google_discovery_engine_data_connector" "jira" {
  location                = "global"
  collection_id           = "jira-collection"
  collection_display_name = "Jira Federated"
  data_source             = "jira"
  data_source_version     = 3

  params = {
    instance_uri  = "https://your-instance.atlassian.net"
    instance_id   = "projects/.../secrets/instance_id/versions/latest"
    client_id     = "projects/.../secrets/client_id/versions/latest"
    client_secret = "projects/.../secrets/client_secret/versions/latest"
    refresh_token = "projects/.../secrets/refresh_token/versions/latest"
    auth_type     = "OAUTH"
  }

  refresh_interval = "86400s"
  connector_modes  = ["FEDERATED", "ACTIONS"]

  entities { entity_name = "project" }
  entities { entity_name = "issue" }
  entities { entity_name = "comment" }
  entities { entity_name = "attachment" }

  destination_configs {
    key = "url"
    destinations {
      host = "https://your-instance.atlassian.net"
    }
  }

  action_config {
    action_params = {
      instance_uri  = "https://your-instance.atlassian.net"
      instance_id   = "projects/.../secrets/instance_id/versions/latest"
      client_id     = "projects/.../secrets/client_id/versions/latest"
      client_secret = "projects/.../secrets/client_secret/versions/latest"
      auth_type     = "OAUTH"
    }
    create_bap_connection = true
  }

  bap_config {
    supported_connector_modes = ["ACTIONS"]
    enabled_actions = [
      "create_issue",
      "update_issue",
      "change_issue_status",
      "create_comment",
      "update_comment",
      "upload_attachment",
    ]
  }
}

Changes

  • mmv1/products/discoveryengine/DataConnector.yaml — added actionConfig, bapConfig, destinationConfigs, and dataSourceVersion property definitions
  • mmv1/templates/terraform/examples/discoveryengine_dataconnector_jira_with_actions.tf.tmpl — new Jira example demonstrating all new fields
  • mmv1/templates/terraform/state_migrations/discovery_engine_data_connector.go.tmpl — added new fields to v0 schema for state migration compatibility
  • mmv1/third_party/terraform/services/discoveryengine/resource_discovery_engine_data_connector_test.go — updated acceptance tests with all new fields
discoveryengine: added `action_config`, `bap_config`, `destination_configs`, and `data_source_version` to `google_discovery_engine_data_connector` resource (beta)

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Feb 3, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Feb 3, 2026
@github-actions github-actions Bot requested a review from trodge February 3, 2026 22:06
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 3, 2026

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.

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

@phillipweston phillipweston force-pushed the main branch 2 times, most recently from 2b0006a to 51c9466 Compare February 3, 2026 23:16
@phillipweston
Copy link
Copy Markdown
Contributor Author

phillipweston commented Feb 3, 2026

This PR is necessary in order to support Gemini Enterprise's new way of handling Actions (write operations). It is my first PR into this repository, so I'm open to any suggestions and willing to do whatever is necessary to get it over the finish line. Thank you!

This is the payload that the API expects:

{
  "collectionId": "jira-federated_1770130797837",
  "collectionDisplayName": "Jira Federated",
  "dataConnector": {
    "dataSource": "jira",
    "params": {
      "instance_uri": "https://your-instance.atlassian.net",
      "instance_id": "unused",
      "client_id": "unused",
      "client_secret": "unused",
      "refresh_token": "unused",
      "auth_type": "OAUTH"
    },
    "refreshInterval": "86400s",
    "incrementalSyncDisabled": true,
    "autoRunDisabled": true,
    "entities": [
      {
        "entityName": "project",
        "params": { "inclusion_filters": {}, "exclusion_filters": {} }
      },
      { "entityName": "attachment" },
      { "entityName": "comment" },
      { "entityName": "issue" },
      { "entityName": "bug" },
      { "entityName": "epic" },
      { "entityName": "story" },
      { "entityName": "task" },
      { "entityName": "worklog" },
      { "entityName": "board" }
    ],
    "dataSourceVersion": 3,
    "destinationConfigs": [
      {
        "key": "url",
        "destinations": [{ "host": "https://phillipweston.atlassian.net" }]
      }
    ],
    "staticIpEnabled": false,
    "actionConfig": {
      "actionParams": {
        "instance_uri": "https://phillipweston.atlassian.net",
        "client_id": "...",
        "client_secret": "...",
        "instance_id": "7d1727f0-e98f-4f00-97e5-743b24491dba",
        "auth_type": "OAUTH"
      },
      "createBapConnection": true,
      "isActionConfigured": true
    },
    "bapConfig": {
      "supportedConnectorModes": ["ACTIONS"],
      "enabledActions": [
        "create_issue",
        "update_issue",
        "change_issue_status",
        "create_comment",
        "update_comment",
        "upload_attachment"
      ]
    },
    "connectorModes": ["FEDERATED", "ACTIONS"]
  }
}

… `google_discovery_engine_data_connector`

Adds new API surface to support the ACTIONS connector mode:

- `action_config` block with:
  - `action_params` (KeyValuePairs, ignore_read) — credentials and
    configuration for the action connector
  - `is_action_configured` (computed) — whether the action connector
    is fully configured
  - `create_bap_connection` (bool, ignore_read) — whether to create
    a BAP connection

- `bap_config` block with:
  - `enabled_actions` (list of strings) — which actions to enable,
    e.g. create_issue, update_issue, change_issue_status
  - `supported_connector_modes` (list of strings) — connector modes
    for the BAP configuration, e.g. ACTIONS

Also adds:
- Jira example template demonstrating action_config and bap_config
- Updated state migration v0 schema for compatibility
- Updated acceptance tests with action_config and bap_config coverage
@phillipweston phillipweston changed the title feat(discoveryengine): add action_config block to google_discovery_engine_data_connector feat(discoveryengine): add action, BAP, and destination config support to google_discovery_engine_data_connector Feb 4, 2026
phillipweston

This comment was marked as duplicate.

@modular-magician modular-magician added service/discoveryengine and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Feb 5, 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 ( 5 files changed, 820 insertions(+), 5 deletions(-))
google-beta provider: Diff ( 5 files changed, 820 insertions(+), 5 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 185 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 161 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 39
Passed tests: 36
Skipped tests: 1
Affected tests: 2

Click here to see the affected service packages
  • discoveryengine

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
  • TestAccDiscoveryEngineDataConnector_discoveryengineDataconnectorJiraWithActionsExample
  • TestAccDiscoveryEngineDataConnector_discoveryengineDataconnectorServicenowBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccDiscoveryEngineDataConnector_discoveryengineDataconnectorJiraWithActionsExample [Error message] [Debug log]
TestAccDiscoveryEngineDataConnector_discoveryengineDataconnectorServicenowBasicExample [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

ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"collection_display_name", "collection_id", "location", "params"},
ImportStateVerifyIgnore: []string{"collection_display_name", "collection_id", "location", "params", "action_config.0.action_params", "action_config.0.create_bap_connection"},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you'll need to add update_time here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Copy Markdown
Contributor Author

@phillipweston phillipweston Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trodge Thank you. I've added it. Also, I can't view the ErrorMessage or DebugLog above, getting a 403 Forbidden, so hands feel a bit tied in helping debug these.

Does this repo require you to manually trigger the additional test suites each time?

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Feb 5, 2026
@github-actions github-actions Bot requested a review from trodge February 5, 2026 21:53
@phillipweston phillipweston force-pushed the main branch 4 times, most recently from 4bfe9d0 to 596f9f9 Compare February 6, 2026 14:05
@phillipweston
Copy link
Copy Markdown
Contributor Author

phillipweston commented Feb 6, 2026

@modular-magician /test

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Feb 9, 2026
@github-actions
Copy link
Copy Markdown

@trodge This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@trodge
Copy link
Copy Markdown
Contributor

trodge commented Feb 11, 2026

/gcbrun

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Feb 11, 2026
@trodge
Copy link
Copy Markdown
Contributor

trodge commented Feb 11, 2026

Test is still failing with

  error=
  | After applying this test step, the plan was not empty.
  | stdout:
  | 
  | 
  | Terraform used the selected providers to generate the following execution
  | plan. Resource actions are indicated with the following symbols:
  |   ~ update in-place
  | 
  | Terraform will perform the following actions:
  | 
  |   # google_discovery_engine_data_connector.servicenow-basic will be updated in-place
  |   ~ resource "google_discovery_engine_data_connector" "servicenow-basic" {
  |       - data_source_version             = 2 -> null
  |         id                              = "projects/ci-test-project-188019/locations/global/collections/tf-test-collection-id1fk4vo1ofk/dataConnector"
  |         name                            = "projects/1067888929963/locations/global/collections/tf-test-collection-id1fk4vo1ofk/dataConnector"
  |         # (24 unchanged attributes hidden)
  | 
  |       ~ entities {
  |           + key_property_mappings = {}
  |             # (3 unchanged attributes hidden)
  |         }
  |       ~ entities {
  |           + key_property_mappings = {}
  |             # (3 unchanged attributes hidden)
  |         }
  |       ~ entities {
  |           + key_property_mappings = {}
  |             # (3 unchanged attributes hidden)
  |         }
  |     }
  | 
  | Plan: 0 to add, 1 to change, 0 to destroy.

@github-actions
Copy link
Copy Markdown

@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Feb 13, 2026
@phillipweston
Copy link
Copy Markdown
Contributor Author

/gcbrun

@phillipweston
Copy link
Copy Markdown
Contributor Author

Thanks @trodge, I've updated the code to fix the latest issues in question.

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Feb 13, 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 ( 5 files changed, 822 insertions(+), 5 deletions(-))
google-beta provider: Diff ( 5 files changed, 822 insertions(+), 5 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 185 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 161 insertions(+))

Missing test report

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

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

resource "google_discovery_engine_data_connector" "primary" {
  entities {
    key_property_mappings = # value needed
  }
}

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 39
Passed tests: 38
Skipped tests: 1
Affected tests: 0

Click here to see the affected service packages
  • discoveryengine

🟢 All tests passed!

View the build log

…figs` to data connector

Adds two missing fields to `google_discovery_engine_data_connector`:

- `data_source_version` (integer) — specifies the version of the data
  source, e.g. 3 for Jira v3
- `destination_configs` (nested array) — configures where data is
  served, with each entry containing a `key` and a list of
  `destinations` with a `host` field
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Feb 18, 2026
@phillipweston
Copy link
Copy Markdown
Contributor Author

phillipweston commented Feb 18, 2026

@trodge I've got all tests passing now, if you can please take a look. Thank you!

@phillipweston
Copy link
Copy Markdown
Contributor Author

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 ( 5 files changed, 822 insertions(+), 5 deletions(-)) google-beta provider: Diff ( 5 files changed, 822 insertions(+), 5 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 185 insertions(+)) Open in Cloud Shell: Diff ( 4 files changed, 161 insertions(+))

Missing test report

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

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

resource "google_discovery_engine_data_connector" "primary" {
  entities {
    key_property_mappings = # value needed
  }
}

This has been addressed.

@github-actions
Copy link
Copy Markdown

@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 2 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Feb 24, 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 ( 5 files changed, 837 insertions(+), 16 deletions(-))
google-beta provider: Diff ( 5 files changed, 837 insertions(+), 16 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 185 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 161 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 39
Passed tests: 38
Skipped tests: 1
Affected tests: 0

Click here to see the affected service packages
  • discoveryengine

🟢 All tests passed!

View the build log

@github-actions
Copy link
Copy Markdown

@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 3 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.

@trodge trodge added this pull request to the merge queue Feb 27, 2026
Merged via the queue into GoogleCloudPlatform:main with commit bb1e568 Feb 27, 2026
24 checks passed
kefang2 pushed a commit to kefang2/magic-modules that referenced this pull request Feb 28, 2026
habh-11 pushed a commit to habh-11/magic-modules that referenced this pull request Mar 2, 2026
aditikumarii-google pushed a commit to aditikumarii-google/magic-modules that referenced this pull request Mar 10, 2026
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