Infograb logo
teleport_bot Terraform 리소스 참조

사용 예시

# Teleport 머신 ID 봇 생성 예제

locals {
  bot_name = "example"
}

resource "random_password" "bot_token" {
  length  = 32
  special = false
}

resource "time_offset" "bot_example_token_expiry" {
  offset_hours = 1
}

resource "teleport_provision_token" "bot_example" {
  metadata = {
    expires     = time_offset.bot_example_token_expiry.rfc3339
    description = "Terraform에 의해 생성된 ${local.bot_name}의 봇 조인 토큰"

    name = random_password.bot_token.result
  }

  spec = {
    roles       = ["Bot"]
    bot_name    = local.bot_name
    join_method = "token"
  }
}

resource "teleport_bot" "example" {
  name  = local.bot_name
  roles = ["access"]
}

스키마

필수

  • name (문자열) 봇의 이름, 즉 접두사가 없는 사용자 이름
  • roles (문자열 목록) 생성된 봇이 역할 impersonation을 통해 가질 수 있는 역할 목록.

선택 사항

  • token_id (문자열, 민감 정보) 더 이상 필요하지 않은 필드입니다. 이 필드는 더 이상 필수 사항이 아니며 효과가 없습니다.
  • token_ttl (문자열) 더 이상 필요하지 않은 필드입니다. 이 필드는 더 이상 필수 사항이 아니며 효과가 없습니다.
  • traits (문자열 목록의 맵)

읽기 전용

  • role_name (문자열) 생성된 봇 역할의 이름
  • user_name (문자열) 생성된 봇 사용자의 이름
Teleport 원문 보기