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

Bug report- Fix default nodepool upgrade settings #2068

Closed
1 task done
caiovbraga opened this issue Oct 2, 2024 · 0 comments · Fixed by #2067
Closed
1 task done

Bug report- Fix default nodepool upgrade settings #2068

caiovbraga opened this issue Oct 2, 2024 · 0 comments · Fixed by #2067
Assignees
Labels
aks bug Something isn't working
Milestone

Comments

@caiovbraga
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

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

Version of the module you are using

5.7.14

Rover Version

No response

Terraform Version

1.9.5

AzureRM Provider Version

No response

Affected Resource(s)/Data Source(s)

azurerm_kubernetes_cluster

Terraform Configuration Files

global_settings = {
  default_region = "region1"
  regions = {
    region1 = "australiaeast"
  }
}

resource_groups = {
  aks_re1 = {
    name   = "aks-re1"
    region = "region1"
  }
}

aks_clusters = {
  cluster_re1 = {
    name               = "akscluster-re1-001"
    resource_group_key = "aks_re1"
    os_type            = "Linux"

    cost_analysis_enabled = true

    identity = {
      type = "SystemAssigned"
    }

    vnet_key = "spoke_aks_re1"

    network_profile = {
      network_plugin    = "azure"
      load_balancer_sku = "standard"
    }

    # enable_rbac = true
    role_based_access_control = {
      enabled = true
      azure_active_directory = {
        managed = true
      }
    }

    oms_agent = {
      log_analytics_key = "central_logs_region1"
    }

    # admin_groups = {
    #   # ids = []
    #   # azuread_groups = {
    #   #   keys = []
    #   # }
    # }

    load_balancer_profile = {
      # Only one option can be set
      managed_outbound_ip_count = 1
    }

    default_node_pool = {
      name    = "sharedsvc"
      vm_size = "Standard_F4s_v2"
      #subnet_key            = "aks_nodepool_system"
      subnet = {
        key = "aks_nodepool_system"
        #resource_id = "/subscriptions/97958dac-xxxx-xxxx-xxxx-9f436fa73bd4/resourceGroups/qxgc-rg-aks-re1/providers/Microsoft.Network/virtualNetworks/qxgc-vnet-aks/subnets/qxgc-snet-aks_nodepool_system"
      }
      enabled_auto_scaling        = false
      enable_node_public_ip       = false
      max_pods                    = 30
      node_count                  = 1
      os_disk_size_gb             = 512
      temporary_name_for_rotation = "temp"
      tags = {
        "project" = "system services"
      }
      upgrade_settings = { # Broken in terraform caf module.
        max_surge = "10%"
      }
    }

    node_resource_group_name = "aks-nodes-re1"

    addon_profile = {
      azure_keyvault_secrets_provider = {
        secret_rotation_enabled  = true
        secret_rotation_interval = "2m"
      }
    }
  }
}

Expected Behaviour

When adding values in the upgrade_settings block, it should not error

Actual Behaviour

Error

│ Error: Unsupported attribute
│ 
│   on .terraform/modules/caf/modules/compute/aks/aks.tf line 80, in resource "azurerm_kubernetes_cluster" "aks":
│   80:         max_surge = upgrade_settings.value.max_surge
│     ├────────────────
│     │ upgrade_settings.value is 1
│ 
│ Can't access attributes on a primitive-typed value (number).

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@caiovbraga caiovbraga added the bug Something isn't working label Oct 2, 2024
@arnaudlh arnaudlh linked a pull request Nov 11, 2024 that will close this issue
6 tasks
@arnaudlh arnaudlh added the aks label Nov 11, 2024
@arnaudlh arnaudlh added this to 2411 Nov 11, 2024
@arnaudlh arnaudlh added this to the 5.7.15 milestone Nov 11, 2024
@github-project-automation github-project-automation bot moved this to Done in 2411 Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aks bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants