정적 호스트 카탈로그 생성하기
정적 호스트 카탈로그 생성하기
Boundary 정적 호스트 카탈로그는 호스트나 호스트 셋을 포함하는 모음을 수동으로 정의할 수 있게 해줘요. 클라우드 제공자가 자동으로 발견할 수 없는 인프라를 위한 것이죠.
동적 호스트 카탈로그는 클라우드 제공자에서 호스트를 동기화할 수 있게 해줘요.
- 호스트 카탈로그(Host catalogs) — 호스트와 호스트 셋을 포함해요.
- 호스트 셋(Host sets) — 호스트의 모음이에요. 접근 관리 관점에서 동일한 것으로 간주되는 호스트들이에요. 호스트 셋은 대상에 할당할 수 있어요.
- 호스트(Hosts) — Boundary가 도달할 수 있는(흔히 같은 네트워크에 배포된 워커를 통해) 네트워크 주소를 가진 컴퓨팅 요소예요.
호스트 카탈로그는 호스트를 직접 포함하거나, 호스트 셋을 포함하거나, 둘의 조합을 포함할 수 있어요.
호스트 카탈로그를 정의한 뒤에는 Boundary 세션(session)을 사용해 이 호스트에 연결하기 위한 대상(targets)을 만들 수 있어요. 대상은 세션에 사용할 포트와 프로토콜을 정의해요. 즉 단일 호스트가 다른 포트에서 연결을 받는다면 여러 대상이 정의될 수 있어요. 예를 들어 호스트는 22번 포트에서 수신하는 SSH 대상과, postgres 클라이언트가 5432번 포트에서 받는 연결을 모두 가질 수 있어요. 호스트를 대상에 할당하려면 반드시 그 호스트를 호스트 셋에 추가해야 해요.
본문
Boundary 정적 호스트 카탈로그는 호스트나 호스트 셋을 포함하는 모음을 수동으로 정의할 수 있게 해줘요. 클라우드 제공자가 자동으로 발견할 수 없는 인프라를 위한 것이죠.
동적 호스트 카탈로그는 클라우드 제공자에서 호스트를 동기화할 수 있게 해줘요.
- 호스트 카탈로그 — 호스트와 호스트 셋을 포함해요.
- 호스트 셋 — 호스트의 모음이에요. 접근 관리 관점에서 동일하게 간주되는 호스트들이에요. 호스트 셋은 대상에 할당할 수 있어요.
- 호스트 — Boundary가 도달할 수 있는(흔히 같은 네트워크에 배포된 워커를 통해) 네트워크 주소를 가진 컴퓨팅 요소예요.
호스트 카탈로그는 호스트를 직접 포함하거나, 호스트 셋을 포함하거나, 둘의 조합을 포함할 수 있어요.
호스트 카탈로그를 정의한 뒤에는 Boundary 세션을 사용해 이 호스트에 연결하기 위한 대상을 만들 수 있어요. 대상은 세션에 사용할 포트와 프로토콜을 정의해요. 즉 단일 호스트가 다른 포트에서 연결을 받는다면 여러 대상이 정의될 수 있어요. 예를 들어 호스트는 22번 포트에서 수신하는 SSH 대상과, postgres 클라이언트가 5432번 포트에서 받는 연결을 모두 가질 수 있어요. 호스트를 대상에 할당하려면 반드시 그 호스트를 호스트 셋에 추가해야 해요.
정적 호스트 카탈로그 생성하기
정적 호스트 카탈로그를 만들려면 다음 단계를 완료하세요.
- Boundary에 로그인하세요.
- org를 선택한 다음 호스트 카탈로그를 만들 프로젝트를 선택하세요.
- Host Catalogs를 선택하세요.
- New Host Catalog를 선택하세요.
- 다음 필드를 완료하세요.
- Name — (선택) 식별 목적의 선택적 이름이에요. 이름을 입력하면 고유해야 해요.
- Description — (선택) 식별 목적으로 호스트 카탈로그에 대한 선택적 설명이에요.
- Type — (필수) 정적 호스트 카탈로그를 만들려면 Static을 선택하세요.
- Save를 클릭하세요.
CLI 사용 시:
-
Boundary에 로그인하세요.
-
BOUNDARY_PROJECT_ID환경 변수를 설정하거나, 다음 단계에서 스코프 ID(p_1234567890같은)를 제공하세요. -
다음 명령으로
my-host-catalog이라는 정적 호스트 카탈로그를 만드세요:$ boundary host-catalogs create static \ -scope-id $BOUNDARY_PROJECT_ID \ -name "my-host-catalog"
정적 호스트 카탈로그를 만들 때는 scope-id 필드를 반드시 제공해야 해요. 호스트 카탈로그를 만들 때 사용할 수 있는 더 많은 필드는 host catalogs 도메인 모델 문서를 참고하세요.
Boundary Terraform provider로 호스트 카탈로그를 정의할 수 있어요.
resource "boundary_host_catalog_static" "my_catalog" {
name = "my-host-catalog"
description = "A static host catalog"
scope_id = boundary_scope.project.id
}
호스트 생성하기
정적 호스트 카탈로그 안에 정적 호스트를 만들려면 다음 단계를 완료하세요.
- Host Catalogs를 선택하세요.
- 정적 호스트 카탈로그를 선택하세요.
- Hosts 탭을 클릭하고 New를 클릭하세요.
- 다음 필드를 완료하세요.
- Name — (선택) 식별 목적의 선택적 이름이에요. 이름을 입력하면 고유해야 해요.
- Description — (선택) 식별 목적으로 호스트 카탈로그에 대한 선택적 설명이에요.
- Address — (필수) 프로토콜을 지정하지 않은 호스트 주소예요.
- Save를 클릭하세요.
$ boundary hosts create static \
-name "my-host" \
-description "My static host" \
-host-catalog-id hcst_1234567890 \
-address "10.0.0.1"
resource "boundary_host_static" "my_host" {
name = "my-host"
description = "My static host"
address = "10.0.0.1"
host_catalog_id = boundary_host_catalog_static.my_catalog.id
}
호스트 셋 생성하기
정적 호스트를 포함하는 정적 호스트 셋을 만들려면 다음 단계를 완료하세요.
- Boundary에 로그인하세요.
- org를 선택한 다음 호스트 셋을 만들 프로젝트를 선택하세요.
- Host Catalogs를 선택하세요.
- 호스트 카탈로그를 선택하세요.
- Host Sets 탭을 클릭하고 New를 클릭하세요.
- 다음 필드를 완료하세요.
- Name — (선택) 식별 목적의 선택적 이름이에요. 이름을 입력하면 고유해야 해요.
- Description — (선택) 식별 목적으로 호스트 카탈로그에 대한 선택적 설명이에요.
- Save를 클릭하세요.
정적 호스트 셋 생성:
$ boundary host-sets create static \
-name "my-host-set" \
-description "My host set" \
-host-catalog-id hcst_1234567890
호스트 셋에 호스트 추가:
$ boundary host-sets add-hosts \
-id hsst_1234567890 \
-host hst_1234567890 \
-host hst_0987654321
Terraform으로 이 호스트 셋을 정의하려면:
resource "boundary_host_set_static" "my_host_set" {
type = "static"
name = "my-host-set"
description = "My host set"
host_catalog_id = "hcst_1234567890"
host_ids = [ boundary_host_static.my_host.id ]
}
예시: MySQL과 Postgres 데이터베이스를 위한 호스트 카탈로그 생성
이 예시에서는 별도의 데이터베이스를 위해 세 개의 호스트를 만들 거예요. 하나는 192.168.0.10의 3306 포트에서 실행되는 가상의 MySQL 데이터베이스, 두 번째는 192.168.0.11의 3306 포트에서 실행되는 또 다른 MySQL 데이터베이스, 세 번째는 192.168.0.20의 5432 포트에서 실행되는 Postgres 데이터베이스용이에요.
호스트 카탈로그:
- databases
호스트:
- mysql1 : 호스트 주소는 192.168.0.10, 가용 포트는 3306
- mysql2 : 호스트 주소는 192.168.0.11, 가용 포트는 3306
- postgres : 호스트 주소는 192.168.0.20, 가용 포트는 5432
호스트 셋:
- mysql-hosts — 호스트: mysql1, mysql2
- postgres-hosts — 호스트: postgres
databases 호스트 카탈로그는 mysql-hosts 호스트 셋과 postgres-hosts 호스트 셋을 포함할 거예요. mysql-hosts 호스트 셋은 mysql1과 mysql2 호스트를, postgres-hosts 호스트 셋은 postgres 호스트를 포함해요.
databases 호스트 카탈로그 생성
databases라는 정적 호스트 카탈로그를 만들려면 다음 단계를 완료하세요.
- Boundary에 로그인하세요.
- org를 선택한 다음 호스트 카탈로그를 만들 프로젝트를 선택하세요.
- Host Catalogs를 선택하세요.
- New Host Catalog를 선택하세요.
- 다음 필드를 완료하세요.
- Name —
databases(선택) 식별 목적의 선택적 이름이에요. 이름을 입력하면 고유해야 해요. - Description — (선택) 식별 목적으로 호스트 카탈로그에 대한 선택적 설명이에요.
- Type — (필수) 정적 호스트 카탈로그를 만들려면 Static을 선택하세요.
- Name —
- Save를 클릭하세요.
CLI 사용 시:
-
Boundary에 로그인하세요.
-
BOUNDARY_PROJECT_ID환경 변수를 설정하거나, 다음 단계에서 스코프 ID(p_1234567890같은)를 제공하세요. -
다음 명령으로
databases라는 정적 호스트 카탈로그를 만드세요:$ boundary host-catalogs create static \ -scope-id $BOUNDARY_PROJECT_ID \ -name "databases"
정적 호스트 카탈로그를 만들 때는 scope-id 필드를 반드시 제공해야 해요. 호스트 카탈로그를 만들 때 사용할 수 있는 더 많은 필드는 호스트 카탈로그 도메인 모델 문서를 참고하세요.
Boundary Terraform provider로 호스트 카탈로그를 정의할 수 있어요.
resource "boundary_host_catalog_static" "databases" {
name = "databases"
description = "A host catalog for all database types"
scope_id = boundary_scope.project.id
}
MySQL과 Postgres 호스트 셋 생성
호스트 셋은 동등한 서비스를 제공하는 호스트를 함께 그룹화할 수 있게 해줘요. 대상이 호스트 셋을 참조하면, 대상 별칭(target alias)으로 특정 호스트 ID를 사용하도록 구성하지 않는 한 셋에서 임의의 호스트를 선택해 연결을 수립해요.
호스트는 호스트 카탈로그 안에 만들어야 해요. 호스트를 대상에 추가하려면 호스트가 호스트 셋에 속해야 해요.
MySQL 호스트 셋 생성
이 예시에서는 먼저 mysql1과 mysql2 호스트를 위해 mysql-hosts라는 호스트 셋을 만들어요.
- Boundary에 로그인하세요.
- org를 선택한 다음 호스트 셋을 만들 프로젝트를 선택하세요.
- Host Catalogs를 선택하세요.
databases호스트 카탈로그를 선택하세요.- Host Sets 탭을 클릭하고 New를 클릭하세요.
- 다음 필드를 완료하세요.
- Name —
mysql-hosts(선택) 식별 목적의 선택적 이름이에요. 이름을 입력하면 고유해야 해요. - Description — (선택) 식별 목적으로 호스트 카탈로그에 대한 선택적 설명이에요.
- Name —
- Save를 클릭하세요.
$ boundary host-sets create static -name "mysql-hosts" -description "MySQL host set" -host-catalog-id hcst_1234567890
Host Set information:
Created Time: Mon, 28 Sep 2025 18:27:10 PDT
Description: MySQL host set
Host Catalog ID: hcst_1234567890
ID: hsst_z7gDCPSig5
Name: mysql-hosts
Type: static
Updated Time: Mon, 28 Sep 2025 18:27:10 PDT
Version: 1
Scope:
ID: p_1234567890
Name: Generated project scope
Parent Scope ID: o_1234567890
Type: project
Terraform으로 이 호스트 셋을 정의하려면:
resource "boundary_host_set_static" "mysql" {
type = "static"
name = "mysql-hosts"
description = "Host set for MySQL servers"
host_catalog_id = "hcst_1234567890"
}
Postgres 호스트 셋 생성
postgres 호스트를 위해 postgres-hosts라는 호스트 셋을 만드세요.
- Boundary에 로그인하세요.
- org를 선택한 다음 호스트 셋을 만들 프로젝트를 선택하세요.
- Host Catalogs를 선택하세요.
databases호스트 카탈로그를 선택하세요.- Host Sets 탭을 클릭하고 New를 클릭하세요.
- 다음 필드를 완료하세요.
- Name —
postgres-hosts(선택) 식별 목적의 선택적 이름이에요. 이름을 입력하면 고유해야 해요. - Description — (선택) 식별 목적으로 호스트 카탈로그에 대한 선택적 설명이에요.
- Name —
- Save를 클릭하세요.
$ boundary host-sets create static -name "postgres-hosts" -description "Postgres host set" -host-catalog-id hcst_1234567890
Host Set information:
Created Time: Mon, 28 Sep 2025 18:27:10 PDT
Description: Postgres host set
Host Catalog ID: hcst_1234567890
ID: hsst_z7gDCPSig5
Name: postgres-hosts
Type: static
Updated Time: Mon, 28 Sep 2025 18:27:10 PDT
Version: 1
Scope:
ID: p_1234567890
Name: Generated project scope
Parent Scope ID: o_1234567890
Type: project
Terraform으로 이 호스트 셋을 정의하려면:
resource "boundary_host_set_static" "postgres" {
type = "static"
name = "postgres-hosts"
description = "Postgres host set"
host_catalog_id = "hcst_1234567890"
}
데이터베이스 호스트 생성
호스트는 호스트 셋에 할당되지 않은 채 호스트 카탈로그에 속할 수 있지만, 대상이 호스트에 연결하려면 호스트를 호스트 셋에 추가해야 해요.
mysql 호스트 생성
- Host Catalogs를 선택하세요.
databases호스트 카탈로그를 선택하세요.- Hosts 탭을 클릭하고 New를 클릭하세요.
- 다음 필드를 완료하세요.
- Name —
mysql1(선택) 식별 목적의 선택적 이름이에요. 이름을 입력하면 고유해야 해요. - Description — (선택) 식별 목적으로 호스트 카탈로그에 대한 선택적 설명이에요.
- Address —
192.168.0.10(필수) 프로토콜을 지정하지 않은 호스트 주소예요.
- Name —
- Save를 클릭하세요.
mysql2 호스트에 대해 주소 192.168.0.11로 이 과정을 반복하세요.
mysql-hosts 호스트 카탈로그 안에 주소 192.168.0.1의 mysql1 호스트를 만드세요.
$ boundary host create static -name "mysql1" -description "MySQL host 1" -host-catalog-id hcst_1234567890 -address 192.168.0.10
Host information:
Created Time: Fri, 27 May 2025 10:48:29 MDT
Description: MySQL host 1
Host Catalog ID: hcst_1234567890
ID: hst_U1qYKzKfXO
Name: mysql1
Type: static
Updated Time: Fri, 27 May 2025 10:48:29 MDT
Version: 1
Scope:
ID: p_1234567890
Name: Generated project scope
Parent Scope ID: o_1234567890
Type: project
Authorized Actions:
no-op
read
update
delete
Attributes:
address: 192.168.0.10
주소 192.168.0.11의 mysql2 호스트에 대해 이 과정을 반복하세요.
$ boundary host create static -name "mysql2" -description "MySQL host 2" -host-catalog-id hcst_1234567890 -address 192.168.0.11
Host information:
Created Time: Fri, 27 May 2025 10:48:29 MDT
Description: MySQL host 2
Host Catalog ID: hcst_1234567890
ID: hst_U1qYKzKfXO
Name: mysql2
Type: static
Updated Time: Fri, 27 May 2025 10:48:29 MDT
Version: 1
Scope:
ID: p_1234567890
Name: Generated project scope
Parent Scope ID: o_1234567890
Type: project
Authorized Actions:
no-op
read
update
delete
Attributes:
address: 192.168.0.11
Terraform으로 mysql1과 mysql2 호스트를 만들려면:
resource "boundary_host_static" "mysql1" {
name = "mysql1"
description = "MySQL Server host"
address = "192.168.0.10"
host_catalog_id = boundary_host_catalog_static.databases.id
}
resource "boundary_host_static" "mysql2" {
name = "mysql2"
description = "MySQL Server host"
address = "192.168.0.11"
host_catalog_id = boundary_host_catalog_static.databases.id
}
MySQL 호스트 셋에 호스트 추가
이제 mysql1과 mysql2 호스트를 만들었으니, 앞서 만든 mysql-hosts 호스트 셋에 추가하세요.
- Host Catalogs를 선택하세요.
databases호스트 카탈로그를 선택하세요.- Host Sets 탭을 클릭하고
postgres-hosts를 선택하세요. - Hosts 탭을 클릭하세요.
- Manage 드롭다운 메뉴를 클릭하고 Add Existing Host를 선택하세요.
mysql1과mysql2호스트의 체크박스를 선택하세요.- Add Hosts를 클릭하세요.
mysql1과 mysql2 호스트 ID를 boundary host-sets add-hosts 명령에 제공하세요.
$ boundary host-sets add-hosts -id=hsst_X8gmzYXbO4 -host=hst_U1qYKzKfXO -host=hst_xoKMbUsmQw
Host Set information:
Created Time: Fri, 27 May 2025 10:51:02 MDT
Description: MySQL host set
Host Catalog ID: hcst_1234567890
ID: hsst_X8gmzYXbO4
Name: mysql-hosts
Type: static
Updated Time: Fri, 27 May 2025 10:59:00 MDT
Version: 2
Scope:
ID: p_1234567890
Name: Generated project scope
Parent Scope ID: o_1234567890
Type: project
Authorized Actions:
no-op
read
update
delete
add-hosts
set-hosts
remove-hosts
Host IDs:
hst_U1qYKzKfXO
hst_xoKMbUsmQw
Terraform으로 mysql-hosts 호스트 셋에 호스트를 추가하려면:
resource "boundary_host_set_static" "mysql" {
type = "static"
name = "mysql-hosts"
description = "Host set for MySQL servers"
host_catalog_id = "hcst_1234567890"
host_ids = [ boundary_host_static.mysql1.id, boundary_host_static.mysql2.id ]
}
postgres 호스트 셋 안에 postgres 호스트 생성
postgres-hosts 호스트 셋 안에 postgres 호스트를 만드세요.
UI를 사용한다면 호스트를 만들고 호스트 셋에 추가하는 것을 한 번의 작업으로 할 수 있어요.
- Host Catalogs를 선택하세요.
databases호스트 카탈로그를 선택하세요.- Host Sets 탭을 클릭하고
postgres-hosts를 선택하세요. - Manage 드롭다운을 클릭하고 Create and Add Host를 선택하세요.
- 다음 필드를 완료하세요.
- Name —
postgres(선택) 식별 목적의 선택적 이름이에요. 이름을 입력하면 고유해야 해요. - Description — (선택) 식별 목적으로 호스트 카탈로그에 대한 선택적 설명이에요.
- Address —
192.168.0.20(필수) 프로토콜을 지정하지 않은 호스트 주소예요.
- Name —
- Save를 클릭하세요.
CLI나 Terraform을 사용한다면, 호스트 셋에 추가하기 전에 호스트를 먼저 만들어야 해요.
postgres-hosts 호스트 카탈로그 안에 주소 192.168.0.20의 postgres 호스트를 만드세요.
$ boundary host create static -name "postgres" -description "Postgres host" -host-catalog-id hcst_1234567890 -address 192.168.0.20
Host information:
Created Time: Fri, 27 May 2025 11:48:29 MDT
Description: Postgres host
Host Catalog ID: hcst_1234567890
ID: hst_FrdNPd9Zm9
Name: postgres
Type: static
Updated Time: Fri, 27 May 2025 11:48:29 MDT
Version: 1
Scope:
ID: p_1234567890
Name: Generated project scope
Parent Scope ID: o_1234567890
Type: project
Authorized Actions:
no-op
read
update
delete
Attributes:
address: 192.168.0.20
앞서 만든 postgres-hosts 호스트 셋에 postgres 호스트를 추가하세요.
$ boundary host-sets add-hosts -id=hsst_z7gDCPSig5 -host=hst_FrdNPd9Zm9
Host Set information:
Created Time: Fri, 27 May 2025 10:51:02 MDT
Description: Postgres host set
Host Catalog ID: hcst_1234567890
ID: hsst_X8gmzYXbO4
Name: postgres-hosts
Type: static
Updated Time: Fri, 27 May 2025 10:59:00 MDT
Version: 2
Scope:
ID: p_1234567890
Name: Generated project scope
Parent Scope ID: o_1234567890
Type: project
Authorized Actions:
no-op
read
update
delete
add-hosts
set-hosts
remove-hosts
Host IDs:
hst_FrdNPd9Zm9
Terraform으로 postgres 호스트를 만들려면:
resource "boundary_host_static" "postgres" {
name = "postgres"
description = "Postgres Server host"
address = "192.168.0.20"
host_catalog_id = boundary_host_catalog_static.databases.id
}
Terraform으로 postgres-hosts 호스트 셋을 만들고 postgres 호스트를 추가하려면:
resource "boundary_host_set_static" "postgres" {
type = "static"
name = "postgres-hosts"
description = "Host set for Postgres servers"
host_catalog_id = "hcst_1234567890"
host_ids = [ boundary_host_static.postgres.id ]
}
대상 생성하기
대상은 클라이언트가 호스트 셋 안의 호스트에 어떻게 연결해야 하는지 정의해요.
대상은 호스트 카탈로그를 사용하지 않도록 직접 대상 주소를 설정할 수 있어요. 테스트에는 유용하지만, 규모가 커지면 호스트 셋 안의 각 호스트를 위한 별도의 대상을 만들고 유지하는 것이 관리하기 어려워져요.
호스트 셋은 대상에 할당되어 클라이언트가 호스트 셋의 어떤 사용 가능한 호스트에든 연결할 수 있게 해요.
대상은 호스트와의 세션에 사용되는 프로토콜과 포트를 정의해요.
mysql 대상 생성
기본 포트가 3306인 mysql 대상을 만드세요.
- Targets를 선택하고 New를 클릭하세요.
- 다음 필드를 완료하세요.
- Name —
mysql(선택) 식별 목적의 선택적 이름이에요. 이름을 입력하면 고유해야 해요. - Description — (선택) 식별 목적으로 호스트 카탈로그에 대한 선택적 설명이에요.
- Type —
Generic TCP(필수) - Default Port —
3306(필수)
- Name —
- Save를 클릭하세요.
대상의 호스트 소스로 mysql-hosts 호스트 셋을 추가하세요.
- Host Sources 탭을 선택하세요.
- Add Host Sources를 클릭하세요.
mysql-hosts호스트 셋의 체크박스를 선택하세요.- Add Host Sources를 클릭하세요.
기본 포트가 3306인 mysql 대상을 만드세요.
$ boundary targets create tcp -name="mysql" -description="MySQL target" -default-port=3389 -scope-id=p_1234567890 -session-connection-limit="-1" -host-source
Target information:
Created Time: Fri, 27 May 2025 11:02:22 MDT
Description: MySQL target
ID: ttcp_34yV5O9cwt
Name: mysql
Session Connection Limit: -1
Session Max Seconds: 28800
Type: tcp
Updated Time: Fri, 27 May 2025 11:02:22 MDT
Version: 1
Scope:
ID: p_1234567890
Name: Generated project scope
Parent Scope ID: o_1234567890
Type: project
Authorized Actions:
no-op
read
update
delete
add-host-sources
set-host-sources
remove-host-sources
add-credential-libraries
set-credential-libraries
remove-credential-libraries
add-credential-sources
set-credential-sources
remove-credential-sources
authorize-session
Attributes:
Default Port: 3306
대상의 호스트 소스로 mysql-hosts 호스트 셋을 추가하세요.
$ boundary targets add-host-sources -id=ttcp_34yV5O9cwt -host-source=hsst_X8gmzYXbO4
Target information:
Created Time: Fri, 27 May 2025 11:02:22 MDT
Description: MySQL target
ID: ttcp_34yV5O9cwt
Name: mysql
Session Connection Limit: -1
Session Max Seconds: 28800
Type: tcp
Updated Time: Fri, 27 May 2025 11:07:59 MDT
Version: 2
Scope:
ID: p_1234567890
Name: Generated project scope
Parent Scope ID: o_1234567890
Type: project
Authorized Actions:
no-op
read
update
delete
add-host-sources
set-host-sources
remove-host-sources
add-credential-libraries
set-credential-libraries
remove-credential-libraries
add-credential-sources
set-credential-sources
remove-credential-sources
authorize-session
Host Sources:
Host Catalog ID: hcst_1234567890
ID: hcst_xM3iCCkf1K
Attributes:
Default Port: 3306
기본 포트가 3306인 mysql 대상을 만들고 mysql-hosts 호스트 셋을 호스트 소스로 추가하세요.
resource "boundary_target" "mysql" {
type = "tcp"
name = "mysql"
description = "MySQL target for mysql-hosts host catalog"
scope_id = boundary_scope.project.id
session_connection_limit = -1
session_max_seconds = 300
default_port = 5432
host_source_ids = [
boundary_host_set_static.mysql.id
]
}
postgres 대상 생성
- Targets를 선택하고 New를 클릭하세요.
- 다음 필드를 완료하세요.
- Name —
postgres(선택) 식별 목적의 선택적 이름이에요. 이름을 입력하면 고유해야 해요. - Description — (선택) 식별 목적으로 호스트 카탈로그에 대한 선택적 설명이에요.
- Type —
Generic TCP(필수) - Default Port —
5432(필수)
- Name —
- Save를 클릭하세요.
호스트 소스를 추가하세요.
- Host Sources 탭을 선택하세요.
- Add Host Sources를 클릭하세요.
postgres-hosts호스트 셋의 체크박스를 선택하세요.- Add Host Sources를 클릭하세요.
기본 포트가 5432인 postgres 대상을 만드세요.
$ boundary targets create tcp -name="postgres" -description="Postgres target" -default-port=5432 -scope-id=p_1234567890 -session-connection-limit="-1"
Target information:
Created Time: Fri, 27 May 2025 11:02:22 MDT
Description: Postgres target
ID: ttcp_ge1Mowyrej
Name: mysql
Session Connection Limit: -1
Session Max Seconds: 28800
Type: tcp
Updated Time: Fri, 27 May 2025 11:02:22 MDT
Version: 1
Scope:
ID: p_1234567890
Name: Generated project scope
Parent Scope ID: o_1234567890
Type: project
Authorized Actions:
no-op
read
update
delete
add-host-sources
set-host-sources
remove-host-sources
add-credential-libraries
set-credential-libraries
remove-credential-libraries
add-credential-sources
set-credential-sources
remove-credential-sources
authorize-session
Attributes:
Default Port: 5432
대상의 호스트 소스로 postgres-hosts 호스트 셋을 추가하세요.
$ boundary targets add-host-sources -id=ttcp_ge1Mowyrej -host-source=hsst_z7gDCPSig5
Target information:
Created Time: Fri, 27 May 2025 11:02:22 MDT
Description: Postgres target
ID: ttcp_ge1Mowyrej
Name: postgres
Session Connection Limit: -1
Session Max Seconds: 28800
Type: tcp
Updated Time: Fri, 27 May 2025 11:07:59 MDT
Version: 2
Scope:
ID: p_1234567890
Name: Generated project scope
Parent Scope ID: o_1234567890
Type: project
Authorized Actions:
no-op
read
update
delete
add-host-sources
set-host-sources
remove-host-sources
add-credential-libraries
set-credential-libraries
remove-credential-libraries
add-credential-sources
set-credential-sources
remove-credential-sources
authorize-session
Host Sources:
Host Catalog ID: hcst_1234567890
ID: hsst_X8gmzYXbO4
Attributes:
Default Port: 5432
기본 포트가 5432인 postgres 대상을 만들고 postgres-hosts 호스트 셋을 호스트 소스로 추가하세요.
resource "boundary_target" "postgres" {
type = "tcp"
name = "postgres"
description = "Postgres target for postgres-hosts host catalog"
scope_id = boundary_scope.project.id
session_connection_limit = -1
session_max_seconds = 300
default_port = 5432
host_source_ids = [
boundary_host_set_static.postgres.id
]
}
이제 CLI나 Boundary Desktop Client로 이 대상들 중 어떤 것이든 세션을 시작할 수 있을 거예요. 이 호스트들이 그 주소에 실제로 존재한다면 연결할 수 있을 거예요.
더 알아보기
Boundary의 필터 문법과 모범 사례에 대한 자세한 내용은 Filtering and listing resources를 참고하세요.
대상에 연결하는 방법을 배우려면 Connection workflows 문서를 참고하세요.