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

google_container_cluster does not support dual-stack on creation #13842

Closed
maxcorbin opened this issue Feb 26, 2023 · 7 comments
Closed

google_container_cluster does not support dual-stack on creation #13842

maxcorbin opened this issue Feb 26, 2023 · 7 comments
Assignees
Milestone

Comments

@maxcorbin
Copy link

maxcorbin commented Feb 26, 2023

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

The google_container_cluster is missing an option to set the stack type, options should be between IPv4 and IPv6.

New or Affected Resource(s)

  • google_container_cluster

Potential Terraform Configuration

resource "google_container_cluster" "cluster" {
  name     = var.name
  location = var.location
  stack_type = var.use_dual_stack ? "IPV4_IPV6" : "STACK_TYPE_UNSPECIFIED"
}

References

Documentation for the endpoint has three options, IPV4 for IPv4 only, IPV4_IPV6 for dual-stack, and STACK_TYPE_UNSPECIFIED, which defaults to IPV4.

There are additional requirements that the user needs to fulfill for this to work, but at the moment the user must update the cluster manually after the (lengthy) cluster creation process has finished.

Also, #13752 seems related as it also has to do with support for dual-stack networking in GCP.

References

  • b/265821032
@rileykarson rileykarson added this to the Goals milestone Feb 27, 2023
@600lyy
Copy link

600lyy commented Feb 28, 2023

I am looking at this one. The cluster resource is handwritten in the magic module and I'll see if I could add a new field in the existing resource file

@600lyy
Copy link

600lyy commented Mar 6, 2023

StackType is part of the IPAllocationPolicy in the Go container library:
https://pkg.go.dev/google.golang.org/api/container/v1#IPAllocationPolicy

Proposed Terraform Configuration:

ip_allocation_policy {
    cluster_secondary_range_name  = "pod-ranges"
    services_secondary_range_name = google_compute_subnetwork.custom.secondary_ip_range.0.range_name
    stack_type = "IPV4" || "IPV4_IPV6"
}

@600lyy
Copy link

600lyy commented Mar 23, 2023

PR submitted: GoogleCloudPlatform/magic-modules#7459

@600lyy
Copy link

600lyy commented Mar 24, 2023

PR merged and closed. Dual stack support will be included in the upcoming TF Google provider releases.

  • stack_type - (Optional) The IP Stack Type of the cluster.
    Default value is IPV4.
    Possible values are IPV4 and PV4_IPV6.

@de-metavision
Copy link

possible values should probably be IPV4 and IPV4_IPV6.

@rileykarson
Copy link
Collaborator

rileykarson commented Apr 13, 2023

Closing based on GoogleCloudPlatform/magic-modules#7459, thanks! One useful trick in GitHub is "Fixes:"- if you specify an issue in the PR body like "Fixes: https://github.com/hashicorp/terraform-provider-google/issues/13842" the PR getting merged will close the issue as long as the person merging the PR has permission to do so!

@github-actions
Copy link

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 May 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants