azurerm_kubernetes_cluster

    0

    0

    lucycodes42

    Terraform snippets

    In the above code, the resource is a Kubernetes cluster and the name is "acctestaks1". The location is set to "West US". The resource group is named "test.name" and the Kubernetes version is 1.8.2. The dns_prefix for the cluster is set to "acctestagent1". The linux_profile contains the following items:

    • admin_username="acctestuser1"
    • ssh_keys="/home/myadmin/.ssh/authorized_keys"
    • key_data="${file("~/.ssh/demo_key.

    Shortcut: tf_azurerm_kubernetes_cluster

    resource "azurerm_kubernetes_cluster" "${MyResource}" {
       name                   = "acctestaks1"
       location               = "West US"
       resource_group_name    = "${azurerm_resource_group.test.name}"
       kubernetes_version     = "1.8.2"
       dns_prefix             = "acctestagent1"
       linux_profile {
         admin_username = "acctestuser1"
           ssh_keys {
             path = "/home/myadmin/.ssh/authorized_keys"
             key_data = "\${file("~/.ssh/demo_key.pub")}"
          }
       }
       agent_pool_profile {
         name              = "default"
         count             = 1
         vm_size           = "Standard_A0"
         os_type           = "Linux"
         os_disk_size_gb   = 30
       }
       service_principal {
         client_id     = "00000000-0000-0000-0000-000000000000"
         client_secret = "00000000000000000000000000000000"
       }
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.