인포레터에서 최신 DevOps 트렌드를 격주로 만나보세요!
파트 1: Terraform으로 인프라 등록하기
이 가이드는 Teleport Terraform 시작 가이드의 파트 1입니다. Terraform 시작 가이드의 범위와 목적에 대한 개요를 읽어보세요.
이 가이드는 Terraform을 사용하여 인프라 리소스를 Teleport에 등록하는 방법을 보여줍니다. 다음을 수행하게 됩니다:
- 가상 머신에서 실행 중인 Teleport Agent 풀을 배포합니다.
- 파트 2에서 이러한 리소스에 대한 액세스를 가능하게 하기 위해 Agent가 등록한 리소스에
env:dev
및env:prod
레이블을 붙입니다.
작동 방식
Agent는 인프라 리소스를 프록시하기 위해 하나 이상의 Teleport 서비스를 실행하도록 구성된 Teleport 인스턴스입니다. Teleport 클러스터에서 Agent가 어떻게 실행되는지에 대한 간략한 아키텍처 개요를 보려면 Teleport Agents 소개를 읽어보세요.
Teleport Agent를 클러스터에 조인하는 데 사용할 수 있는 여러 방법이 있으며, 서비스를 클러스터에 조인하기 가이드에서 논의합니다. 이 가이드에서는 운영자가 Auth Service에 보안 토큰을 저장하고 Agent가 클러스터에 조인하기 위해 이 토큰을 보여주는 조인 토큰 방법을 사용할 것입니다.
어떤 조인 방법을 사용하든, 다음 Terraform 리소스가 포함됩니다:
- Teleport 서비스를 실행할 컴퓨팅 인스턴스
- Agent 풀의 각 컴퓨팅 인스턴스에 대한 조인 토큰
사전 요구 사항
-
실행 중인 Teleport 클러스터 버전 16.2.0 이상. Teleport를 시작하려면 가입하여 무료 평가판을 이용하거나 데모 환경 설정 방법을 확인하십시오.
-
tctl
관리자 도구와tsh
클라이언트 도구.tctl
및tsh
다운로드 방법에 대한 지침은 설치를 방문하십시오.
Tip
이 가이드를 새 Teleport 데모 클러스터에서 따라하는 것을 추천합니다, 그러면 Agent 풀이 어떻게 작동하는지 볼 수 있습니다. 설정에 익숙해진 후, 이 가이드의 교훈을 적용하여 인프라를 보호하세요. 아래의 방법으로 데모 클러스터를 시작할 수 있습니다:
- 리눅스 서버에서의 데모 배포
- Teleport Enterprise (Cloud) 체험판
-
가상 머신 인스턴스를 생성할 수 있는 권한이 있는 AWS, Google Cloud 또는 Azure 계정.
-
Teleport Proxy 서비스에 연결할 수 있도록 하는 클라우드 인프라. 예를 들어:
- 공용 NAT 게이트웨이 또는 NAT 인스턴스가 있는 AWS 서브넷
- Google Cloud NAT
- Azure NAT 게이트웨이
최소 보안 데모 클러스터에서는 배포하는 VM 인스턴스에 공용 IP 주소를 구성할 수도 있습니다.
-
Terraform v1.0.0 이상.
-
연결이 가능한지 확인하기 위해
tsh login
으로 로그인한 다음, 현재 자격 증명을 사용하여tctl
명령어를 실행할 수 있는지 확인하십시오.예를 들어:
tsh login --proxy=teleport.example.com --user=email@example.comtctl status클러스터 teleport.example.com
버전 17.0.0-dev
CA 핀 sha256:abdc1245efgh5678abdc1245efgh5678abdc1245efgh5678abdc1245efgh5678
클러스터에 연결할 수 있고
tctl status
명령어를 실행할 수 있다면, 현재 자격 증명을 사용하여 워크스테이션에서 후속tctl
명령어를 실행할 수 있습니다.
자신의 Teleport 클러스터를 호스팅하는 경우, Teleport Auth Service를 호스팅하는 컴퓨터에서 전체 권한으로tctl
명령어를 실행할 수도 있습니다.
1/3 단계. Terraform 모듈 가져오기
이 단계에서는 Teleport 리소스를 등록하는 방법을 보여주는 Terraform 모듈을 다운로드합니다. 이 모듈은 Teleport Terraform 리소스가 어떻게 함께 작동하는지에 대한 최소한의 예시입니다.
이 가이드를 마친 후 설정에 익숙해지면, 귀하의 생산 인프라에 맞게 Terraform 구성을 수정해야 합니다.
-
Terraform 프로젝트 디렉토리로 이동하세요.
-
Teleport 코드 리포지토리를 가져오고 이 프로젝트의 예시 Terraform 구성을 현재 작업 디렉토리에 복사합니다. 다음 명령어는 클라우드 제공자에 적합한 하위 모듈을
cloud
라는 하위 디렉토리에 복사하고 Teleport 리소스에 대한 HCL 구성을teleport
라는 하위 디렉토리에 복사합니다:
git clone --depth=1 https://github.com/gravitational/teleport teleport-clonecp -R teleport-clone/examples/terraform-starter/agent-installation teleportcp -R teleport-clone/examples/terraform-starter/aws cloudrm -rf teleport-clone
git clone --depth=1 https://github.com/gravitational/teleport teleport-clonecp -R teleport-clone/examples/terraform-starter/agent-installation teleportcp -R teleport-clone/examples/terraform-starter/gcp cloudrm -rf teleport-clone
git clone --depth=1 https://github.com/gravitational/teleport teleport-clonecp -R teleport-clone/examples/terraform-starter/agent-installation teleportcp -R teleport-clone/examples/terraform-starter/azure cloudrm -rf teleport-clone
- 다음 내용을 포함한
agent.tf
라는 파일을 생성하여 이전 단계에서 다운로드한 자식 모듈을 구성합니다:
module "agent_installation_dev" {
source = "./teleport"
agent_count = 1
agent_labels = {
env = "dev"
}
proxy_service_address = "teleport.example.com:443"
teleport_edition = "cloud"
teleport_version = "17.0.0-dev"
}
module "agent_installation_prod" {
source = "./teleport"
agent_count = 1
agent_labels = {
env = "prod"
}
proxy_service_address = "teleport.example.com:443"
teleport_edition = "cloud"
teleport_version = "17.0.0-dev"
}
module "agent_deployment" {
region = ""
source = "./cloud"
subnet_id = ""
userdata_scripts = concat(
module.agent_installation_dev.userdata_scripts,
module.agent_installation_prod.userdata_scripts
)
}
module "agent_installation_dev" {
source = "./teleport"
agent_count = 1
agent_labels = {
env = "dev"
}
proxy_service_address = "teleport.example.com:443"
teleport_edition = "cloud"
teleport_version = "17.0.0-dev"
}
module "agent_installation_prod" {
source = "./teleport"
agent_count = 1
agent_labels = {
env = "prod"
}
proxy_service_address = "teleport.example.com:443"
teleport_edition = "cloud"
teleport_version = "17.0.0-dev"
}
module "agent_deployment" {
gcp_zone = "us-east1-b"
google_project = ""
source = "./cloud"
subnet_id = ""
userdata_scripts = concat(
module.agent_installation_dev.userdata_scripts,
module.agent_installation_prod.userdata_scripts
)
}
module "agent_installation_dev" {
source = "./teleport"
agent_count = 1
agent_labels = {
env = "dev"
}
proxy_service_address = "teleport.example.com:443"
teleport_edition = "cloud"
teleport_version = "17.0.0-dev"
}
module "agent_installation_prod" {
source = "./teleport"
agent_count = 1
agent_labels = {
env = "prod"
}
proxy_service_address = "teleport.example.com:443"
teleport_edition = "cloud"
teleport_version = "17.0.0-dev"
}
module "agent_deployment" {
azure_resource_group = ""
public_key_path = ""
region = "East US"
source = "./cloud"
subnet_id = ""
userdata_scripts = concat(
module.agent_installation_dev.userdata_scripts,
module.agent_installation_prod.userdata_scripts
)
}
각 agent_installation_*
모듈 블록은 agent_count
입력과 동일한 수의 설치 스크립트를 생성합니다. 각 설치 스크립트는 Teleport 조인 토큰과 함께 Teleport SSH 서비스를 실행하며, agent_labels
에 지정된 키/값 쌍으로 Agent에 레이블을 붙입니다. 이 구성은 모든 설치 스크립트를 agent_deployment
모듈에 전달하여 가상 머신에서 실행되도록 하며, 스크립트당 하나의 VM을 시작합니다.
Teleport 사용량을 확장하면서 각 Agent의 부하를 줄이기 위해 이 수를 늘릴 수 있습니다.
agent.tf
의 agent_installation_dev
및 agent_installation_prod
블록을 다음과 같이 수정하세요:
-
proxy_service_address
를 Teleport Proxy 서비스의 호스트와 HTTPS 포트로 지정하십시오. 예:mytenant.teleport.sh:443
.포트를 반드시 포함하세요.
-
teleport_edition
이 귀하의 Teleport 에디션과 일치하는지 확인하십시오. 이 값을oss
,cloud
또는enterprise
로 지정하십시오. 기본값은oss
입니다. -
필요한 경우, Agent에서 실행할 Teleport 버전으로
teleport_version
의 값을 변경하십시오. 이는 귀하의 Teleport 클러스터와 동일한 주요 버전이거나 하나의 주요 버전 이전이어야 합니다.
agent.tf
의 module "agent_deployment"
블록을 다음과 같이 수정하세요:
-
최소 보안 데모 환경에서 인스턴스를 배포하고 NAT 게이트웨이나 NAT 인스턴스, 또는 인스턴스를 Teleport Proxy 서비스에 연결할 다른 방법이 없는 경우, 각 Agent 인스턴스와 공용 IP 주소를 연결하도록
module
블록을 수정하십시오:insecure_direct_access=true
-
클라우드 제공자에 따라 나머지 입력 변수를 할당합니다:
region
에 Teleport Agents를 배포할 AWS 리전을 지정합니다. 예:us-east-1
.subnet_id
에 Teleport Agents를 배포할 서브넷의 ID를 포함합니다.
-
google_project
에 귀하의 Google Cloud 프로젝트 이름을 지정하고gcp_zone
에 Agents를 배포할 영역을 지정합니다. 예:us-east1-b
. -
subnet_id
에 Teleport Agents를 배포할 Google Cloud 서브넷의 이름 또는 URI를 포함합니다.서브넷 URI는 다음 형식을 가집니다:
projects/PROJECT_NAME/regions/REGION/subnetworks/SUBNET_NAME
-
azure_resource_group
에 Teleport Agents를 배포할 Azure 리소스 그룹의 이름을 지정합니다. -
이 모듈은
public_key_path
를 사용하여 유효성을 검사합니다. Azure VM은 최소 2048비트의 RSA 공개 키를 포함해야 합니다. 모듈이 VM을 배포한 후, cloud-init 스크립트가 공개 키를 제거하고 OpenSSH를 비활성화합니다. 이 입력을 유효한 공개 SSH 키의 경로로 설정하십시오. -
region
에 Teleport Agents를 배포할 Azure 리전을 지정합니다. 예:East US
. -
subnet_id
에 Teleport Agents를 배포할 서브넷의 ID를 포함합니다. 다음 형식을 사용하십시오:
/subscriptions/SUBSCRIPTION/resourceGroups/RESOURCE_GROUP/providers/Microsoft.Network/virtualNetworks/NETWORK_NAME/subnets/SUBNET_NAME
2/3단계. 공급자 구성 추가
이 단계에서는 terraform-starter
모듈을 Teleport 클러스터와 클라우드 공급자를 위한 구성합니다.
Terraform 프로젝트 디렉토리에서 provider.tf
라는 파일에 다음 내용을 포함시키십시오:
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
}
teleport = {
source = "terraform.releases.teleport.dev/gravitational/teleport"
version = "~> 17.0"
}
}
}
provider "aws" {
region = AWS_REGION
}
provider "teleport" {
# Update addr to point to your Teleport Enterprise (managed) tenant URL's host:port
addr = PROXY_SERVICE_ADDRESS
}
다음 자리 표시자를 교체하십시오:
자리 표시자 | 값 |
---|---|
AWS_REGION | 에이전트를 배포할 AWS 리전, 예: us-east-2 |
PROXY_SERVICE_ADDRESS | Teleport Proxy Service의 호스트와 포트, 예: example.teleport.sh:443 |
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 5.5.0"
}
teleport = {
source = "terraform.releases.teleport.dev/gravitational/teleport"
version = "~> 17.0"
}
}
}
provider "google" {
project = GOOGLE_CLOUD_PROJECT
region = GOOGLE_CLOUD_REGION
}
provider "teleport" {
# Update addr to point to your Teleport Enterprise (managed) tenant URL's host:port
addr = PROXY_SERVICE_ADDRESS
}
다음 자리 표시자를 교체하십시오:
자리 표시자 | 값 |
---|---|
GOOGLE_CLOUD_PROJECT | 에이전트를 배포할 Google Cloud 프로젝트. |
GOOGLE_CLOUD_REGION | 에이전트를 배포할 Google Cloud 리전. |
PROXY_SERVICE_ADDRESS | Teleport Proxy Service의 호스트와 포트, 예: example.teleport.sh:443 |
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.0.0"
}
teleport = {
source = "terraform.releases.teleport.dev/gravitational/teleport"
version = "~> 17.0"
}
}
}
provider "teleport" {
# Update addr to point to your Teleport Cloud tenant URL's host:port
addr = PROXY_SERVICE_ADDRESS
}
provider "azurerm" {
features {}
}
다음 자리 표시자를 교체하십시오:
자리 표시자 | 값 |
---|---|
PROXY_SERVICE_ADDRESS | Teleport Proxy Service의 호스트와 포트, 예: example.teleport.sh:443 |
3/3단계. 배포 확인
이 단계에서는 Terraform 구성을 적용하기 위해 Teleport 봇을 생성할 것입니다. 봇은 1시간 동안 존재하며 기본 terraform-provider
역할이 부여되어 TF 공급자가 지원하는 모든 리소스를 편집할 수 있습니다.
-
Terraform 프로젝트 디렉토리로 이동하고 다음 명령을 실행하십시오.
eval
명령은 쉘의 환경 변수를 Teleport Terraform 공급자 인증 정보로 할당합니다:eval "$(tctl terraform env)"🔑 MFA가 필요한지 확인 중이는 관리자 수준의 작업으로, 완료하려면 MFA가 필요합니다.보안 키를 탭하십시오.보안 키 탭이 감지되었습니다.⚙️ 임시 봇 "tctl-terraform-env-82ab1a2e"와 해당 토큰을 생성 중입니다.🤖 임시 봇을 사용하여 인증서 획득 중입니다.🚀 인증서가 획득되었습니다. 이제 이 터미널에서 1h0m0s 동안 Terraform을 사용할 수 있습니다. -
클라우드 공급자 자격 증명이 귀사의 조직에 대한 표준 접근 방식을 사용하여 Terraform에서 사용 가능하도록 하십시오.
-
Terraform 구성을 적용하십시오:
terraform initterraform apply -
apply
명령이 완료되면, 다음 명령을 실행하여 에이전트가 성공적으로 배포되었는지 확인하십시오. 이 명령은 에이전트가Node
역할을 갖고 있다고 가정하며,role=agent-pool
라벨이 있는 모든 Teleport SSH 서비스 인스턴스를 나열합니다:tsh ls role=agent-pool노드 이름 주소 라벨-------------------------- ---------- ---------------ip-10-1-1-187.ec2.internal ⟵ 터널 role=agent-poolip-10-1-1-24.ec2.internal ⟵ 터널 role=agent-pool
추가 읽기: 모듈 작동 방식
이 섹션에서는 terraform-starter
모듈에 구성된 리소스를 설명합니다.
가입 토큰
terraform-starter
모듈은 각 Teleport 에이전트에 대해 하나의 가상 머신 인스턴스를 배포합니다. 각 에이전트는 토큰을 사용하여 클러스터에 가입합니다. 우리는 teleport_provision_token
Terraform 리소스를 생성하여 각 토큰을 만들고, random_string
리소스를 사용하여 토큰의 값을 지정합니다:
resource "random_string" "token" {
count = var.agent_count
length = 32
override_special = "-.+"
}
resource "teleport_provision_token" "agent" {
count = var.agent_count
version = "v2"
spec = {
roles = ["Node"]
}
metadata = {
name = random_string.token[count.index].result
expires = timeadd(timestamp(), "1h")
}
}
teleport_provision_token
리소스를 적용하면, Teleport Terraform 프로바이더가 Teleport Auth 서비스 백엔드에 토큰을 생성합니다.
사용자 데이터 스크립트
terraform-starter
모듈에 의해 배포된 각 Teleport 에이전트는 에이전트에 대한 Teleport 구성 파일을 생성하는 사용자 데이터 스크립트를 로드합니다:
#!/bin/bash
curl https://cdn.teleport.dev/install-v${teleport_version}.sh | bash -s ${teleport_version} ${teleport_edition}
echo ${token} > /var/lib/teleport/token
cat<<EOF >/etc/teleport.yaml
version: v3
teleport:
auth_token: /var/lib/teleport/token
proxy_server: ${proxy_service_address}
auth_service:
enabled: false
proxy_service:
enabled: false
ssh_service:
enabled: true
labels:
role: agent-pool
${extra_labels}
EOF
systemctl restart teleport;
# Disable OpenSSH and any longstanding authorized keys.
systemctl disable --now ssh.service
find / -wholename "*/.ssh/authorized_keys" -delete
구성은 각 인스턴스의 Teleport SSH 서비스에 role: agent-pool
레이블을 추가합니다. 이것은 나중에 에이전트 풀에 있는 호스트에 접근하는 것을 더 쉽게 만듭니다. 또한 모듈의 agent_labels
입력을 사용하여 구성한 레이블을 추가합니다.
이 스크립트는 Teleport를 에이전트 인스턴스에 접근하는 유일한 옵션으로 만들기 위해 시작 시 OpenSSH를 비활성화하고 모든 인증된 공개 키를 삭제합니다.
가상 머신 인스턴스
terraform-starter
의 각 클라우드 별 자식 모듈은 클라우드 제공업체에서 가상 머신 인스턴스를 배포하기 위한 리소스를 선언합니다:
ec2-instance.tf
는 Amazon Linux 2023 머신 이미지에 대한 데이터 소스를 선언하고 이를 사용하여 teleport_provision_token
리소스를 가진 Teleport 에이전트를 실행하는 EC2 인스턴스를 시작합니다:
data "aws_ami" "amazon_linux_2023" {
most_recent = true
filter {
name = "description"
values = ["Amazon Linux 2023 AMI*"]
}
filter {
name = "architecture"
values = ["x86_64"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
filter {
name = "owner-alias"
values = ["amazon"]
}
}
resource "aws_instance" "teleport_agent" {
count = length(var.userdata_scripts)
ami = data.aws_ami.amazon_linux_2023.id
instance_type = "t3.small"
subnet_id = var.subnet_id
user_data = var.userdata_scripts[count.index]
associate_public_ip_address = var.insecure_direct_access
// Adheres to security best practices
monitoring = true
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
}
root_block_device {
encrypted = true
}
}
gcp-instance.tf
는 Teleport 에이전트를 실행하기 위해 teleport_provision_token
을 사용하는 Google Compute Engine 인스턴스를 선언합니다:
locals {
// Google Cloud provides public IP addresses to instances when the
// network_interface block includes an empty access_config, so use a dynamic
// block to enable a public IP based on the insecure_direct_access input.
access_configs = var.insecure_direct_access ? [{}] : []
}
resource "google_compute_instance" "teleport_agent" {
count = length(var.userdata_scripts)
name = "teleport-agent-${count.index}"
zone = var.gcp_zone
// Initialize the instance tags to an empty map to prevent errors when the
// Teleport SSH Service fetches them.
params {
resource_manager_tags = {}
}
boot_disk {
initialize_params {
image = "family/ubuntu-2204-lts"
}
}
network_interface {
subnetwork = var.subnet_id
// If the user enables insecure direct access, allocate a public IP to the
// instance.
dynamic "access_config" {
for_each = local.access_configs
content {}
}
}
machine_type = "e2-standard-2"
metadata_startup_script = var.userdata_scripts[count.index]
}
azure-instance.tf
는 Teleport 에이전트를 실행하기 위해 teleport_provision_token
리소스를 사용하는 Azure 가상 머신 리소스를 선언하며, 각 인스턴스에 필요한 네트워크 인터페이스도 포함합니다.
Azure VM 인스턴스는 사용자 계정을 요구하지만, 이 모듈은 검증을 통과하기 위해 임시 계정을 선언하지만 인스턴스에 대한 접근을 위해 Teleport를 사용합니다:
locals {
username = "admin_temp"
}
resource "azurerm_network_interface" "teleport_agent" {
count = length(var.userdata_scripts)
name = "teleport-agent-ni-${count.index}"
location = var.region
resource_group_name = var.azure_resource_group
ip_configuration {
name = "teleport_agent_ip_config"
subnet_id = var.subnet_id
private_ip_address_allocation = "Dynamic"
public_ip_address_id = var.insecure_direct_access ? azurerm_public_ip.agent[count.index].id : ""
}
}
resource "azurerm_public_ip" "agent" {
count = var.insecure_direct_access ? length(var.userdata_scripts) : 0
name = "agentIP-${count.index}"
resource_group_name = var.azure_resource_group
location = var.region
allocation_method = "Static"
}
resource "azurerm_virtual_machine" "teleport_agent" {
count = length(var.userdata_scripts)
name = "teleport-agent-${count.index}"
location = var.region
resource_group_name = var.azure_resource_group
network_interface_ids = [azurerm_network_interface.teleport_agent[count.index].id]
os_profile_linux_config {
disable_password_authentication = true
ssh_keys {
key_data = file(var.public_key_path)
// The only allowed path. See:
// https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_machine
path = "/home/${local.username}/.ssh/authorized_keys"
}
}
os_profile {
computer_name = "teleport-agent-${count.index}"
admin_username = local.username
custom_data = var.userdata_scripts[count.index]
}
vm_size = "Standard_B2s"
storage_os_disk {
name = "teleport-agent-disk-${count.index}"
create_option = "FromImage"
managed_disk_type = "Standard_LRS"
}
storage_image_reference {
publisher = "Canonical"
offer = "0001-com-ubuntu-server-jammy"
sku = "22_04-lts"
version = "latest"
}
}
다음 단계: 리소스 등록을 위한 추가 옵션
Terraform 시작 가이드의 첫 번째 부분에서는 Terraform을 사용하여 Teleport 에이전트 풀을 배포하여 인프라 리소스를 Teleport에 등록하는 방법을 보여주었습니다. 가이드에서는 리소스를 동적으로 등록하는 방법을 보여주었지만, 등록하려는 각 인프라 리소스에 대해 Terraform 리소스를 선언함으로써 Teleport로 더 많은 인프라를 보호할 수 있습니다:
- 자동 검색 구성
- 리소스 등록 구성
자동 검색 구성
이 가이드에서 보여준 것보다 리소스를 등록하는 더 확장 가능한 접근 방식을 위해, Teleport Discovery Service를 구성하여 인프라 내 리소스를 자동으로 감지하고 Teleport Auth 서비스에 등록하도록 합니다.
Teleport Discovery Service를 구성하려면:
- Terraform 시작 모듈에서 관리되는 에이전트 인스턴스에서 실행되는 사용자 데이터 스크립트를 수정하십시오. 자동 검색 안내서 를 따라 Discovery Service를 구성하고 에이전트가 서비스가 등록하는 리소스를 프록시하도록 활성화합니다.
- 이전에 생성한 가입 토큰 리소스에
Discovery
역할을 추가하십시오. 이 가이드에서는 가입 토큰에Node
역할만 있습니다. - 발견된 리소스를 프록시하려는 에이전트 서비스에 해당하는 역할을 가입 토큰 리소스에 추가하십시오. 추가할 역할은 자동으로 등록하려는 리소스에 따라 자동 검색 안내서 를 기반으로 합니다.
리소스 수동 등록
리소스를 수동으로 등록하여 에이전트에게 인프라의 특정 엔드포인트를 프록시하도록 지시할 수도 있습니다. 수동 등록에 대한 정보는 등록하고자 하는 각 리소스 유형의 문서 섹션을 참조하십시오:
리소스를 수동으로 등록하는 과정에 익숙해지면 Terraform 모듈을 편집하여 다음을 수행할 수 있습니다:
- 토큰 역할 추가: 생성한 토큰 리소스는
Node
역할만 있으며, 에이전트가 추가 유형의 리소스를 프록시하도록 허가하기 위해 역할을 추가할 수 있습니다. 수동으로 리소스를 등록하는 가이드를 참조하여 토큰에 추가할 역할을 결정하십시오. - 사용자 데이터 스크립트 변경하여 에이전트가 프록시해야 하는 추가 인프라 리소스를 활성화합니다.
- 동적 리소스 배포: 인프라에 동적 리소스를 등록하기 위해 적용할 수 있는 Terraform 리소스를 위해 Terraform 공급자 참조를 참조하십시오.