Skip to content

discoveryengine: add list resources - #1386

Merged
modular-magician merged 1 commit into
terraform-google-modules:masterfrom
modular-magician:downstream-pr-4246b3331552b1d13ca63256e93a55d474ee98a0
Jul 28, 2026
Merged

discoveryengine: add list resources#1386
modular-magician merged 1 commit into
terraform-google-modules:masterfrom
modular-magician:downstream-pr-4246b3331552b1d13ca63256e93a55d474ee98a0

Conversation

@modular-magician

Copy link
Copy Markdown
Collaborator

What this PR does

Enables MMv1 list resource generation for Discovery Engine MMv1 resources by adding generate_list_resource: true to each eligible resource YAML.

Also adds a new list_filter YAML field (and template support) to allow list resources to append a static ?filter= query parameter — used by the three engine resources which share the same API endpoint and are distinguished by solutionType.

Discovery Engine resources with list support added

  • google_discovery_engine_assistant
  • google_discovery_engine_chat_engine
  • google_discovery_engine_cmek_config
  • google_discovery_engine_control
  • google_discovery_engine_data_store
  • google_discovery_engine_license_config
  • google_discovery_engine_recommendation_engine
  • google_discovery_engine_schema
  • google_discovery_engine_search_engine
  • google_discovery_engine_serving_config
  • google_discovery_engine_sitemap
  • google_discovery_engine_target_site
  • google_discovery_engine_user_store

Resources excluded

  • google_discovery_engine_data_connector — singleton resource (no list API)
  • google_discovery_engine_acl_config — singleton resource (no list API)
  • google_discovery_engine_widget_config — list API only exists at v1alpha; product base path is v1

Notes

  • ChatEngine, SearchEngine, and RecommendationEngine all share projects.locations.collections.engines as their API endpoint, differentiated by solutionType. The new list_filter field generates ?filter=solution_type=SOLUTION_TYPE_* on each list call so results are scoped to the correct engine type.
  • Sitemap uses a :fetch endpoint returning a sitemapsMetadata nested structure; collection_url_key: sitemapsMetadata and an updated post_read template handle both the list and single-resource read contexts correctly.
  • Control and ServingConfig have collection_id with default_value: default_collection. The list method template now seeds default_value into resourceData when the caller omits the field, matching the resource schema Default: behaviour.
`google_discovery_engine_assistant`
`google_discovery_engine_chat_engine`
`google_discovery_engine_cmek_config`
`google_discovery_engine_control`
`google_discovery_engine_data_store`
`google_discovery_engine_license_config`
`google_discovery_engine_recommendation_engine`
`google_discovery_engine_schema`
`google_discovery_engine_search_engine`
`google_discovery_engine_serving_config`
`google_discovery_engine_sitemap`
`google_discovery_engine_target_site`
`google_discovery_engine_user_store`

Derived from GoogleCloudPlatform/magic-modules#18231

[upstream:4246b3331552b1d13ca63256e93a55d474ee98a0]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician
modular-magician merged commit 246a398 into terraform-google-modules:master Jul 28, 2026
2 checks passed
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.

1 participant