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

Короткоживущие токены для CRaaS #254

Open
legioner0 opened this issue Feb 22, 2024 · 0 comments
Open

Короткоживущие токены для CRaaS #254

legioner0 opened this issue Feb 22, 2024 · 0 comments
Assignees

Comments

@legioner0
Copy link

Невозможно использовать токены CRaaS для манифестов, которые будут использоваться дольше времени жизни токена.

Terraform Version

Terraform v1.6.6

Affected Resource(s)

selectel_craas_token_v1

Terraform Configuration Files

terraform {
  required_version = ">= 1.6.3"
  required_providers {
    selectel = {
      source  = "selectel/selectel"
      version = "~> 4.0.0"
    }
  }
}

variable "selectel_account" {
  description = "Selectel account"
  sensitive   = true
  type        = string
}

variable "selectel_project_id" {
  description = "Selectel project id"
  sensitive   = true
  type        = string
}

variable "selectel_username" {
  description = "Selectel OpenStack username"
  sensitive   = true
  type        = string
}

variable "selectel_password" {
  description = "Selectel OpenStack password"
  sensitive   = true
  type        = string
}

provider "selectel" {
  username    = var.selectel_username
  password    = var.selectel_password
  domain_name = var.selectel_account
}

resource "selectel_craas_registry_v1" "registry" {
  name       = "test-registry"
  project_id = var.selectel_project_id
}

resource "selectel_craas_token_v1" "token" {
  project_id = var.selectel_project_id
  token_ttl  = "12h"
}

Steps to Reproduce

  1. terraform init
  2. terraform apply
  3. подождать 12 часов
  4. terraform plan/apply/destroy - без разницы какая из трех команд. Упадет с ошибкой при обновлении состояния.

Похожую проблему можно получить быстрее чем ожидать 12 часов, если отозвать или удалить из docker registry токен вместо п.3, Тогда terraform plan/apply/destroy будет падать с ошибкой 404, так как токена нет.

@TawR1024 TawR1024 self-assigned this Aug 29, 2024
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

No branches or pull requests

2 participants