terraform-provider-azurerm icon indicating copy to clipboard operation
terraform-provider-azurerm copied to clipboard

`azurerum_kubernetes_cluster`: Support for `node_resource_group` tags

Open jeffhuenemann opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Community Note

  • Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

My org and I presume many others have mandatory tagging policies in place in Azure, both at the resource and resource group levels (for things like app ID, ownership, billing, etc.). These policies require certain tags to be present at the time of creating the resource or group.

Currently, we have to suspend/remove Azure Policies during the time of AKS cluster creation and return them to normal state later, which could be avoided if we were able to supply the needed tags during creation (or build the resource group ourselves in advance, with those tags already in place).

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

azurerm_kubernetes_cluster

Potential Terraform Configuration

resource "azurerm_kubernetes_cluster" "aks1" {

  # The Basics
  resource_group_name = data.azurerm_resource_group.rg1.name
  location            = data.azurerm_resource_group.rg1.location
  name                = var.cluster_name

  # These are the tags applied to the AKS cluster resource:
  tags = {
    cluster_level_tag1 = "value1"
    cluster_level_tag2 = var.get_some_value_from_a_variable
  }

  # [...other AKS config...]

  node_resource_group = {
    name = var.cluster_managed_resource_group_name
    tags = {
      # These tags would be applied to the Node Resource Group that is automatically created
      # when defining and creating the AKS cluster
      node_resource_group_tag1 = "a value applied specifically to the node resource group"
      node_resource_group_tag2 = var.something_else_that_comes_from_variables
    }
  }
}

References

No response

jeffhuenemann avatar May 12 '23 18:05 jeffhuenemann

Thanks for raising this request @jeffhuenemann.

We are only able to support features that are available in the AKS API. Looking at the API spec it looks like this is not available, I would suggest raising this over on Azure/AKS so that the service team can take a look at this.

stephybun avatar Feb 28 '24 08:02 stephybun

Thanks for taking the time to open this issue. It looks like the behavior you requested is not supported by the underlying AKS API so I am going to close it for now. If you create a request on AKS repo, feel free to add the link here. When it gets added, we can reopen this request or you can create a new one.

rcskosir avatar Mar 21 '24 21:03 rcskosir

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Apr 21 '24 02:04 github-actions[bot]