Skip to content

Implement compute instance groups plural datasource#17929

Open
olpapchenko wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
olpapchenko:ig-plural-ds
Open

Implement compute instance groups plural datasource#17929
olpapchenko wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
olpapchenko:ig-plural-ds

Conversation

@olpapchenko

Copy link
Copy Markdown

Fixes hashicorp/terraform-provider-google#18941

`google_compute_instance_groups`

@github-actions

Copy link
Copy Markdown

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

@roaks3, 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 roaks3 June 11, 2026 12:25
@modular-magician

modular-magician commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

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

Missing doc report (experimental)

The following data sources are missing documents:

  • google_compute_instance_groups, expect file /website/docs/d/compute_instance_groups.html.markdown to exist.

Test report

Analytics

Total Tests Passed Skipped Affected
1473 1379 93 1
Affected Service Packages
  • compute

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

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

Click here to see the affected tests
  • TestAccDataSourceGoogleComputeInstanceGroups

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccDataSourceGoogleComputeInstanceGroups

🟢 All tests passed!

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

@olpapchenko, @roaks3 VCR tests complete for 51219e0!

@roaks3 roaks3 left a comment

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.

Very high-level initial comment, but I think we'd want a documentation page for this?

@olpapchenko

Copy link
Copy Markdown
Author

Very high-level initial comment, but I think we'd want a documentation page for this?

Added documentation.

@modular-magician

modular-magician commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

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

Test report

Analytics

Total Tests Passed Skipped Affected
1473 1380 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

@olpapchenko, @roaks3 VCR tests complete for 670d89a!

@github-actions

Copy link
Copy Markdown

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

@roaks3 roaks3 left a comment

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.

LGTM, although we should convert to HTTP client to avoid introducing something that will need to immediately change (compute is in-progress on a large migration to HTTP clients)


instanceGroups := make([]map[string]interface{}, 0)

instanceGroupsList, err := NewClient(config, userAgent).InstanceGroups.List(project, zone).Filter(filter).Do()

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.

It looks like the instance_group resource and datasource were already migrated to using HTTP clients. Could you modify this to do the same, so that it doesn't need to be converted in the near-term by someone else?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I have changed the implementation to http, + added pagination support.

@modular-magician

modular-magician commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

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

Test report

Analytics

Total Tests Passed Skipped Affected
1484 1391 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

@olpapchenko, @roaks3 VCR tests complete for 72010f8!

@roaks3 roaks3 left a comment

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.

LGTM, just added a few notes from comparing implementation against existing datasource and resource

var network string
if v, ok := ig["network"].(string); ok && v != "" {
var err error
network, err = tpgresource.GetRelativePath(v)

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.

Just a couple comments on the custom transforms here: is this part needed? It looked to me like the singular datasource and resource do not do this (might have missed something though)

@modular-magician

modular-magician commented Jun 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 fdb0ad9:

Diff report

Your PR generated the following diffs in downstream repositories:

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

Test report

Analytics

Total Tests Passed Skipped Affected
1484 1391 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

@olpapchenko, @roaks3 VCR tests complete for fdb0ad9!

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.

Compute instance groups plural datasource

3 participants