Skip to content

Add TKE node pool resource #572

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

Merged
merged 39 commits into from
Dec 28, 2020
Merged

Conversation

gailwang
Copy link
Contributor

make testacc TESTARGS=" -run=TestAccTencentCloudTkeNodePoolResource"
==> Checking that code complies with gofmt requirements...
E:/gailwang_terrraform/scripts/gofmtcheck.sh: line 5: /c/Go/bin/gofmt: Argument list too long
TF_ACC=1 go test ./... -v -run=TestAccTencentCloudTkeNodePoolResource -timeout 120m
?       github.com/tencentcloudstack/terraform-provider-tencentcloud    [no test files]
testing: warning: no tests to run
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/gendoc    (cached) [no tests to run]
=== RUN   TestAccTencentCloudTkeNodePoolResource
--- PASS: TestAccTencentCloudTkeNodePoolResource (377.61s)
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud       379.094s
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity  [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper       [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit     [no test files]

apply

terraform apply
2020/12/28 12:28:50 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
  Use TF_LOG=TRACE to see Terraform's internal logs.
  ----
data.tencentcloud_vpc_subnets.vpc: Refreshing state...

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # tencentcloud_kubernetes_cluster.managed_cluster will be created
  + resource "tencentcloud_kubernetes_cluster" "managed_cluster" {
      + certification_authority      = (known after apply)
      + claim_expired_seconds        = 300
      + cluster_as_enabled           = false
      + cluster_cidr                 = "172.31.0.0/16"
      + cluster_deploy_type          = "INDEPENDENT_CLUSTER"
      + cluster_desc                 = "test cluster desc"
      + cluster_external_endpoint    = (known after apply)
      + cluster_internet             = false
      + cluster_intranet             = false
      + cluster_ipvs                 = true
      + cluster_max_pod_num          = 32
      + cluster_max_service_num      = 32
      + cluster_name                 = "tf-tke-unit-test"
      + cluster_node_num             = (known after apply)
      + cluster_os                   = "ubuntu16.04.1 LTSx86_64"
      + cluster_os_type              = "GENERAL"
      + cluster_version              = "1.18.4"
      + container_runtime            = "docker"
      + deletion_protection          = false
      + domain                       = (known after apply)
      + id                           = (known after apply)
      + ignore_cluster_cidr_conflict = false
      + is_non_static_ip_mode        = false
      + kube_config                  = (known after apply)
      + network_type                 = "GR"
      + node_name_type               = "lan-ip"
      + password                     = (known after apply)
      + pgw_endpoint                 = (known after apply)
      + security_policy              = (known after apply)
      + user_name                    = (known after apply)
      + vpc_id                       = "vpc-h70b6b49"
      + worker_instances_list        = (known after apply)

      + master_config {
          + availability_zone                       = "ap-guangzhou-3"
          + count                                   = 3
          + enhanced_monitor_service                = false
          + enhanced_security_service               = false
          + instance_charge_type                    = "POSTPAID_BY_HOUR"
          + instance_charge_type_prepaid_period     = 1
          + instance_charge_type_prepaid_renew_flag = "NOTIFY_AND_MANUAL_RENEW"
          + instance_name                           = "sub machine of tke"
          + instance_type                           = "S1.SMALL1"
          + internet_charge_type                    = "TRAFFIC_POSTPAID_BY_HOUR"
          + internet_max_bandwidth_out              = 100
          + password                                = (sensitive value)
          + public_ip_assigned                      = true
          + subnet_id                               = "subnet-1uwh63so"
          + system_disk_size                        = 60
          + system_disk_type                        = "CLOUD_SSD"
          + user_data                               = "dGVzdA=="

          + data_disk {
              + disk_size = 50
              + disk_type = "CLOUD_PREMIUM"
            }
        }
    }

  # tencentcloud_kubernetes_node_pool.mynodepool will be created
  + resource "tencentcloud_kubernetes_node_pool" "mynodepool" {
      + auto_scaling_group_id = (known after apply)
      + cluster_id            = (known after apply)
      + delete_keep_instance  = true
      + desired_capacity      = 4
      + enable_auto_scale     = true
      + id                    = (known after apply)
      + labels                = {
          + "test1" = "test1"
          + "test2" = "test2"
        }
      + launch_config_id      = (known after apply)
      + max_size              = 6
      + min_size              = 1
      + name                  = "mynodepool"
      + node_count            = (known after apply)
      + node_os               = "tlinux2.4x86_64"
      + node_os_type          = "GENERAL"
      + retry_policy          = "INCREMENTAL_INTERVALS"
      + status                = (known after apply)
      + subnet_ids            = [
          + "subnet-1uwh63so",
        ]
      + vpc_id                = "vpc-h70b6b49"

      + auto_scaling_config {
          + enhanced_monitor_service  = false
          + enhanced_security_service = false
          + instance_type             = "S1.SMALL1"
          + internet_charge_type      = "TRAFFIC_POSTPAID_BY_HOUR"
          + password                  = (sensitive value)
          + security_group_ids        = [
              + "sg-24vswocp",
            ]
          + system_disk_size          = 50
          + system_disk_type          = "CLOUD_PREMIUM"

          + data_disk {
              + disk_size = 50
              + disk_type = "CLOUD_PREMIUM"
            }
        }

      + node_config {
          + docker_graph_path = "/var/lib/docker"
          + extra_args        = [
              + "root-dir=/var/lib/kubelet",
            ]
          + is_schedule       = true
        }

      + taints {
          + effect = "PreferNoSchedule"
          + key    = "test_taint"
          + value  = "taint_value"
        }
    }

Plan: 2 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

tencentcloud_kubernetes_cluster.managed_cluster: Creating...
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [10s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [20s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [30s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [40s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [50s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [1m0s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [1m10s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [1m20s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [1m30s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [1m40s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [1m50s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [2m0s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [2m10s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [2m20s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [2m30s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [2m40s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [2m50s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [3m0s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [3m10s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [3m20s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [3m30s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [3m40s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [3m50s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [4m0s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [4m10s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [4m20s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [4m30s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [4m40s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [4m50s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [5m0s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [5m10s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [5m20s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [5m30s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [5m40s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [5m50s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [6m0s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [6m10s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [6m20s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [6m30s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [6m40s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [6m50s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still creating... [7m0s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Creation complete after 7m6s [id=cls-h4748ab8]
tencentcloud_kubernetes_node_pool.mynodepool: Creating...
tencentcloud_kubernetes_node_pool.mynodepool: Still creating... [10s elapsed]
tencentcloud_kubernetes_node_pool.mynodepool: Creation complete after 17s [id=cls-h4748ab8#np-74l8yne8]

Apply complete! Resources: 2 added, 0 changed, 0 destroyed

update

 terraform apply
2020/12/28 12:36:58 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
  Use TF_LOG=TRACE to see Terraform's internal logs.
  ----
data.tencentcloud_vpc_subnets.vpc: Refreshing state...
tencentcloud_kubernetes_cluster.managed_cluster: Refreshing state... [id=cls-h4748ab8]
tencentcloud_kubernetes_node_pool.mynodepool: Refreshing state... [id=cls-h4748ab8#np-74l8yne8]

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # tencentcloud_kubernetes_node_pool.mynodepool will be updated in-place
  ~ resource "tencentcloud_kubernetes_node_pool" "mynodepool" {
        auto_scaling_group_id = "asg-7rfl1zow"
        cluster_id            = "cls-h4748ab8"
      ~ delete_keep_instance  = true -> false
      ~ desired_capacity      = 4 -> 5
        enable_auto_scale     = true
        id                    = "cls-h4748ab8#np-74l8yne8"
        labels                = {
            "test1" = "test1"
            "test2" = "test2"
        }
        launch_config_id      = "asc-8ad42vd2"
      ~ max_size              = 6 -> 5
      ~ min_size              = 1 -> 2
        name                  = "mynodepool"
        node_os               = "tlinux2.4x86_64"
        node_os_type          = "GENERAL"
        retry_policy          = "INCREMENTAL_INTERVALS"
        status                = "normal"
        subnet_ids            = [
            "subnet-1uwh63so",
        ]
        vpc_id                = "vpc-h70b6b49"

        auto_scaling_config {
            enhanced_monitor_service  = false
            enhanced_security_service = false
            instance_type             = "S1.SMALL1"
            internet_charge_type      = "TRAFFIC_POSTPAID_BY_HOUR"
            key_ids                   = []
            password                  = (sensitive value)
            security_group_ids        = [
                "sg-24vswocp",
            ]
            system_disk_size          = 50
            system_disk_type          = "CLOUD_PREMIUM"

            data_disk {
                disk_size = 50
                disk_type = "CLOUD_PREMIUM"
            }
        }

        node_config {
            docker_graph_path = "/var/lib/docker"
            extra_args        = [
                "root-dir=/var/lib/kubelet",
            ]
            is_schedule       = true
        }

        taints {
            effect = "PreferNoSchedule"
            key    = "test_taint"
            value  = "taint_value"
        }
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

tencentcloud_kubernetes_node_pool.mynodepool: Modifying... [id=cls-h4748ab8#np-74l8yne8]
tencentcloud_kubernetes_node_pool.mynodepool: Modifications complete after 1s [id=cls-h4748ab8#np-74l8yne8]

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

double apply

terraform apply
2020/12/28 12:37:44 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
  Use TF_LOG=TRACE to see Terraform's internal logs.
  ----
data.tencentcloud_vpc_subnets.vpc: Refreshing state...
tencentcloud_kubernetes_cluster.managed_cluster: Refreshing state... [id=cls-h4748ab8]
tencentcloud_kubernetes_node_pool.mynodepool: Refreshing state... [id=cls-h4748ab8#np-74l8yne8]

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

destroy

terraform destroy
2020/12/28 12:49:47 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
  Use TF_LOG=TRACE to see Terraform's internal logs.
  ----
data.tencentcloud_vpc_subnets.vpc: Refreshing state...
tencentcloud_kubernetes_cluster.managed_cluster: Refreshing state... [id=cls-h4748ab8]
tencentcloud_kubernetes_node_pool.mynodepool: Refreshing state... [id=cls-h4748ab8#np-74l8yne8]

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  # tencentcloud_kubernetes_cluster.managed_cluster will be destroyed
  - resource "tencentcloud_kubernetes_cluster" "managed_cluster" {
      - certification_authority      = <<~EOT
            -----BEGIN CERTIFICATE-----
            MIIDZDCCAkygAwIBAgIIL8Y/THMTmJ4wDQYJKoZIhvcNAQELBQAwUDELMAkGA1UE
            BhMCQ04xKjARBgNVBAoTCnRlbmNlbnR5dW4wFQYDVQQKEw5zeXN0ZW06bWFzdGVy
            czEVMBMGA1UEAxMMY2xzLWg0NzQ4YWI4MB4XDTIwMTIyODA0MzA1NVoXDTQwMTIy
            ODA0MzA1NVowUDELMAkGA1UEBhMCQ04xKjARBgNVBAoTCnRlbmNlbnR5dW4wFQYD
            VQQKEw5zeXN0ZW06bWFzdGVyczEVMBMGA1UEAxMMY2xzLWg0NzQ4YWI4MIIBIjAN
            BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt8LWhxJmBHt4VCk8bI8VRSYBikoB
            QMBOabcTmBTU+ro6CCFgYYdEU5cMpeiF4nEF0znX8oEmFzphcRbncSaao0AWR9gU
            oGlJEJEPFJ5oVHlXM8HENsS8Lswyg5OLiv0GqU6ZSAjrROF0OXld8+40j1qmzo+q
            kisjrzGY9UtJ+qjerukM1NOmo5ijwZFKCJAJGnmZBO16cPK2Y4LO+gLDtUFnYs2K
            3ipH3vwuxY6Ja0uHmqia/cGF3Ap2NAWUZwY1GHRQ2c0GmBdv7b+XFA5yOBIaGi4i
            r6bvUe/Eq9FfBIue+HNglnzxo8Txl+3OfVfVOFmPR8zAVOhF+5GPKwtghwIDAQAB
            o0IwQDAOBgNVHQ8BAf8EBAMCAoQwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUF
            BwMBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAAMKfoAtOZfn
            Qry5bCW7pHlHlFG8M81sBtV9oQZN3p0zw+HHxBszxChdc1lcOXuoyd83Zk5zCEul
            VW779CyEmDkCSTSSWNepNPObIkXwsCYsRCsKpDBwloXAVkCpHdJ+RdVln22gvlfl
            QMELTmeF6JqNaq63n6cxHzIZ0BfqUi1FxIyVfr3IBBIjN2O5A0fpHkFo+MqhKyQG
            NLvd7tmgjPi6A3xTuAgGYxOeBk0LXEEWe8vnuNMabATo2TmCRLvRBnHeUa5nbqg/
            971oKTq8NGojdrAbd1678eLCiJfrMozMg1ZFCceYwugmLtJtTjWfvU35pu3aLfom
            wx0Umtl6e60=
            -----END CERTIFICATE-----
        EOT -> null
      - claim_expired_seconds        = 300 -> null
      - cluster_as_enabled           = false -> null
      - cluster_cidr                 = "172.31.0.0/16" -> null
      - cluster_deploy_type          = "INDEPENDENT_CLUSTER" -> null
      - cluster_desc                 = "test cluster desc" -> null
      - cluster_internet             = false -> null
      - cluster_intranet             = false -> null
      - cluster_ipvs                 = true -> null
      - cluster_max_pod_num          = 32 -> null
      - cluster_max_service_num      = 32 -> null
      - cluster_name                 = "tf-tke-unit-test" -> null
      - cluster_node_num             = 5 -> null
      - cluster_os                   = "ubuntu16.04.1 LTSx86_64" -> null
      - cluster_os_type              = "GENERAL" -> null
      - cluster_version              = "1.18.4" -> null
      - container_runtime            = "docker" -> null
      - deletion_protection          = false -> null
      - domain                       = "cls-h4748ab8-kubelb.gz.1259649581.clb.myqcloud.com" -> null
      - id                           = "cls-h4748ab8" -> null
      - ignore_cluster_cidr_conflict = false -> null
      - is_non_static_ip_mode        = false -> null
      - kube_config                  = <<~EOT
            apiVersion: v1
            clusters:
            - cluster:
                certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURaRENDQWt5Z0F3SUJBZ0lJTDhZL1RITVRtSjR3RFFZSktvWklodmNOQVFFTEJRQXdVREVMTUFrR0ExVUUKQmhNQ1EwNHhLakFSQmdOVkJBb1RDblJsYm1ObGJuUjVkVzR3RlFZRFZRUUtFdzV6ZVhOMFpXMDZiV0Z6ZEdWeQpjekVWTUJNR0ExVUVBeE1NWTJ4ekxXZzBOelE0WVdJNE1CNFhEVEl3TVRJeU9EQTBNekExTlZvWERUUXdNVEl5Ck9EQTBNekExTlZvd1VERUxNQWtHQTFVRUJoTUNRMDR4S2pBUkJnTlZCQW9UQ25SbGJtTmxiblI1ZFc0d0ZRWUQKVlFRS0V3NXplWE4wWlcwNmJXRnpkR1Z5Y3pFVk1CTUdBMVVFQXhNTVkyeHpMV2cwTnpRNFlXSTRNSUlCSWpBTgpCZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUF0OExXaHhKbUJIdDRWQ2s4Ykk4VlJTWUJpa29CClFNQk9hYmNUbUJUVStybzZDQ0ZnWVlkRVU1Y01wZWlGNG5FRjB6blg4b0VtRnpwaGNSYm5jU2FhbzBBV1I5Z1UKb0dsSkVKRVBGSjVvVkhsWE04SEVOc1M4THN3eWc1T0xpdjBHcVU2WlNBanJST0YwT1hsZDgrNDBqMXFtem8rcQpraXNqcnpHWTlVdEorcWplcnVrTTFOT21vNWlqd1pGS0NKQUpHbm1aQk8xNmNQSzJZNExPK2dMRHRVRm5ZczJLCjNpcEgzdnd1eFk2SmEwdUhtcWlhL2NHRjNBcDJOQVdVWndZMUdIUlEyYzBHbUJkdjdiK1hGQTV5T0JJYUdpNGkKcjZidlVlL0VxOUZmQkl1ZStITmdsbnp4bzhUeGwrM09mVmZWT0ZtUFI4ekFWT2hGKzVHUEt3dGdod0lEQVFBQgpvMEl3UURBT0JnTlZIUThCQWY4RUJBTUNBb1F3SFFZRFZSMGxCQll3RkFZSUt3WUJCUVVIQXdJR0NDc0dBUVVGCkJ3TUJNQThHQTFVZEV3RUIvd1FGTUFNQkFmOHdEUVlKS29aSWh2Y05BUUVMQlFBRGdnRUJBQU1LZm9BdE9aZm4KUXJ5NWJDVzdwSGxIbEZHOE04MXNCdFY5b1FaTjNwMHp3K0hIeEJzenhDaGRjMWxjT1h1b3lkODNaazV6Q0V1bApWVzc3OUN5RW1Ea0NTVFNTV05lcE5QT2JJa1h3c0NZc1JDc0twREJ3bG9YQVZrQ3BIZEorUmRWbG4yMmd2bGZsClFNRUxUbWVGNkpxTmFxNjNuNmN4SHpJWjBCZnFVaTFGeEl5VmZyM0lCQklqTjJPNUEwZnBIa0ZvK01xaEt5UUcKTkx2ZDd0bWdqUGk2QTN4VHVBZ0dZeE9lQmswTFhFRVdlOHZudU5NYWJBVG8yVG1DUkx2UkJuSGVVYTVuYnFnLwo5NzFvS1RxOE5Hb2pkckFiZDE2NzhlTENpSmZyTW96TWcxWkZDY2VZd3VnbUx0SnRUaldmdlUzNXB1M2FMZm9tCnd4MFVtdGw2ZTYwPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
                server: https://cls-h4748ab8-kubelb.gz.1259649581.clb.myqcloud.com
              name: cls-h4748ab8
            contexts:
            - context:
                cluster: cls-h4748ab8
                user: "100010914888"
              name: cls-h4748ab8-100010914888-context-default
            current-context: cls-h4748ab8-100010914888-context-default
            kind: Config
            preferences: {}
            users:
            - name: "100010914888"
              user:
                client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURSekNDQWkrZ0F3SUJBZ0lJWU1XVno1ekJiWXd3RFFZSktvWklodmNOQVFFTEJRQXdVREVMTUFrR0ExVUUKQmhNQ1EwNHhLakFSQmdOVkJBb1RDblJsYm1ObGJuUjVkVzR3RlFZRFZRUUtFdzV6ZVhOMFpXMDZiV0Z6ZEdWeQpjek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hSjMKMEV1YVpWYVgzbmxXdlRCM1VFRzNFcTRMK0hCOEg1R29YUThIRFU2bEphZHIwTmFCL3FPamdkOElsVlYxSXRXaApKaTUwTUdiMUpUM2s4OGpUN2NDZ3JEMU13ODhIdXR6R0k2Q0hqWVpBK210WTYxcE9UdnZqeW5JVER3QmE3eDUyClVHMTZJN2tDZ1lFQXpDdTV4Zk1BWFUzcmJwekpRam1MamE2ZGhWRmtyRldOWXdrSWhDak5qelhZbzAzT244K0YKR0RxcG54aG1HWTZpLzJxRFF1Z3ErUVN0Z2RDZTVGQ3MvZHp0UldWbXY1ZWdjbDA2S2EzS1QxUm1VU2szbGpXWApiWStqUjFKUWU5M2xzdEhoMk5VTmExakdvL1o3NUdnbGMvUFV5VG9wOWFIcjB4NGlFODhFRDF3PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=
        EOT -> null
      - network_type                 = "GR" -> null
      - node_name_type               = "lan-ip" -> null
      - password                     = "M71qHqvLFKemTC1jzOHTtc78K9slwSjZ" -> null
      - project_id                   = 0 -> null
      - security_policy              = [] -> null
      - tags                         = {} -> null
      - user_name                    = "admin" -> null
      - vpc_id                       = "vpc-h70b6b49" -> null
      - worker_instances_list        = [
          - {
              - failed_reason  = "=Ready:True"
              - instance_id    = "ins-h4vo4pu6"
              - instance_role  = "WORKER"
              - instance_state = "running"
            },
          - {
              - failed_reason  = "=Ready:True"
              - instance_id    = "ins-n0qfwrai"
              - instance_role  = "WORKER"
              - instance_state = "running"
            },
          - {
              - failed_reason  = "=Ready:True"
              - instance_id    = "ins-l76bsdr6"
              - instance_role  = "WORKER"
              - instance_state = "running"
            },
          - {
              - failed_reason  = "=Ready:True"
              - instance_id    = "ins-24hz5xr8"
              - instance_role  = "WORKER"
              - instance_state = "running"
            },
          - {
              - failed_reason  = "=Ready:True"
              - instance_id    = "ins-nwuuskn6"
              - instance_role  = "WORKER"
              - instance_state = "running"
            },
        ] -> null

      - master_config {
          - availability_zone                       = "ap-guangzhou-3" -> null
          - count                                   = 3 -> null
          - enhanced_monitor_service                = false -> null
          - enhanced_security_service               = false -> null
          - instance_charge_type                    = "POSTPAID_BY_HOUR" -> null
          - instance_charge_type_prepaid_period     = 1 -> null
          - instance_charge_type_prepaid_renew_flag = "NOTIFY_AND_MANUAL_RENEW" -> null
          - instance_name                           = "sub machine of tke" -> null
          - instance_type                           = "S1.SMALL1" -> null
          - internet_charge_type                    = "TRAFFIC_POSTPAID_BY_HOUR" -> null
          - internet_max_bandwidth_out              = 100 -> null
          - key_ids                                 = [] -> null
          - password                                = (sensitive value)
          - public_ip_assigned                      = true -> null
          - security_group_ids                      = [] -> null
          - subnet_id                               = "subnet-1uwh63so" -> null
          - system_disk_size                        = 60 -> null
          - system_disk_type                        = "CLOUD_SSD" -> null
          - user_data                               = "dGVzdA==" -> null

          - data_disk {
              - disk_size = 50 -> null
              - disk_type = "CLOUD_PREMIUM" -> null
            }
        }
    }

  # tencentcloud_kubernetes_node_pool.mynodepool will be destroyed
  - resource "tencentcloud_kubernetes_node_pool" "mynodepool" {
      - auto_scaling_group_id = "asg-7rfl1zow" -> null
      - cluster_id            = "cls-h4748ab8" -> null
      - delete_keep_instance  = false -> null
      - desired_capacity      = 5 -> null
      - enable_auto_scale     = true -> null
      - id                    = "cls-h4748ab8#np-74l8yne8" -> null
      - labels                = {
          - "test1" = "test1"
          - "test2" = "test2"
        } -> null
      - launch_config_id      = "asc-8ad42vd2" -> null
      - max_size              = 5 -> null
      - min_size              = 2 -> null
      - name                  = "mynodepool" -> null
      - node_os               = "ubuntu18.04.1x86_64" -> null
      - node_os_type          = "GENERAL" -> null
      - retry_policy          = "INCREMENTAL_INTERVALS" -> null
      - status                = "normal" -> null
      - subnet_ids            = [
          - "subnet-1uwh63so",
        ] -> null
      - vpc_id                = "vpc-h70b6b49" -> null

      - auto_scaling_config {
          - enhanced_monitor_service  = false -> null
          - enhanced_security_service = false -> null
          - instance_type             = "S1.SMALL1" -> null
          - internet_charge_type      = "TRAFFIC_POSTPAID_BY_HOUR" -> null
          - key_ids                   = [] -> null
          - password                  = (sensitive value)
          - security_group_ids        = [
              - "sg-24vswocp",
            ] -> null
          - system_disk_size          = 50 -> null
          - system_disk_type          = "CLOUD_PREMIUM" -> null

          - data_disk {
              - disk_size = 50 -> null
              - disk_type = "CLOUD_PREMIUM" -> null
            }
        }

      - node_config {
          - docker_graph_path = "/var/lib/docker" -> null
          - extra_args        = [
              - "root-dir=/var/lib/kubelet",
            ] -> null
          - is_schedule       = true -> null
        }

      - taints {
          - effect = "PreferNoSchedule" -> null
          - key    = "test_taint" -> null
          - value  = "taint_value" -> null
        }
    }

Plan: 0 to add, 0 to change, 2 to destroy.

Do you really want to destroy all resources?
  Terraform will destroy all your managed infrastructure, as shown above.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value: yes

tencentcloud_kubernetes_node_pool.mynodepool: Destroying... [id=cls-h4748ab8#np-74l8yne8]
tencentcloud_kubernetes_node_pool.mynodepool: Destruction complete after 1s
tencentcloud_kubernetes_cluster.managed_cluster: Destroying... [id=cls-h4748ab8]
tencentcloud_kubernetes_cluster.managed_cluster: Still destroying... [id=cls-h4748ab8, 10s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still destroying... [id=cls-h4748ab8, 20s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still destroying... [id=cls-h4748ab8, 30s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still destroying... [id=cls-h4748ab8, 40s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Still destroying... [id=cls-h4748ab8, 50s elapsed]
tencentcloud_kubernetes_cluster.managed_cluster: Destruction complete after 56s

Destroy complete! Resources: 2 destroyed.

@oliverpei oliverpei merged commit b45a485 into tencentcloudstack:master Dec 28, 2020
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