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

Enhancements: node labels and Terraform PR comments #43

Merged
merged 43 commits into from
Aug 15, 2023
Merged

Conversation

atiterlea
Copy link
Collaborator

No description provided.

@atiterlea atiterlea temporarily deployed to azure August 11, 2023 17:14 — with GitHub Actions Inactive
@atiterlea atiterlea temporarily deployed to azure August 11, 2023 21:55 — with GitHub Actions Inactive
@atiterlea atiterlea temporarily deployed to azure August 15, 2023 17:28 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

Execution result of show -no-color plan.out in infra/live/azure/linux-public/ :


Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place
  - destroy
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.acr.azurerm_container_registry.self will be updated in-place
  ~ resource "azurerm_container_registry" "self" {
        id                            = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.ContainerRegistry/registries/sk8simgs"
        name                          = "sk8simgs"
      ~ public_network_access_enabled = true -> false
        tags                          = {}
        # (15 unchanged attributes hidden)
    }

  # module.aks.azurerm_kubernetes_cluster.self must be replaced
-/+ resource "azurerm_kubernetes_cluster" "self" {
      ~ api_server_authorized_ip_ranges     = [] -> (known after apply)
      - azure_policy_enabled                = false -> null
      - enable_pod_security_policy          = false -> null
      ~ fqdn                                = "sk8s-g62vbtzn.hcp.eastus.azmk8s.io" -> (known after apply)
      - http_application_routing_enabled    = false -> null
      + http_application_routing_zone_name  = (known after apply)
      ~ id                                  = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.ContainerService/managedClusters/sk8s" -> (known after apply)
      ~ kube_admin_config                   = (sensitive value)
      + kube_admin_config_raw               = (sensitive value)
      ~ kube_config                         = (sensitive value)
      ~ kube_config_raw                     = (sensitive value)
      ~ kubernetes_version                  = "1.25.11" -> (known after apply)
      - local_account_disabled              = false -> null
        name                                = "sk8s"
      ~ node_resource_group_id              = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster-sk8s" -> (known after apply)
      - oidc_issuer_enabled                 = false -> null
      + oidc_issuer_url                     = (known after apply)
      - open_service_mesh_enabled           = false -> null
      ~ portal_fqdn                         = "sk8s-g62vbtzn.portal.hcp.eastus.azmk8s.io" -> (known after apply)
      + private_dns_zone_id                 = (known after apply)
      + private_fqdn                        = (known after apply)
      - tags                                = {} -> null
        # (13 unchanged attributes hidden)

      ~ aci_connector_linux {
          ~ connector_identity = [
              - {
                  - client_id                 = "b357c653-7404-45ab-9c53-3784e5a30acf"
                  - object_id                 = "6d9dab5f-4769-40cf-9bbf-28b9f44faa7f"
                  - user_assigned_identity_id = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourcegroups/sk8s-cluster-sk8s/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aciconnectorlinux-sk8s"
                },
            ] -> (known after apply)
            # (1 unchanged attribute hidden)
        }

      ~ auto_scaler_profile {
          ~ empty_bulk_delete_max            = "10" -> (known after apply)
          ~ max_graceful_termination_sec     = "600" -> (known after apply)
          ~ new_pod_scale_up_delay           = "0s" -> (known after apply)
          ~ scale_down_delay_after_add       = "10m" -> (known after apply)
          ~ scale_down_delay_after_delete    = "10s" -> (known after apply)
          ~ scale_down_delay_after_failure   = "3m" -> (known after apply)
          ~ scale_down_unneeded              = "10m" -> (known after apply)
          ~ scale_down_unready               = "20m" -> (known after apply)
          ~ scale_down_utilization_threshold = "0.5" -> (known after apply)
          ~ scan_interval                    = "10s" -> (known after apply)
            # (7 unchanged attributes hidden)
        }

      ~ default_node_pool {
          - custom_ca_trust_enabled      = false -> null
          - enable_host_encryption       = false -> null
          - enable_node_public_ip        = false -> null
          - fips_enabled                 = false -> null
          ~ kubelet_disk_type            = "OS" -> (known after apply)
          ~ max_pods                     = 30 -> (known after apply)
            name                         = "hot"
          ~ node_count                   = 4 -> (known after apply)
          ~ node_labels                  = {} -> (known after apply)
          - node_taints                  = [] -> null
          - only_critical_addons_enabled = false -> null
          ~ orchestrator_version         = "1.25.11" -> (known after apply)
          ~ os_disk_size_gb              = 128 -> (known after apply)
          ~ os_sku                       = "Ubuntu" -> (known after apply)
          ~ tags                         = {
              + "owner"   = "GitHub Practice"
              + "project" = "Sk8s"
            }
          + workload_runtime             = (known after apply)
            # (10 unchanged attributes hidden)
        }

      ~ identity {
          - identity_ids = [] -> null
          ~ principal_id = "360399eb-46fd-44a6-a6fe-f43c7cad536c" -> (known after apply)
          ~ tenant_id    = "1b4a4fed-fed8-4823-a8a0-3d5cea83d122" -> (known after apply)
            # (1 unchanged attribute hidden)
        }

      - kubelet_identity {
          - client_id                 = "cd864993-2379-4e32-9d12-bed93bcfba81" -> null
          - object_id                 = "c97e452b-a200-4d07-b839-31451587d4e3" -> null
          - user_assigned_identity_id = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster-sk8s/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sk8s-agentpool" -> null
        }

      ~ network_profile {
          ~ docker_bridge_cidr = "172.17.0.1/16" -> (known after apply)
          ~ ip_versions        = [
              - "IPv4",
            ] -> (known after apply)
          + network_mode       = (known after apply)
          ~ network_policy     = "azure" -> "calico" # forces replacement
          + pod_cidr           = (known after apply)
          ~ pod_cidrs          = [] -> (known after apply)
          ~ service_cidrs      = [
              - "10.1.64.0/18",
            ] -> (known after apply)
            # (5 unchanged attributes hidden)

          - load_balancer_profile {
              - effective_outbound_ips      = [
                  - "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster-sk8s/providers/Microsoft.Network/publicIPAddresses/e3dd69c0-69f3-42eb-8752-775e1be6a594",
                ] -> null
              - idle_timeout_in_minutes     = 0 -> null
              - managed_outbound_ip_count   = 1 -> null
              - managed_outbound_ipv6_count = 0 -> null
              - outbound_ip_address_ids     = [] -> null
              - outbound_ip_prefix_ids      = [] -> null
              - outbound_ports_allocated    = 0 -> null
            }
        }

      + oms_agent {
          + log_analytics_workspace_id = (known after apply)
          + oms_agent_identity         = (known after apply)
        }

      - windows_profile {
          - admin_username = "azureuser" -> null
        }
    }

  # module.aks.azurerm_kubernetes_cluster_node_pool.self["win"] will be destroyed
  # (because key ["win"] is not in for_each map)
  - resource "azurerm_kubernetes_cluster_node_pool" "self" {
      - custom_ca_trust_enabled = false -> null
      - enable_auto_scaling     = true -> null
      - enable_host_encryption  = false -> null
      - enable_node_public_ip   = false -> null
      - fips_enabled            = false -> null
      - id                      = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.ContainerService/managedClusters/sk8s/agentPools/win" -> null
      - kubelet_disk_type       = "OS" -> null
      - kubernetes_cluster_id   = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.ContainerService/managedClusters/sk8s" -> null
      - max_count               = 3 -> null
      - max_pods                = 30 -> null
      - min_count               = 1 -> null
      - mode                    = "User" -> null
      - name                    = "win" -> null
      - node_count              = 1 -> null
      - node_labels             = {} -> null
      - node_taints             = [] -> null
      - orchestrator_version    = "1.25.11" -> null
      - os_disk_size_gb         = 128 -> null
      - os_disk_type            = "Managed" -> null
      - os_sku                  = "Windows2022" -> null
      - os_type                 = "Windows" -> null
      - priority                = "Regular" -> null
      - scale_down_mode         = "Delete" -> null
      - spot_max_price          = -1 -> null
      - tags                    = {} -> null
      - ultra_ssd_enabled       = false -> null
      - vm_size                 = "Standard_D2s_v3" -> null
      - vnet_subnet_id          = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.Network/virtualNetworks/sk8s-cluster-vnet/subnets/nodes" -> null
      - zones                   = [
          - "1",
          - "2",
          - "3",
        ] -> null
    }

  # module.aks.azurerm_log_analytics_solution.self[0] will be created
  + resource "azurerm_log_analytics_solution" "self" {
      + id                    = (known after apply)
      + location              = "eastus"
      + resource_group_name   = "sk8s-cluster"
      + solution_name         = "ContainerInsights"
      + tags                  = {
          + "owner"   = "GitHub Practice"
          + "project" = "Sk8s"
        }
      + workspace_name        = "sk8s-cluster-logs"
      + workspace_resource_id = (known after apply)

      + plan {
          + name      = (known after apply)
          + product   = "OMSGallery/ContainerInsights"
          + publisher = "Microsoft"
        }
    }

  # module.aks.azurerm_log_analytics_workspace.self[0] will be created
  + resource "azurerm_log_analytics_workspace" "self" {
      + allow_resource_only_permissions    = true
      + daily_quota_gb                     = -1
      + id                                 = (known after apply)
      + internet_ingestion_enabled         = true
      + internet_query_enabled             = true
      + local_authentication_disabled      = false
      + location                           = "eastus"
      + name                               = "sk8s-cluster-logs"
      + primary_shared_key                 = (sensitive value)
      + reservation_capacity_in_gb_per_day = (known after apply)
      + resource_group_name                = "sk8s-cluster"
      + retention_in_days                  = (known after apply)
      + secondary_shared_key               = (sensitive value)
      + sku                                = "PerGB2018"
      + tags                               = {
          + "owner"   = "GitHub Practice"
          + "project" = "Sk8s"
        }
      + workspace_id                       = (known after apply)
    }

  # module.aks.azurerm_monitor_diagnostic_setting.self[0] will be created
  + resource "azurerm_monitor_diagnostic_setting" "self" {
      + id                             = (known after apply)
      + log_analytics_destination_type = (known after apply)
      + log_analytics_workspace_id     = (known after apply)
      + name                           = "AKS Control Plane Logging"
      + target_resource_id             = (known after apply)

      + enabled_log {
          + category = "cloud-controller-manager"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }
      + enabled_log {
          + category = "cluster-autoscaler"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }
      + enabled_log {
          + category = "csi-azuredisk-controller"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }
      + enabled_log {
          + category = "csi-azurefile-controller"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }
      + enabled_log {
          + category = "csi-snapshot-controller"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }
      + enabled_log {
          + category = "kube-apiserver"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }
      + enabled_log {
          + category = "kube-controller-manager"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }
      + enabled_log {
          + category = "kube-scheduler"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }

      + metric {
          + category = "AllMetrics"
          + enabled  = false

          + retention_policy {
              + days    = 0
              + enabled = false
            }
        }
    }

  # module.aks.azurerm_role_assignment.aci-default-route[0] must be replaced
