Skip to content

feat(ServiceAttachment): add data source for google_compute_service_a…#17593

Merged
zli82016 merged 1 commit into
GoogleCloudPlatform:mainfrom
sanadhis:feat-add-google_compute_service_attachment-data-source
May 22, 2026
Merged

feat(ServiceAttachment): add data source for google_compute_service_a…#17593
zli82016 merged 1 commit into
GoogleCloudPlatform:mainfrom
sanadhis:feat-add-google_compute_service_attachment-data-source

Conversation

@sanadhis

@sanadhis sanadhis commented May 16, 2026

Copy link
Copy Markdown
Contributor

Add data source for google_compute_service_attachment
Should close hashicorp/terraform-provider-google#17122

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

`google_compute_service_attachment`

Acceptance Tests

GA provider:

make testacc TEST=./google/services/compute TESTARGS='-run=TestAccDataSourceGoogleComputeServiceAttachment_basic'
sh -c "'/Users/adhi/go/src/github.com/hashicorp/terraform-provider-google/scripts/gofmtcheck.sh'"
==> Checking that code complies with gofmt requirements...
go vet
TF_ACC_REFRESH_AFTER_APPLY=1 TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google/services/compute -v -run=TestAccDataSourceGoogleComputeServiceAttachment_basic -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google/version.ProviderVersion=acc"
=== RUN   TestAccDataSourceGoogleComputeServiceAttachment_basic
=== PAUSE TestAccDataSourceGoogleComputeServiceAttachment_basic
=== CONT  TestAccDataSourceGoogleComputeServiceAttachment_basic
--- PASS: TestAccDataSourceGoogleComputeServiceAttachment_basic (139.31s)
PASS
ok      github.com/hashicorp/terraform-provider-google/google/services/compute  141.036s

Beta provider:

make testacc TEST=./google-beta/services/compute TESTARGS='-run=TestAccDataSourceGoogleComputeServiceAttachment_basic'
sh -c "'/Users/adhi/go/src/github.com/hashicorp/terraform-provider-google-beta/scripts/gofmtcheck.sh'"
==> Checking that code complies with gofmt requirements...
go vet
TF_ACC_REFRESH_AFTER_APPLY=1 TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google-beta/services/compute -v -run=TestAccDataSourceGoogleComputeServiceAttachment_basic -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google-beta/version.ProviderVersion=acc"
=== RUN   TestAccDataSourceGoogleComputeServiceAttachment_basic
=== PAUSE TestAccDataSourceGoogleComputeServiceAttachment_basic
=== CONT  TestAccDataSourceGoogleComputeServiceAttachment_basic
--- PASS: TestAccDataSourceGoogleComputeServiceAttachment_basic (133.20s)
PASS
ok      github.com/hashicorp/terraform-provider-google-beta/google-beta/services/compute        135.064s

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label May 16, 2026
@sanadhis sanadhis marked this pull request as ready for review May 16, 2026 07:53
@github-actions github-actions Bot requested a review from zli82016 May 16, 2026 07:54
@github-actions

Copy link
Copy Markdown

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

@zli82016, 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 commented May 19, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 3 files changed, 251 insertions(+)
google-beta provider View Diff 3 files changed, 251 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
1448 1353 93 2
Affected Service Packages
  • compute

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
  • TestAccComputeInstanceFromTemplate_DiskForceAttach
  • TestAccDataSourceGoogleComputeServiceAttachment_basic

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccDataSourceGoogleComputeServiceAttachment_basic
❌ Error · Log - TestAccComputeInstanceFromTemplate_DiskForceAttach

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.

@sanadhis, @zli82016 VCR tests complete for 0b075d0!

@sanadhis sanadhis force-pushed the feat-add-google_compute_service_attachment-data-source branch from 0b075d0 to 0342f3a Compare May 21, 2026 19:45
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label May 21, 2026
@github-actions github-actions Bot requested a review from zli82016 May 21, 2026 19:45
@sanadhis sanadhis force-pushed the feat-add-google_compute_service_attachment-data-source branch from 0342f3a to 99e9d67 Compare May 21, 2026 19:45
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label May 22, 2026
@modular-magician

modular-magician commented May 22, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 3 files changed, 250 insertions(+)
google-beta provider View Diff 3 files changed, 250 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
1458 1365 93 0
Affected Service Packages
  • compute

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

@sanadhis, @zli82016 VCR tests complete for 99e9d67!

@zli82016 zli82016 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks.

@zli82016 zli82016 added this pull request to the merge queue May 22, 2026
Merged via the queue into GoogleCloudPlatform:main with commit 80e1670 May 22, 2026
27 checks passed
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.

Adding data resource for google_compute_service_attachment to get a service attachment within a specific project

3 participants