-
Notifications
You must be signed in to change notification settings - Fork 5k
containers: allow Ubuntu2404 for AKS os_sku #32026
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -191,6 +191,7 @@ func SchemaDefaultNodePool() *pluginsdk.Schema { | |
| string(agentpools.OSSKUAzureLinuxThree), | ||
| string(agentpools.OSSKUUbuntu), | ||
| string(agentpools.OSSKUUbuntuTwoTwoZeroFour), | ||
| string(agentpools.OSSKUUbuntuTwoFourZeroFour), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be added to the documentation for |
||
| string(agentpools.OSSKUWindowsTwoZeroOneNine), | ||
| string(agentpools.OSSKUWindowsTwoZeroTwoTwo), | ||
| }, false), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| // Copyright IBM Corp. 2014, 2025 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be removed, we don't unit test basic ValidateFuncs like |
||
| // SPDX-License-Identifier: MPL-2.0 | ||
|
|
||
| package containers | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" | ||
| ) | ||
|
|
||
| func TestKubernetesClusterNodePoolSchemaAcceptsUbuntu2404(t *testing.T) { | ||
| validate := resourceKubernetesClusterNodePoolSchema()["os_sku"].ValidateFunc | ||
| if validate == nil { | ||
| t.Fatal("node pool os_sku ValidateFunc is nil") | ||
| } | ||
|
|
||
| if warnings, errs := validate("Ubuntu2404", "os_sku"); len(warnings) != 0 || len(errs) != 0 { | ||
| t.Fatalf("expected Ubuntu2404 to be accepted for node pool os_sku, got warnings=%v errs=%v", warnings, errs) | ||
| } | ||
| } | ||
|
|
||
| func TestKubernetesClusterDefaultNodePoolSchemaAcceptsUbuntu2404(t *testing.T) { | ||
| defaultNodePool := resourceKubernetesCluster().Schema["default_node_pool"] | ||
| if defaultNodePool == nil { | ||
| t.Fatal("default_node_pool schema is nil") | ||
| } | ||
|
|
||
| defaultNodePoolResource, ok := defaultNodePool.Elem.(*pluginsdk.Resource) | ||
| if !ok { | ||
| t.Fatalf("expected default_node_pool elem to be a resource, got %T", defaultNodePool.Elem) | ||
| } | ||
|
|
||
| validate := defaultNodePoolResource.Schema["os_sku"].ValidateFunc | ||
| if validate == nil { | ||
| t.Fatal("default node pool os_sku ValidateFunc is nil") | ||
| } | ||
|
|
||
| if warnings, errs := validate("Ubuntu2404", "os_sku"); len(warnings) != 0 || len(errs) != 0 { | ||
| t.Fatalf("expected Ubuntu2404 to be accepted for default node pool os_sku, got warnings=%v errs=%v", warnings, errs) | ||
| } | ||
| } | ||
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.
This needs to be added to the documentation for
azurerm_kubernetes_cluster_node_pool