isovalent / terraform-azure-aks

An opinionated Terraform module that can be used to create and manage an AKS cluster in Azure in a simplified way.
Apache License 2.0
0 stars 0 forks source link

Module throws deprecation warnings #31

Open scottslowe opened 1 month ago

scottslowe commented 1 month ago

When running terraform apply, this module throws some deprecation warnings. The module still appears to work, but the deprecation warnings might be an indicator of changes we should make to prevent future issues.

The deprecation warnings are:

 Warning: Argument is deprecated

with module.aks.module.main.azurerm_kubernetes_cluster.main,
on .terraform/modules/aks.main/main.tf line 17, in resource "azurerm_kubernetes_cluster" "main":
17: resource "azurerm_kubernetes_cluster" "main" {

Azure AD Integration (legacy) (https://aka.ms/aks/aad-legacy) is deprecated
and clusters can no longer be created with the Azure AD integration (legacy)
enabled. This field must be supplied with the value `true` for AKS-managed
Entra Integration, but will be removed and defaulted to `true` for the user
in v4.0 of the AzureRM Provider.

(and one more similar warning elsewhere)

Warning: Deprecated attribute

on .terraform/modules/aks.main/main.tf line 548, in resource "azurerm_kubernetes_cluster" "main":
548:       public_network_access_enabled,

The attribute "public_network_access_enabled" is deprecated. Refer to the
provider documentation for details.

These warnings are produced both with Terraform (tested with 1.8.x) and OpenTofu (tested with 1.7.x).

ayuspin commented 1 week ago

@scottslowe both warnings should be addressed on Azure/terraform-azurerm-aks side to reflect changes in hashicorp/terraform-provider-azurerm, I don't think we can do anything about it:

https://github.com/Azure/terraform-azurerm-aks/blob/main/main.tf#L305 https://github.com/hashicorp/terraform-provider-azurerm/issues/25756

https://github.com/Azure/terraform-azurerm-aks/blob/main/main.tf#L552 https://github.com/hashicorp/terraform-provider-azurerm/pull/22478

scottslowe commented 1 week ago

I’ve opened this issue upstream: https://github.com/Azure/terraform-azurerm-aks/issues/578

lonegunmanb commented 1 week ago

To anyone who has concern about this issue: no worries about the deprecation message, these arguments would be removed in v4.0, if we could pinned the azurerm provider's major version like we have done in Azure/terraform-azurerm-aks module for this module, we'll be ok.