-/+ resource "azurerm_role_assignment" "aci-default-route" {
      ~ id                               = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.Network/virtualNetworks/sk8s-cluster-vnet/subnets/aci/providers/Microsoft.Authorization/roleAssignments/33e49293-b2b1-565c-500e-37f6d62ae300" -> (known after apply)
      ~ name                             = "33e49293-b2b1-565c-500e-37f6d62ae300" -> (known after apply)
      ~ principal_id                     = "6d9dab5f-4769-40cf-9bbf-28b9f44faa7f" # forces replacement -> (known after apply) # forces replacement
      ~ principal_type                   = "ServicePrincipal" -> (known after apply)
      ~ role_definition_id               = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7" -> (known after apply)
      + skip_service_principal_aad_check = (known after apply)
        # (2 unchanged attributes hidden)
    }

  # module.network.azurerm_subnet.self[1] will be updated in-place
  ~ resource "azurerm_subnet" "self" {
        id                                             = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.Network/virtualNetworks/sk8s-cluster-vnet/subnets/aci"
        name                                           = "aci"
        # (9 unchanged attributes hidden)

      - delegation {
          - name = "aciDelegation" -> null

          - service_delegation {
              - actions = [
                  - "Microsoft.Network/virtualNetworks/subnets/action",
                ] -> null
              - name    = "Microsoft.ContainerInstance/containerGroups" -> null
            }
        }
    }

  # module.network.azurerm_subnet_network_security_group_association.self[1] will be created
  + resource "azurerm_subnet_network_security_group_association" "self" {
      + id                        = (known after apply)
      + network_security_group_id = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.Network/networkSecurityGroups/sk8s-cluster-vnet-nsg"
      + subnet_id                 = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.Network/virtualNetworks/sk8s-cluster-vnet/subnets/aci"
    }

