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

resource_container_node_pool Change initial_node_count -> ForceNew to false #9570

Closed
r4hulgupta opened this issue Jul 15, 2021 · 2 comments
Closed
Assignees

Comments

@r4hulgupta
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 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

Changing the value of initial_node_count forces a node pool destroy and create. In general when doing such an operation using gcloud container clusters resize <CLUSTER_NAME> --num-nodes <> --node-pool <> does not really destroy and create the node pool.

The current resource implementation has ForceNew set to true and it maybe as simple as setting it to false?

I can assume there was some history behind the current implementation but I would like to propose this change and understand why if it can't be done.

The reason behind changing initial_node_count to scale up and down a node-pool manually is so that users can adjust their node pool minimum size which only changes during a scale up event by the autoscaler even if the current node pool size is <= min_node_count. So if a user wants their min_node_count to be increased it won't trigger a scale up until autoscaler sees the need to scale up, and in that case changing initial_node_count could help get to the desired number of nodes without destroying and creating the node pool.

New or Affected Resource(s)

resource_container_cluster_node_pool
resource_container_cluster

Potential Terraform Configuration

Proposed changes do not make changes to terraform configuration. It could be simply changing ForceNew to False.

References

@rileykarson
Copy link
Collaborator

With the field named initial_node_count as is, changing the count up/down would imply the cluster was provisioned w/ a different initial count. I don't believe that's a change we want to make. https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_node_pool#node_count is the field to manually update the # of nodes in a pool.

@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 Dec 16, 2021
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

2 participants