Skip to content

Subnet IP Collection Patch Support#17425

Open
dhruv-23101998 wants to merge 4 commits intoGoogleCloudPlatform:mainfrom
dhruv-23101998:dhruvagarwal/subnet-ip-collection-patch-support
Open

Subnet IP Collection Patch Support#17425
dhruv-23101998 wants to merge 4 commits intoGoogleCloudPlatform:mainfrom
dhruv-23101998:dhruvagarwal/subnet-ip-collection-patch-support

Conversation

@dhruv-23101998
Copy link
Copy Markdown
Member

Fixes b/504503533
Adds updating IP Collection field in the Subnetwork resource.

Release Note Template for Downstream PRs

compute: added update support for `ip_collection` field to `google_compute_subnetwork` resource

@github-actions github-actions Bot requested a review from SirGitsalot May 5, 2026 19:44
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

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

@SirGitsalot, 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
Copy link
Copy Markdown
Collaborator

modular-magician commented May 5, 2026

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 156 insertions(+), 2 deletions(-)
google-beta provider View Diff 2 files changed, 156 insertions(+), 2 deletions(-)
terraform-google-conversion View Diff 2 files changed, 3 insertions(+), 1 deletion(-)

Test report

Analytics

Total Tests Passed Skipped Affected
1428 1336 91 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
  • TestAccComputeSubnetwork_ipv6UpdateWithPdp

View the build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
❌ Error · Log - TestAccComputeSubnetwork_ipv6UpdateWithPdp

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 build log or the debug logs folder for detailed results.

@dhruv-23101998, @SirGitsalot VCR tests complete for 13cfe4f!

@dhruv-23101998 dhruv-23101998 changed the title Dhruvagarwal/subnet ip collection patch support Subnet IP Collection Patch Support May 6, 2026
@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 6, 2026

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 3 files changed, 208 insertions(+), 15 deletions(-)
google-beta provider View Diff 3 files changed, 212 insertions(+), 19 deletions(-)
terraform-google-conversion View Diff 2 files changed, 6 insertions(+), 3 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
1428 1336 91 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
  • TestAccComputeSubnetwork_ipv6UpdateWithPdp

View the build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccComputeSubnetwork_ipv6UpdateWithPdp

🟢 All tests passed!

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

@dhruv-23101998, @SirGitsalot VCR tests complete for 8e23a1b!

@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 6, 2026

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 3 files changed, 208 insertions(+), 15 deletions(-)
google-beta provider View Diff 3 files changed, 212 insertions(+), 19 deletions(-)
terraform-google-conversion View Diff 2 files changed, 6 insertions(+), 3 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
1428 1336 91 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
  • TestAccComputeSubnetwork_ipv6UpdateWithPdp

View the build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccComputeSubnetwork_ipv6UpdateWithPdp

🟢 All tests passed!

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

@dhruv-23101998, @SirGitsalot VCR tests complete for 73e56b7!

network = google_compute_network.test_network.id
stack_type = "IPV4_IPV6"
ipv6_access_type = "INTERNAL"
ip_collection = google_compute_public_delegated_prefix.test_sub_pdp.id
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.

Looking at the config here and the debug log from the test, this update step isn't actually testing an update of the ip_collection field, since the value didn't change between steps. That is, in the create step it was projects/ci-test-project-188019/regions/us-central1/subnetworks/tf-test-sub-jx0ch37msg, and in the update step it was still projects/ci-test-project-188019/regions/us-central1/subnetworks/tf-test-sub-jx0ch37msg. To trigger an update of the field, you'll need to create a new google_compute_public_delegated_prefix and reference it here.

An update of the subnetwork is happening at this point in the test, but it's because the values of stack_type and ipv6_access_type changed.

Copy link
Copy Markdown
Member Author

@dhruv-23101998 dhruv-23101998 May 6, 2026

Choose a reason for hiding this comment

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

Can you please elaborate a little more? In the previous configuration, the subnetwork doesn't have the IP collection. Here we added IP Collection and it seems to be correctly updated. projects/ci-test-project-188019/regions/us-central1/subnetworks/tf-test-sub-jx0ch37msg is the subnetwork reference and not IP collection reference. Also, in this update test case, we want to test whether the Subnetwork is correctly associated with IP collection or not. As such IP collection itself won't get any update.

Are you asking to create the google_compute_public_delegated_prefix in the update step instead of the create step? If yes, how does this matter, as we only want to test the update in the subnetwork.

Also, just for context, the subnetwork cannot be updated just with the IP collection. ip_collection, stack_type and ipv6_access_type has to be updated together. In previous configuration, IP collection was absent which we added in the next update configuration along with different stack_type and ipv6_access_type.

If I'm misunderstanding something, please feel free to let me know.

@dhruv-23101998 dhruv-23101998 requested a review from SirGitsalot May 6, 2026 20:14
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