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

Can't add network_config pod_range for node_pool #11291

Closed
sdif opened this issue Mar 16, 2022 · 2 comments
Closed

Can't add network_config pod_range for node_pool #11291

sdif opened this issue Mar 16, 2022 · 2 comments
Labels

Comments

@sdif
Copy link

sdif commented Mar 16, 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 an 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 an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

Terraform v1.0.11
on darwin_amd64

  • provider registry.terraform.io/hashicorp/google v4.14.0
  • provider registry.terraform.io/hashicorp/google-beta v4.14.0

Affected Resource(s)

  • google_container_node_pool

Terraform Configuration Files

resource "google_container_node_pool" "prow-europe-west1_default-2" {
  provider   = google-beta
  depends_on = [google_container_cluster.prow-europe-west1]

  name       = "default-2"
  location   = var.cluster_prow-europe-west1_location

  cluster    = google_container_cluster.prow-europe-west1.name

  network_config {
    create_pod_range = true
    pod_ipv4_cidr_block = "10.32.0.0/14"
    pod_range = "pod_range_prow"
  }
...
}

Debug Output

Panic Output

│ Error: error creating NodePool: googleapi: Error 400: Invalid value for 'node_network_config.pod_range': "pod_range_prow", must be a valid GCP resource name (https://cloud.google.com/apis/design/resource_names)., badRequest
│
│   with google_container_node_pool.prow-europe-west1_default-2,
│   on cluster_prow-europe-west1.tf line 86, in resource "google_container_node_pool" "prow-europe-west1_default-2":
│   86: resource "google_container_node_pool" "prow-europe-west1_default-2" {

Expected Behavior

We expected terraform to be able to create the nodepool with associated network configuration

Actual Behavior

Terraform returned an error saying node_network_config.pod_range is not a valid GCP resource name where the value we provided is pod_range_prow (name we want to use to define the pod range).
Note that I am able to create the node pool with the same configuration through GCP UI

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@sdif sdif added the bug label Mar 16, 2022
@sdif
Copy link
Author

sdif commented Mar 18, 2022

Found out the issue is pod_range cannot contain underscore character, I replaced with hyphen and it works 👍

@sdif sdif closed this as completed Mar 18, 2022
@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 Apr 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant