Skip to content

Subnetnetwork: replaced ipv6CidrRange with internalIpV6Prefix#8370

Merged
ScottSuarez merged 1 commit into
GoogleCloudPlatform:mainfrom
simonebruzzechesse:main
Jul 19, 2023
Merged

Subnetnetwork: replaced ipv6CidrRange with internalIpV6Prefix#8370
ScottSuarez merged 1 commit into
GoogleCloudPlatform:mainfrom
simonebruzzechesse:main

Conversation

@simonebruzzechesse

Copy link
Copy Markdown
Contributor

As per the PR title this PR replaces never used and populated attribute ipv6CidrRange with internalIpv6Prefix available on the Subnetwork resource as per official documentation available at the following link.

A locally generated provider was tested to determine whether it correctly populated the new attribute with the IPv6 prefix returned from the API. The provider was found to be functioning correctly, and the new attribute was populated with the correct IPv6 prefix.

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.
  • Ran relevant acceptance tests using my own Google Cloud project and credentials (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read Write release notes before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

compute: replaced `ipv6CidrRange` with `internalIpv6Prefix` to `Subnetwork` resource

@modular-magician

Copy link
Copy Markdown
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I've detected that you're a community contributor. @ScottSuarez, a repository maintainer, has been assigned to assist you and help review your changes.

❓ First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jul 18, 2023
@modular-magician

Copy link
Copy Markdown
Collaborator

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

Breaking Change(s) Detected

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

  • Field ipv6_cidr_range within resource google_compute_subnetwork was either removed or renamed - 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.

Diff report

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

Terraform GA: Diff ( 2 files changed, 4 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 2 files changed, 4 insertions(+), 4 deletions(-))
TF Conversion: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician

Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 2863
Passed tests 2562
Skipped tests: 299
Affected tests: 2

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
TestAccContainerAwsNodePool_BetaBasicHandWritten|TestAccComputeFirewallPolicyRule_multipleRules

Get to know how VCR tests work

@modular-magician

Copy link
Copy Markdown
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccContainerAwsNodePool_BetaBasicHandWritten[Error message] [Debug log]
TestAccComputeFirewallPolicyRule_multipleRules[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@ScottSuarez

Copy link
Copy Markdown
Contributor

Is there a value I can set to see this value returned? Want to validate this locally.

@simonebruzzechesse

Copy link
Copy Markdown
Contributor Author

Hi @ScottSuarez, sure this is the resources you can use to create a dual stack network and subnet:

resource "google_compute_network" "network" {
name = "test"
project = "PROJECT_ID"
enable_ula_internal_ipv6 = true
auto_create_subnetworks = false
mtu = 1460
}

resource "google_compute_subnetwork" "subnet" {
name = "test"
region = "europe-west1"
ip_cidr_range = "10.0.0.0/24"
network = google_compute_network.network.id
stack_type = "IPV4_IPV6"
ipv6_access_type = "INTERNAL"
private_ip_google_access = true
}

output "subnet" {
value = google_compute_subnetwork.subnet
}

I tested locally with a similar setup so it should work, of course feel free to reach out if you have any issue.

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

validated

@shuyama1

shuyama1 commented Jul 28, 2023

Copy link
Copy Markdown
Member

Sorry, renaming a field is considered breaking change that we can't include in our minor release, even if it is an unused, unpopulated field. I'm reverting this change now.
We can add a new field internalIpv6Prefix while still preserve the unused field ipv6CidrRange in the providers and release it in a minor release, and deprecate and remove the ipv6CidrRange field in the next major release 5.0.0, which is targeted mid September (announcement emails have been sent out the teams that are enrolled in self service). Please see https://googlecloudplatform.github.io/magic-modules/develop/make-a-breaking-change/#making-a-breaking-change for details.

shuyama1 added a commit that referenced this pull request Jul 28, 2023
wj-chen pushed a commit to wj-chen/magic-modules that referenced this pull request Aug 1, 2023
DanielRieske pushed a commit to bschaatsbergen/magic-modules that referenced this pull request Aug 2, 2023
hao-nan-li pushed a commit to hao-nan-li/magic-modules that referenced this pull request Aug 9, 2023
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.

4 participants