Skip to content

cloudbuild: Add list resources for Trigger and BitbucketServerConfig - #18562

Draft
BBBmau wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
BBBmau:add-cloudbuild-list-resources
Draft

cloudbuild: Add list resources for Trigger and BitbucketServerConfig#18562
BBBmau wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
BBBmau:add-cloudbuild-list-resources

Conversation

@BBBmau

@BBBmau BBBmau commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Add list resource support for CloudBuild Trigger and BitbucketServerConfig resources.

This enables users to query and list existing CloudBuild Triggers and BitbucketServerConfig resources using Terraform data sources.

Testing:

  • Acceptance tests ran and PASSED:
    • TestAccCloudBuildBitbucketServerConfigListQuery_generated — PASS
    • TestAccCloudBuildTriggerListQuery_generated — PASS

Fixes included:

  • Marked location parameter as required: true for Trigger resource
  • Set collection_url_key: 'triggers' for Trigger resource to match API response schema
cloudbuild: Add list resource support for `google_cloudbuild_trigger` and `google_cloudbuild_bitbucket_server_config`

BBBmau added 2 commits August 3, 2026 14:32
… collection_url_key

- Mark location parameter as required (remove default_value: 'global')
  so the generated list resource requires location as a filter field
- Add collection_url_key: 'triggers' to match the actual API response key
  (api_resource_type_kind: BuildTrigger was generating 'buildTriggers',
  but the Cloud Build API returns the list under the 'triggers' key)

Both TestAccCloudBuildTriggerListQuery_generated and
TestAccCloudBuildBitbucketServerConfigListQuery_generated now pass.
@BBBmau

BBBmau commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

@modular-magician reassign-reviewer

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

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

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

@github-actions
github-actions Bot requested a review from rileykarson August 7, 2026 18:26
@BBBmau
BBBmau marked this pull request as draft August 7, 2026 18:27
@modular-magician

modular-magician commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 9 files changed, 687 insertions(+), 17 deletions(-)
google-beta provider View Diff 9 files changed, 687 insertions(+), 17 deletions(-)

Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

  • Field location changed from optional to required on google_cloudbuild_trigger - reference
  • Field location default value changed from global to <nil> on google_cloudbuild_trigger - reference

If you believe this detection to be incorrect please raise the concern with your reviewer.
If you intend to make this change you will need to wait for a major release window.
An override-breaking-change label can be added to allow merging.

Test report

Analytics

Total Tests Passed Skipped Affected
35 17 2 16
Affected Service Packages
  • cloudbuild

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

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

Click here to see the affected tests
  • TestAccCloudBuildBitbucketServerConfigListQuery_generated
  • TestAccCloudBuildTriggerListQuery_generated
  • TestAccCloudBuildTrigger_available_secrets_config
  • TestAccCloudBuildTrigger_basic
  • TestAccCloudBuildTrigger_basic_bitbucket
  • TestAccCloudBuildTrigger_cloudbuildTriggerManualBitbucketServerExample
  • TestAccCloudBuildTrigger_cloudbuildTriggerManualExample
  • TestAccCloudBuildTrigger_cloudbuildTriggerServiceAccountExample
  • TestAccCloudBuildTrigger_cloudbuildTriggerWebhookConfigExample
  • TestAccCloudBuildTrigger_customizeDiffTimeoutFormat
  • TestAccCloudBuildTrigger_customizeDiffTimeoutSum
  • TestAccCloudBuildTrigger_disable
  • TestAccCloudBuildTrigger_fullStep
  • TestAccCloudBuildTrigger_manualTriggerNoSource
  • TestAccCloudBuildTrigger_pubsub_config
  • TestAccCloudBuildTrigger_webhook_config

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccCloudBuildBitbucketServerConfigListQuery_generated
✅ Log TestAccCloudBuildTriggerListQuery_generated
❌ Error · Log - TestAccCloudBuildTrigger_available_secrets_config
❌ Error · Log - TestAccCloudBuildTrigger_basic
❌ Error · Log - TestAccCloudBuildTrigger_basic_bitbucket
❌ Error · Log - TestAccCloudBuildTrigger_cloudbuildTriggerManualBitbucketServerExample
❌ Error · Log - TestAccCloudBuildTrigger_cloudbuildTriggerManualExample
❌ Error · Log - TestAccCloudBuildTrigger_cloudbuildTriggerServiceAccountExample
❌ Error · Log - TestAccCloudBuildTrigger_cloudbuildTriggerWebhookConfigExample
❌ Error · Log - TestAccCloudBuildTrigger_customizeDiffTimeoutFormat
❌ Error · Log - TestAccCloudBuildTrigger_customizeDiffTimeoutSum
❌ Error · Log - TestAccCloudBuildTrigger_disable
❌ Error · Log - TestAccCloudBuildTrigger_fullStep
❌ Error · Log - TestAccCloudBuildTrigger_manualTriggerNoSource
❌ Error · Log - TestAccCloudBuildTrigger_pubsub_config
❌ Error · Log - TestAccCloudBuildTrigger_webhook_config

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.

@BBBmau, @rileykarson VCR tests complete for dba48d3!

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