Plan: 6 to add, 2 to change, 3 to destroy.

@atiterlea atiterlea temporarily deployed to azure August 15, 2023 17:55 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

Execution result of show -no-color plan.out in infra/live/azure/linux-public/ :


Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place
  - destroy
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.acr.azurerm_container_registry.self will be updated in-place
  ~ resource "azurerm_container_registry" "self" {
        id                            = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.ContainerRegistry/registries/sk8simgs"
        name                          = "sk8simgs"
      ~ public_network_access_enabled = true -> false
        tags                          = {}
        # (15 unchanged attributes hidden)
    }

  # module.aks.azurerm_kubernetes_cluster.self must be replaced
-/+ resource "azurerm_kubernetes_cluster" "self" {
      ~ api_server_authorized_ip_ranges     = [] -> (known after apply)
      - azure_policy_enabled                = false -> null
      - enable_pod_security_policy          = false -> null
      ~ fqdn                                = "sk8s-g62vbtzn.hcp.eastus.azmk8s.io" -> (known after apply)
      - http_application_routing_enabled    = false -> null
      + http_application_routing_zone_name  = (known after apply)
      ~ id                                  = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.ContainerService/managedClusters/sk8s" -> (known after apply)
      ~ kube_admin_config                   = (sensitive value)
      + kube_admin_config_raw               = (sensitive value)
      ~ kube_config                         = (sensitive value)
      ~ kube_config_raw                     = (sensitive value)
      ~ kubernetes_version                  = "1.25.11" -> (known after apply)
      - local_account_disabled              = false -> null
        name                                = "sk8s"
      ~ node_resource_group_id              = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster-sk8s" -> (known after apply)
      - oidc_issuer_enabled                 = false -> null
      + oidc_issuer_url                     = (known after apply)
      - open_service_mesh_enabled           = false -> null
      ~ portal_fqdn                         = "sk8s-g62vbtzn.portal.hcp.eastus.azmk8s.io" -> (known after apply)
      + private_dns_zone_id                 = (known after apply)
      + private_fqdn                        = (known after apply)
      - tags                                = {} -> null
        # (13 unchanged attributes hidden)

      ~ aci_connector_linux {
          ~ connector_identity = [
              - {
                  - client_id                 = "b357c653-7404-45ab-9c53-3784e5a30acf"
                  - object_id                 = "6d9dab5f-4769-40cf-9bbf-28b9f44faa7f"
                  - user_assigned_identity_id = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourcegroups/sk8s-cluster-sk8s/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aciconnectorlinux-sk8s"
                },
            ] -> (known after apply)
            # (1 unchanged attribute hidden)
        }

      ~ auto_scaler_profile {
          ~ empty_bulk_delete_max            = "10" -> (known after apply)
          ~ max_graceful_termination_sec     = "600" -> (known after apply)
          ~ new_pod_scale_up_delay           = "0s" -> (known after apply)
          ~ scale_down_delay_after_add       = "10m" -> (known after apply)
          ~ scale_down_delay_after_delete    = "10s" -> (known after apply)
          ~ scale_down_delay_after_failure   = "3m" -> (known after apply)
          ~ scale_down_unneeded              = "10m" -> (known after apply)
          ~ scale_down_unready               = "20m" -> (known after apply)
          ~ scale_down_utilization_threshold = "0.5" -> (known after apply)
          ~ scan_interval                    = "10s" -> (known after apply)
            # (7 unchanged attributes hidden)
        }

      ~ default_node_pool {
          - custom_ca_trust_enabled      = false -> null
          - enable_host_encryption       = false -> null
          - enable_node_public_ip        = false -> null
          - fips_enabled                 = false -> null
          ~ kubelet_disk_type            = "OS" -> (known after apply)
          ~ max_pods                     = 30 -> (known after apply)
            name                         = "hot"
          ~ node_count                   = 4 -> (known after apply)
          ~ node_labels                  = {} -> (known after apply)
          - node_taints                  = [] -> null
          - only_critical_addons_enabled = false -> null
          ~ orchestrator_version         = "1.25.11" -> (known after apply)
          ~ os_disk_size_gb              = 128 -> (known after apply)
          ~ os_sku                       = "Ubuntu" -> (known after apply)
          ~ tags                         = {
              + "owner"   = "GitHub Practice"
              + "project" = "Sk8s"
            }
          + workload_runtime             = (known after apply)
            # (10 unchanged attributes hidden)
        }

      ~ identity {
          - identity_ids = [] -> null
          ~ principal_id = "360399eb-46fd-44a6-a6fe-f43c7cad536c" -> (known after apply)
          ~ tenant_id    = "1b4a4fed-fed8-4823-a8a0-3d5cea83d122" -> (known after apply)
            # (1 unchanged attribute hidden)
        }

      - kubelet_identity {
          - client_id                 = "cd864993-2379-4e32-9d12-bed93bcfba81" -> null
          - object_id                 = "c97e452b-a200-4d07-b839-31451587d4e3" -> null
          - user_assigned_identity_id = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster-sk8s/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sk8s-agentpool" -> null
        }

      ~ network_profile {
          ~ docker_bridge_cidr = "172.17.0.1/16" -> (known after apply)
          ~ ip_versions        = [
              - "IPv4",
            ] -> (known after apply)
          + network_mode       = (known after apply)
          ~ network_policy     = "azure" -> "calico" # forces replacement
          + pod_cidr           = (known after apply)
          ~ pod_cidrs          = [] -> (known after apply)
          ~ service_cidrs      = [
              - "10.1.64.0/18",
            ] -> (known after apply)
            # (5 unchanged attributes hidden)

          - load_balancer_profile {
              - effective_outbound_ips      = [
                  - "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster-sk8s/providers/Microsoft.Network/publicIPAddresses/e3dd69c0-69f3-42eb-8752-775e1be6a594",
                ] -> null
              - idle_timeout_in_minutes     = 0 -> null
              - managed_outbound_ip_count   = 1 -> null
              - managed_outbound_ipv6_count = 0 -> null
              - outbound_ip_address_ids     = [] -> null
              - outbound_ip_prefix_ids      = [] -> null
              - outbound_ports_allocated    = 0 -> null
            }
        }

      + oms_agent {
          + log_analytics_workspace_id = (known after apply)
          + oms_agent_identity         = (known after apply)
        }

      - windows_profile {
          - admin_username = "azureuser" -> null
        }
    }

  # module.aks.azurerm_kubernetes_cluster_node_pool.self["builds"] will be created
  + resource "azurerm_kubernetes_cluster_node_pool" "self" {
      + enable_auto_scaling   = true
      + id                    = (known after apply)
      + kubelet_disk_type     = (known after apply)
      + kubernetes_cluster_id = (known after apply)
      + max_count             = 3
      + max_pods              = (known after apply)
      + min_count             = 1
      + mode                  = "User"
      + name                  = "builds"
      + node_count            = (known after apply)
      + node_labels           = (known after apply)
      + orchestrator_version  = (known after apply)
      + os_disk_size_gb       = (known after apply)
      + os_disk_type          = "Managed"
      + os_sku                = (known after apply)
      + os_type               = "Linux"
      + priority              = "Regular"
      + scale_down_mode       = "Delete"
      + spot_max_price        = -1
      + tags                  = {
          + "owner"   = "GitHub Practice"
          + "project" = "Sk8s"
        }
      + ultra_ssd_enabled     = false
      + vm_size               = "Standard_D2s_v3"
      + vnet_subnet_id        = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.Network/virtualNetworks/sk8s-cluster-vnet/subnets/nodes"
      + zones                 = [
          + "1",
          + "2",
          + "3",
        ]
    }

  # module.aks.azurerm_kubernetes_cluster_node_pool.self["win"] will be destroyed
  # (because key ["win"] is not in for_each map)
  - resource "azurerm_kubernetes_cluster_node_pool" "self" {
      - custom_ca_trust_enabled = false -> null
      - enable_auto_scaling     = true -> null
      - enable_host_encryption  = false -> null
      - enable_node_public_ip   = false -> null
      - fips_enabled            = false -> null
      - id                      = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.ContainerService/managedClusters/sk8s/agentPools/win" -> null
      - kubelet_disk_type       = "OS" -> null
      - kubernetes_cluster_id   = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.ContainerService/managedClusters/sk8s" -> null
      - max_count               = 3 -> null
      - max_pods                = 30 -> null
      - min_count               = 1 -> null
      - mode                    = "User" -> null
      - name                    = "win" -> null
      - node_count              = 1 -> null
      - node_labels             = {} -> null
      - node_taints             = [] -> null
      - orchestrator_version    = "1.25.11" -> null
      - os_disk_size_gb         = 128 -> null
      - os_disk_type            = "Managed" -> null
      - os_sku                  = "Windows2022" -> null
      - os_type                 = "Windows" -> null
      - priority                = "Regular" -> null
      - scale_down_mode         = "Delete" -> null
      - spot_max_price          = -1 -> null
      - tags                    = {} -> null
      - ultra_ssd_enabled       = false -> null
      - vm_size                 = "Standard_D2s_v3" -> null
      - vnet_subnet_id          = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.Network/virtualNetworks/sk8s-cluster-vnet/subnets/nodes" -> null
      - zones                   = [
          - "1",
          - "2",
          - "3",
        ] -> null
    }

  # module.aks.azurerm_log_analytics_solution.self[0] will be created
  + resource "azurerm_log_analytics_solution" "self" {
      + id                    = (known after apply)
      + location              = "eastus"
      + resource_group_name   = "sk8s-cluster"
      + solution_name         = "ContainerInsights"
      + tags                  = {
          + "owner"   = "GitHub Practice"
          + "project" = "Sk8s"
        }
      + workspace_name        = "sk8s-cluster-logs"
      + workspace_resource_id = (known after apply)

      + plan {
          + name      = (known after apply)
          + product   = "OMSGallery/ContainerInsights"
          + publisher = "Microsoft"
        }
    }

  # module.aks.azurerm_log_analytics_workspace.self[0] will be created
  + resource "azurerm_log_analytics_workspace" "self" {
      + allow_resource_only_permissions    = true
      + daily_quota_gb                     = -1
      + id                                 = (known after apply)
      + internet_ingestion_enabled         = true
      + internet_query_enabled             = true
      + local_authentication_disabled      = false
      + location                           = "eastus"
      + name                               = "sk8s-cluster-logs"
      + primary_shared_key                 = (sensitive value)
      + reservation_capacity_in_gb_per_day = (known after apply)
      + resource_group_name                = "sk8s-cluster"
      + retention_in_days                  = (known after apply)
      + secondary_shared_key               = (sensitive value)
      + sku                                = "PerGB2018"
      + tags                               = {
          + "owner"   = "GitHub Practice"
          + "project" = "Sk8s"
        }
      + workspace_id                       = (known after apply)
    }

  # module.aks.azurerm_monitor_diagnostic_setting.self[0] will be created
  + resource "azurerm_monitor_diagnostic_setting" "self" {
      + id                             = (known after apply)
      + log_analytics_destination_type = (known after apply)
      + log_analytics_workspace_id     = (known after apply)
      + name                           = "AKS Control Plane Logging"
      + target_resource_id             = (known after apply)

      + enabled_log {
          + category = "cloud-controller-manager"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }
      + enabled_log {
          + category = "cluster-autoscaler"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }
      + enabled_log {
          + category = "csi-azuredisk-controller"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }
      + enabled_log {
          + category = "csi-azurefile-controller"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }
      + enabled_log {
          + category = "csi-snapshot-controller"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }
      + enabled_log {
          + category = "kube-apiserver"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }
      + enabled_log {
          + category = "kube-controller-manager"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }
      + enabled_log {
          + category = "kube-scheduler"

          + retention_policy {
              + days    = 7
              + enabled = true
            }
        }

      + metric {
          + category = "AllMetrics"
          + enabled  = false

          + retention_policy {
              + days    = 0
              + enabled = false
            }
        }
    }

  # module.aks.azurerm_role_assignment.aci-default-route[0] must be replaced
