Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support google_compute_subnetwork update to IPV6 #12860

Comments

@ErikEngerd
Copy link

ErikEngerd commented Oct 24, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

It should be possible to update a subnetwork from IPV4 to dual stack IPV4_IPV6 without recreating the subnetwork.

In concrete, first create an IPV4 subnet:

resource "google_compute_subnetwork" "subnet-lan" {
  provider          = google
  name              = "testsubnet"
  region            = "europe-west4"
  ip_cidr_range     = "10.50.0.0/16"
  network           = "network"
}

Then update it to dual stack:

resource "google_compute_subnetwork" "subnet-lan" {
  provider          = google
  name              = "testsubnet"
  region            = "europe-west4"
  ip_cidr_range     = "10.50.0.0/16"
  network           = "network"
  stack_type        = "IPV4_IPV6"
  ipv6_access_type  = "EXTERNAL"
}

New or Affected Resource(s)

  • google_compute_subnetwork

Potential Terraform Configuration

The existing terraform configuration does not need to be changed.

References

Google documentation is confusing and seems to contradict itself by saying:

The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack.

But it says that the update is possible. Updates are also possible through google cloud console.

Also, updates using gcloud commandline work

gcloud compute networks subnets update testsubnet --stack-type=IPV4_IPV6 --ipv6-access-type=EXTERNAL

Debug output from terraform 1.3.2 shows the output of the current version of terraform.

@ErikEngerd
Copy link
Author

When defining a VM that has a network interface in the subnet and updating the VM to go from IPV4 to dual stack then nothing happens and the network interface is still in IPV4. Updating the network interface in the google cloud console works though.

Network interface definition in terraform for a VM:

network_interface { 
  ...
  stack_type = "IPV4_IPV6" 
}

@rileykarson rileykarson added this to the Goals milestone Oct 24, 2022
@hao-nan-li
Copy link
Collaborator

b/261047629
b/261047894
b/261048516

@melinath
Copy link
Collaborator

melinath commented Dec 9, 2022

b/261863885

@melinath
Copy link
Collaborator

melinath commented Dec 9, 2022

@trodge I think you might have to assign yourself on the GH issue - I can't seem to do it.

c2thorn pushed a commit to GoogleCloudPlatform/magic-modules that referenced this issue Dec 9, 2022
modular-magician added a commit to modular-magician/terraform-provider-google-beta that referenced this issue Dec 9, 2022
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Dec 9, 2022
)

fixes hashicorp#12860

Signed-off-by: Modular Magician <magic-modules@google.com>
modular-magician added a commit to hashicorp/terraform-provider-google-beta that referenced this issue Dec 9, 2022
fixes hashicorp/terraform-provider-google#12860

Signed-off-by: Modular Magician <magic-modules@google.com>

Signed-off-by: Modular Magician <magic-modules@google.com>
modular-magician added a commit that referenced this issue Dec 9, 2022
)

fixes #12860

Signed-off-by: Modular Magician <magic-modules@google.com>

Signed-off-by: Modular Magician <magic-modules@google.com>
modular-magician added a commit to modular-magician/terraform-validator that referenced this issue Dec 9, 2022
modular-magician added a commit to GoogleCloudPlatform/terraform-validator that referenced this issue Dec 9, 2022
fixes hashicorp/terraform-provider-google#12860

Signed-off-by: Modular Magician <magic-modules@google.com>

Signed-off-by: Modular Magician <magic-modules@google.com>
@github-actions
Copy link

github-actions bot commented Jan 9, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.