Azure / terraform-azurerm-aks

Terraform Module for deploying an AKS cluster
MIT License
343 stars 454 forks source link

Support for cost analysis add-on [azurerm_kubernetes_cluster] #528

Open fabio-s-franco opened 5 months ago

fabio-s-franco commented 5 months ago

Is there an existing issue for this?

Description

GA for AKS cost analysis has been announced, it would be nice to have that in the cluster resource for the provider.

According to the documentation it is just a flag to enable or disable it via CLI. I am not sure how that translates to the API though as I didn't immediately find it.

New or Affected Resource(s)/Data Source(s)

azurerm_kubernetes_cluster

Potential Terraform Configuration

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_kubernetes_cluster" "example" {
  name                = "example-aks1"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name

  enable_cost_analysis = true ### Enables Azure Cost Analysis for AKS (defaults to false)

  default_node_pool {
    name       = "default"
    node_count = 1
    vm_size    = "Standard_D2_v2"
  }

  identity {
    type = "SystemAssigned"
  }
}

References

No response

zioproto commented 5 months ago

@fabio-s-franco the link you shared with the GA announcement is for another feature: https://azure.microsoft.com/updates/generally-available-vm-ip-based-load-balancer-in-aks/

The correct link is: https://azure.microsoft.com/en-gb/updates/generally-available-cost-analysis-addon-for-aks/

zioproto commented 5 months ago

Status: waiting on Terraform provider feature: https://github.com/hashicorp/terraform-provider-azurerm/issues/23982

fabio-s-franco commented 5 months ago

Ooops, thanks for letting me know @zioproto , copy past problem. I will fix it now

fabio-s-franco commented 5 months ago

I could swear that I searched for this issue and couldn't find it. Should I close this one?

zioproto commented 5 months ago

I could swear that I searched for this issue and couldn't find it. Should I close this one?

Please keep this issue open. Here we track the Terraform module support. The other issue is for the Terraform provider support. Thanks

danielkwok72 commented 5 months ago

Hi, is there an ETA when the this feature will be added to the next azurerm provider release?

zioproto commented 5 months ago

Hi, is there an ETA when the this feature will be added to the next azurerm provider release?

Please follow this issue https://github.com/hashicorp/terraform-provider-azurerm/issues/23982

@ms-henglu is working on this, and will link the PR implementing that feature on that GitHub issue. I don't have an update on the ETA yet.

zioproto commented 2 months ago

Product is GA: https://azure.microsoft.com/en-gb/updates/generally-available-cost-analysis-addon-for-aks/ https://azure.microsoft.com/en-us/updates/ga-aks-cost-views-2/

As documented in: https://github.com/hashicorp/terraform-provider-azurerm/pull/26052 It will require minimum provider version v3.106.0

led94 commented 1 month ago

Hi, is there an ETA when the this feature will be added to the next azurerm provider release?

Please follow this issue hashicorp/terraform-provider-azurerm#23982

@ms-henglu is working on this, and will link the PR implementing that feature on that GitHub issue. I don't have an update on the ETA yet.

Hi, do you have any updates of the feature? The other post, https://github.com/hashicorp/terraform-provider-azurerm/issues/23982, seems that was closed automatically.