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

CCE cluster Autoscaler addon start fail #318

Closed oboz-online closed 1 month ago

0ohmresistor commented 2 months ago

Greetings! The manifest you provided, can be deployed without errors. Looking on your logs, there is a problem with authentication, try to generate new AK/SK pair.

singeol commented 2 months ago

@oboz-online Please, check your tenant_id again. There is example, how to get tenant_id correctly:

data "sbercloud_identity_projects" "project" {
  name = <your project name>
}

data "sbercloud_cce_addon_template" "autoscaler" {
  cluster_id = sbercloud_cce_cluster.cluster.id
  name       = "autoscaler"
  version    = "1.29.17"
}

resource "sbercloud_cce_addon" "autoscaler" {
  cluster_id    = sbercloud_cce_cluster.cluster.id
  template_name = "autoscaler"
  version       = "1.29.17"

  values {
    basic_json = jsonencode(jsondecode(data.sbercloud_cce_addon_template.autoscaler.spec).basic)
    custom_json = jsonencode(merge(
      jsondecode(data.sbercloud_cce_addon_template.autoscaler.spec).parameters.custom,
      {
        cluster_id       = sbercloud_cce_cluster.cluster.id
        tenant_id        = data.sbercloud_identity_projects.project.projects[0].id
      }
    ))
  }
}