-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_kubernetes_cluster
- support for the default_node_pool.snapshot_id
property
#22708
azurerm_kubernetes_cluster
- support for the default_node_pool.snapshot_id
property
#22708
Conversation
…pshot_id` property
@@ -436,6 +436,8 @@ A `default_node_pool` block supports the following: | |||
|
|||
* `scale_down_mode` - (Optional) Specifies the autoscaling behaviour of the Kubernetes Cluster. Allowed values are `Delete` and `Deallocate`. Defaults to `Delete`. | |||
|
|||
* `snapshot_id` - (Optional) The ID of the Snapshot which should be used to create this default Node Pool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it support a rolling update? Or will the node pool be recreated on snapshot_id change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @js-315385995 , yes, it could be updated, but it is done by cycling the system node pool of the cluster, temporary_name_for_rotation
must be specified when changing it. I've updated the doc as well.
I tested like this:
It created the cluster as expected. @ms-henglu @stephybun is there anything else we can test ? What is missing to get this merged ? thanks |
@@ -1381,6 +1402,11 @@ func FlattenDefaultNodePool(input *[]managedclusters.ManagedClusterAgentPoolProf | |||
scaleDownMode = *agentPool.ScaleDownMode | |||
} | |||
|
|||
snapshotId := "" | |||
if agentPool.CreationData != nil && agentPool.CreationData.SourceResourceId != nil { | |||
snapshotId = *agentPool.CreationData.SourceResourceId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should parse this ID insensitively before setting it to state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I've updated it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ms-henglu LGTM 💯
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
fixes #22656