Skip to content

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

@fabio-s-franco

Description

@fabio-s-franco

Is there an existing issue for this?

  • I have searched the existing issues

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions