Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case issue with Tags in AKS Default Node Pool resource #6960

Closed
ablyler opened this issue May 15, 2020 · 2 comments
Closed

Case issue with Tags in AKS Default Node Pool resource #6960

ablyler opened this issue May 15, 2020 · 2 comments
Labels
bug service/kubernetes-cluster upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR

Comments

@ablyler
Copy link

ablyler commented May 15, 2020

Community Note

  • Please vote on this issue by adding a 👍 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

Terraform (and AzureRM Provider) Version

Terraform v0.12.25
+ provider.azurerm v2.10.0

Affected Resource(s)

  • azurerm_kubernetes_cluster

Terraform Configuration Files

resource "azurerm_kubernetes_cluster" "collabora" {
  name                            = ...
  location                        = ...
  dns_prefix                      = "aks"
  resource_group_name             = ...
  api_server_authorized_ip_ranges = ...
  kubernetes_version              = "1.15.7"

  addon_profile {
    kube_dashboard {
      enabled = false
    }
    oms_agent {
      enabled                    = true
      log_analytics_workspace_id = ...
    }
  }

  default_node_pool {
    name                = "aks"
    availability_zones  = [1, 2, 3]
    vm_size             = "Standard_D4s_v3"
    vnet_subnet_id      = ...
    enable_auto_scaling = true
    node_count          = 3
    min_count           = 3
    max_count           = 20
    type                = "VirtualMachineScaleSets"
    tags                = {
      Environment = "Production"
    }
  }

  role_based_access_control {
    enabled = "true"
  }

  service_principal {
    client_id     = ...
    client_secret = ...
  }

  network_profile {
    network_plugin    = "azure"
    load_balancer_sku = "standard"
    load_balancer_profile {
      managed_outbound_ip_count = 1
    }
  }

  tags = {
    Environment = "Production"
  }
}

Expected Behavior

Applying the configuration should change the tags and setup the resource the first time. On the second run, nothing should be changed.

Actual Behavior

During the second run, the tags are attempted to be modified. It looks like because the tags that are already present are all lowercase.

Steps to Reproduce

  1. terraform apply
  2. terraform apply
@tombuildsstuff tombuildsstuff added the upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR label May 18, 2020
@tombuildsstuff
Copy link
Contributor

hi @ablyler

Thanks for opening this issue.

Unfortunately there's a bug in the Azure Compute API (which is used by the AKS API) where tags aren't updated if the keys have different casing but the same values. From Terraform's perspective we've documented this in the v2.5 release where it was first discovered - for which the underlying issue is this bug in the Compute API.

Since this is a bug in the Azure API - rather than something we can fix in Terraform, I'm going to close this issue for the moment - but I'd suggest subscribing to Azure/azure-rest-api-specs#8982 for updates (where I've just asked for an update from the Compute Team).

Thanks!

@ghost
Copy link

ghost commented Jun 17, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Jun 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug service/kubernetes-cluster upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR
Projects
None yet
Development

No branches or pull requests

3 participants