-/+ resource "azurerm_role_assignment" "aci-default-route" {
      ~ id                               = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.Network/virtualNetworks/sk8s-cluster-vnet/subnets/aci/providers/Microsoft.Authorization/roleAssignments/33e49293-b2b1-565c-500e-37f6d62ae300" -> (known after apply)
      ~ name                             = "33e49293-b2b1-565c-500e-37f6d62ae300" -> (known after apply)
      ~ principal_id                     = "6d9dab5f-4769-40cf-9bbf-28b9f44faa7f" # forces replacement -> (known after apply) # forces replacement
      ~ principal_type                   = "ServicePrincipal" -> (known after apply)
      ~ role_definition_id               = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7" -> (known after apply)
      + skip_service_principal_aad_check = (known after apply)
        # (2 unchanged attributes hidden)
    }

  # module.network.azurerm_subnet.self[1] will be updated in-place
  ~ resource "azurerm_subnet" "self" {
        id                                             = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.Network/virtualNetworks/sk8s-cluster-vnet/subnets/aci"
        name                                           = "aci"
        # (9 unchanged attributes hidden)

      - delegation {
          - name = "aciDelegation" -> null

          - service_delegation {
              - actions = [
                  - "Microsoft.Network/virtualNetworks/subnets/action",
                ] -> null
              - name    = "Microsoft.ContainerInstance/containerGroups" -> null
            }
        }
    }

  # module.network.azurerm_subnet_network_security_group_association.self[1] will be created
  + resource "azurerm_subnet_network_security_group_association" "self" {
      + id                        = (known after apply)
      + network_security_group_id = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.Network/networkSecurityGroups/sk8s-cluster-vnet-nsg"
      + subnet_id                 = "/subscriptions/3e16852e-8399-4c16-b246-16bf46bc3747/resourceGroups/sk8s-cluster/providers/Microsoft.Network/virtualNetworks/sk8s-cluster-vnet/subnets/aci"
    }

Plan: 7 to add, 2 to change, 3 to destroy.

@atiterlea atiterlea changed the title Cleanup Enhancements: node labels and Terraform PR commenting Aug 15, 2023
@atiterlea atiterlea temporarily deployed to azure August 15, 2023 20:32 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

Execution result of show -no-color plan.out in infra/live/azure/linux-public/ :


No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

@atiterlea atiterlea temporarily deployed to azure August 15, 2023 20:41 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

Execution result of show -no-color plan.out in infra/live/azure/linux-public/ :


No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

@atiterlea atiterlea changed the title Enhancements: node labels and Terraform PR commenting Enhancements: node labels and Terraform PR comments Aug 15, 2023
Copy link
Collaborator

@baserrato baserrato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's pretty neat :)

@atiterlea atiterlea merged commit 05fad05 into main Aug 15, 2023
@atiterlea atiterlea deleted the cleanup branch August 15, 2023 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants