Skip to content

Conversation

@victorsantos-cit
Copy link
Contributor

Hello Folks.
This PR is to fix hashicorp/terraform-provider-google#25324

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

compute: update `external_ipv6`.`ForceNew` to `false` on `google_compute_instance` resource

Add acceptance test for Compute Instance with IPv6 external address handling.
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Dec 18, 2025
@github-actions github-actions bot requested a review from roaks3 December 18, 2025 13:17
@github-actions
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

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.

Copy link
Contributor

@roaks3 roaks3 left a comment

Choose a reason for hiding this comment

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

Some minor suggestions, running tests now...

Optional: true,
Computed: true,
ForceNew: true,
ForceNew: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you just remove this line? (false is the default)

),
},
{
// troca de IPv6 → recreate obrigatório
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you remove this, or change to english?

@modular-magician modular-magician added service/compute-instances and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Dec 19, 2025
@modular-magician
Copy link
Collaborator

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

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 109 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 2 files changed, 109 insertions(+), 1 deletion(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_compute_instance_from_machine_image (14 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_compute_instance_from_machine_image" "primary" {
  network_interface {
    ipv6_access_config {
      external_ipv6 = # value needed
    }
  }
}

Resource: google_compute_instance_from_template (24 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_compute_instance_from_template" "primary" {
  network_interface {
    ipv6_access_config {
      external_ipv6 = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1319
Passed tests: 1232
Skipped tests: 84
Affected tests: 3

Click here to see the affected service packages
  • compute

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeFutureReservation_sharedFutureReservationExample
  • TestAccComputeInstance_IPv6ExternalRecreate
  • TestAccComputeRegionBackendService_withNetworkPassThroughLbTrafficPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccComputeInstance_IPv6ExternalRecreate [Debug log]
TestAccComputeRegionBackendService_withNetworkPassThroughLbTrafficPolicy [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccComputeFutureReservation_sharedFutureReservationExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Removed comment regarding IPv6 recreation requirement.
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Dec 22, 2025
@github-actions github-actions bot requested a review from roaks3 December 22, 2025 18:22
Copy link
Contributor

@roaks3 roaks3 left a comment

Choose a reason for hiding this comment

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

Still just waiting on PlanCheck

@github-actions github-actions bot requested a review from roaks3 December 26, 2025 17:41
@victorsantos-cit
Copy link
Contributor Author

@roaks3 I finish the plancheck , please, take a look for me

@github-actions
Copy link

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

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

@GoogleCloudPlatform/terraform-team @roaks3 This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

@victorsantos-cit
Copy link
Contributor Author

@roaks3 Hey , could you review this PR please

2 similar comments
@victorsantos-cit
Copy link
Contributor Author

@roaks3 Hey , could you review this PR please

@victorsantos-cit
Copy link
Contributor Author

@roaks3 Hey , could you review this PR please

@roaks3
Copy link
Contributor

roaks3 commented Jan 6, 2026

@victorsantos-cit respectfully, please stop spamming PRs to get a response, the automation already does that for us. Also note that there are US holidays at the end of the year where large numbers of employees are out of office and slower to respond.

@victorsantos-cit
Copy link
Contributor Author

@roaks3 sorry about that

}
{{- end }}

func TestAccComputeInstance_IPv6ExternalRecreate(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm confused about this test in its current state:

  1. Isn't the change here meant to prevent recreation when this value is changed?
  2. Why is the plan check ensuring that the resource is recreated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hey @roaks3 , one question, on the logs in this task , the resource was created ?
Because make the analisy in the log, i dont find nothing show the resource was delete and recreated , and that is the focus on this issue, right ?

Copy link
Contributor

Choose a reason for hiding this comment

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

So if you use TF_LOG=DEBUG you'll get the API requests, which should highlight somewhat if there are new delete/post requests during update. But the nicer way we use now is the plan check (see https://googlecloudplatform.github.io/magic-modules/test/test/#add-an-update-test, specifically plancheck.ResourceActionUpdate), which basically allows you to verify that Terraform did an in-place update.

As written, I think your test confirms that the resource is recreated instead of updated in-place.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i thinkin here, one question, make the analise in the api, you could confirm if this action to update the resource, is abble ? because this field is immutable, so i'm think if this update makes sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-approval Pull requests that need reviewer's approval to run presubmit tests service/compute-instances

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow updating GCE VM’s external ipv6 address without VM recreation

3 participants