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] node_ipv4_cidr_block causes perma-diff #3524

Closed
diversario opened this issue Apr 30, 2019 · 2 comments
Closed

[google_container_cluster] node_ipv4_cidr_block causes perma-diff #3524

diversario opened this issue Apr 30, 2019 · 2 comments
Labels
bug forward/review In review; remove label to forward service/container

Comments

@diversario
Copy link

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 v0.11.11

  • provider.google v2.5.1
  • provider.google-beta v2.5.1
  • provider.kubernetes v1.6.2
  • provider.null v2.1.1

Affected Resource(s)

  • google_container_cluster

Terraform Configuration Files

https://gist.github.com/diversario/e36b4d51985648b1703ed7c7c4f8cad7

Debug Output

https://drive.google.com/open?id=1FeyYyjYf191UyIfNBFqIWHCAFBT77bYM

Panic Output

Expected Behavior

Nodes are configured to launch if node_ipv4_cidr_block CIDR and terraform apply with no changes does not force a new resource.

Actual Behavior

Terraform attempts to create a new resource:

Terraform will perform the following actions:

-/+ google_container_cluster.gke-cluster (new resource required)
      id:                                                                      "diversario-test-2" => <computed> (forces new resource)
      additional_zones.#:                                                      "3" => <computed>
      addons_config.#:                                                         "1" => <computed>
      cluster_autoscaling.#:                                                   "1" => <computed>
      cluster_ipv4_cidr:                                                       "10.160.8.0/21" => <computed>
      default_max_pods_per_node:                                               "110" => <computed>
      enable_binary_authorization:                                             "false" => "false"
      enable_kubernetes_alpha:                                                 "false" => "false"
      enable_legacy_abac:                                                      "false" => "false"
      enable_tpu:                                                              "false" => "false"
      endpoint:                                                                "35.236.76.130" => <computed>
      initial_node_count:                                                      "1" => "1"
      instance_group_urls.#:                                                   "3" => <computed>
      ip_allocation_policy.#:                                                  "1" => "1"
      ip_allocation_policy.0.cluster_ipv4_cidr_block:                          "10.160.8.0/21" => "10.160.8.0/21"
      ip_allocation_policy.0.cluster_secondary_range_name:                     "gke-diversario-test-2-pods-332f1514" => <computed>
      ip_allocation_policy.0.create_subnetwork:                                "true" => "true"
      ip_allocation_policy.0.node_ipv4_cidr_block:                             "" => "10.160.0.0/21" (forces new resource)
      ip_allocation_policy.0.services_ipv4_cidr_block:                         "10.160.16.0/21" => "10.160.16.0/21"
      ip_allocation_policy.0.services_secondary_range_name:                    "gke-diversario-test-2-services-332f1514" => <computed>
      ip_allocation_policy.0.use_ip_aliases:                                   "true" => "true"
      location:                                                                "us-west2" => "us-west2"
      logging_service:                                                         "logging.googleapis.com" => <computed>
      master_auth.#:                                                           "1" => <computed>
      master_authorized_networks_config.#:                                     "1" => "1"
      master_authorized_networks_config.0.cidr_blocks.#:                       "1" => "1"
      master_authorized_networks_config.0.cidr_blocks.2311254309.cidr_block:   "1.1.1.1/32" => "1.1.1.1/32"
      master_authorized_networks_config.0.cidr_blocks.2311254309.display_name: "VPN" => "VPN"
      master_version:                                                          "1.11.9-gke.8" => <computed>
      min_master_version:                                                      "1.11.9-gke.8" => "1.11.9-gke.8"
      monitoring_service:                                                      "monitoring.googleapis.com" => <computed>
      name:                                                                    "diversario-test-2" => "diversario-test-2"
      network:                                                                 "projects/my-project/global/networks/diversario-test-2" => "diversario-test-2"
      network_policy.#:                                                        "1" => <computed>
      node_config.#:                                                           "1" => <computed>
      node_locations.#:                                                        "3" => <computed>
      node_pool.#:                                                             "1" => <computed>
      node_version:                                                            "1.11.9-gke.8" => <computed>
      private_cluster_config.#:                                                "1" => "1"
      private_cluster_config.0.enable_private_nodes:                           "true" => "true"
      private_cluster_config.0.master_ipv4_cidr_block:                         "172.16.0.0/28" => "172.16.0.0/28"
      private_cluster_config.0.private_endpoint:                               "172.16.0.2" => <computed>
      private_cluster_config.0.public_endpoint:                                "35.236.76.130" => <computed>
      project:                                                                 "my-project" => <computed>
      region:                                                                  "us-west2" => <computed>
      tpu_ipv4_cidr_block:                                                     "" => <computed>
      zone:                                                                    "" => <computed>


Plan: 1 to add, 0 to change, 1 to destroy.

Steps to Reproduce

  1. Use the code from the gist (with appropriate credentials and GCP project) to create a cluster
  2. Once created, run terraform apply again and see the diff.

Important Factoids

Removing node_ipv4_cidr_block fixed the perma-diff (but no node subnet configuration).

References

Possibly related to:

@ghost ghost added the bug label Apr 30, 2019
@diversario diversario changed the title google_container_cluster.node_ipv4_cidr_block causes perma-diff [google_container_cluster] node_ipv4_cidr_block causes perma-diff Apr 30, 2019
@rileykarson
Copy link
Collaborator

I believe this was resolved in 2.7.0 with GoogleCloudPlatform/magic-modules#1783, but please comment here / reopen the issue if that wasn't the case.

@ghost
Copy link

ghost commented Jul 12, 2019

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 12, 2019
@github-actions github-actions bot added service/container forward/review In review; remove label to forward labels Jan 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug forward/review In review; remove label to forward service/container
Projects
None yet
Development

No branches or pull requests

2 participants