sbercloud-terraform / terraform-provider-sbercloud

Terraform SberCloud Provider
https://registry.terraform.io/providers/sbercloud-terraform/sbercloud/latest/docs
Mozilla Public License 2.0
34 stars 21 forks source link

taints in cce node pool #304

Closed OlegDyakonov closed 3 months ago

OlegDyakonov commented 3 months ago

Hi there, how do I describe the dependency block correctly? The documentation states that it needs to be declared as a list, but there are no specific examples.

resource "sbercloud_cce_node_pool" "cce-cluster-node-pool-infra" {
   cluster_id               = sbercloud_cce_cluster.cce_cluster.id
   name                     = "infra-node"
   os                       = "CentOS 7.6"
   initial_node_count       = 1
   flavor_id                = "s7n.xlarge.2"
   key_pair                  = "ms-prod-k8s-keypair"
   scall_enable             = true
   min_node_count           = 1
   max_node_count           = 5
   scale_down_cooldown_time = 100
   priority                 = 1
   root_volume {
      size       = 40
      volumetype = "SAS"
   }
   data_volumes {
      size       = 100
      volumetype = "SAS"
   }
   labels = {
      "node.kubernetes.io/role"        = "infra"
      "node.kubernetes.io/environment" = "prod"
   }

   taints {
      value = [node-role, infra, NoExecute]
   } 
OlegDyakonov commented 3 months ago

I found out that this value must be set similarly to AWS

taints { key = "node-role" value = "infra" effect = "NoExecute" }