Skip to content

containers: allow Ubuntu2404 for AKS os_sku#32026

Closed
steveej wants to merge 1 commit intohashicorp:mainfrom
steveej-forks:steveej/fix-ubuntu2404-os-sku
Closed

containers: allow Ubuntu2404 for AKS os_sku#32026
steveej wants to merge 1 commit intohashicorp:mainfrom
steveej-forks:steveej/fix-ubuntu2404-os-sku

Conversation

@steveej
Copy link
Copy Markdown

@steveej steveej commented Mar 24, 2026

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

This is a follow-up to the AKS containerservice API update in #31401.

AKS now supports Ubuntu2404 for both:

  • azurerm_kubernetes_cluster_node_pool.os_sku
  • azurerm_kubernetes_cluster.default_node_pool.os_sku

but the provider schema validation still rejects that value in both code paths.

This change updates the validation lists to accept Ubuntu2404 and adds small offline tests that lock in the expected schema behavior for both resources.

This is intended to close the remaining schema gap reported in #29827.

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.

Changes to existing Resource / Data Source

  • I have added an explanation of what my changes do and why I'd like you to include them.
  • I have written new tests for my resource or datasource changes & updated any relevant documentation.
  • I have successfully run tests with my changes locally. If not, please provide details on testing challenges that prevented you running the tests.
  • (For changes that include a state migration only). I have manually tested the migration path between relevant versions of the provider.

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

Local test run:

$ go test ./internal/services/containers -run "TestKubernetes.*Ubuntu2404" -count=1
ok  	github.com/hashicorp/terraform-provider-azurerm/internal/services/containers	0.009s

I did not run Azure acceptance tests for this change because the patch is limited to schema validation and the added tests are offline schema-level coverage.

Change Log

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

Fixes #29827

AI Assistance Disclosure

  • AI Assisted - This contribution was made by, or with the assistance of, AI/LLMs

AI was used to help identify the remaining schema-validation call sites and draft the initial offline schema tests. The final patch and local validation were reviewed and run manually.

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the provider.

Changes to Security Controls

No changes to security controls.

Changes:
- allow `Ubuntu2404` in the AKS node pool `os_sku` schema validation list
- allow `Ubuntu2404` in the AKS default node pool `os_sku` schema validation list
- add offline schema tests that lock in `Ubuntu2404` acceptance for both code paths

Validation:
- go test ./internal/services/containers -run "TestKubernetes.*Ubuntu2404" -count=1
string(agentpools.OSSKUAzureLinuxThree),
string(agentpools.OSSKUUbuntu),
string(agentpools.OSSKUUbuntuTwoTwoZeroFour),
string(agentpools.OSSKUUbuntuTwoFourZeroFour),
Copy link
Copy Markdown
Collaborator

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

string(agentpools.OSSKUAzureLinuxThree),
string(agentpools.OSSKUUbuntu),
string(agentpools.OSSKUUbuntuTwoTwoZeroFour),
string(agentpools.OSSKUUbuntuTwoFourZeroFour),
Copy link
Copy Markdown
Collaborator

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

@@ -0,0 +1,42 @@
// Copyright IBM Corp. 2014, 2025
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed, we don't unit test basic ValidateFuncs like validation.StringInSlice

@sreallymatt
Copy link
Copy Markdown
Collaborator

superseded by #32070

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support for os_sku Ubuntu2404

2 participants