host-sets create 명령어
host-sets create 명령어
boundary host-sets create는 새 호스트 셋(host set)을 만드는 명령어예요. 유형은 plugin과 static 두 가지가 있어요.
본문
boundary host-sets create 명령어는 새 호스트 셋을 만들어요.
예제 (Example)
다음 예제는 이름이 prodops, 설명이 For ProdOps usage인 스태틱 호스트 셋을 만들어요.
$ boundary host-sets create static -name prodops -description "For ProdOps usage"
사용법 (Usage)
$ boundary host-sets create [type] <subcommand> [options] [args]
Please see the typed subcommand help for detailed usage information.
Subcommands:
plugin Create a plugin-type host set
static Create a static-type host set
유형별 사용법 (Usages by type)
plugin 또는 static 유형 호스트 셋을 만들 수 있어요.
plugin 생성
boundary host-sets create plugin 명령어는 plugin 유형 호스트 셋을 만들어요.
예제
다음 예제는 이름이 prodops, 설명이 Plugin host-set for ProdOps인 plugin 유형 호스트 셋을 만들고 ID가 hcst_1234567890인 호스트 카탈로그(host catalog)에 추가해요.
$ boundary host-sets create plugin -host-catalog-id hcst_1234567890 -name prodops -description "Plugin host-set for ProdOps"
사용법
$ boundary host-sets create plugin [options] [args]
명령 옵션 (Command options)
-description=<string>- plugin 호스트 셋에 설정할 설명이에요.-host-catalog-id=<string>- 작업에 사용할 호스트 카탈로그 리소스예요. 호스트 카탈로그는BOUNDARY_HOST_CATALOG_ID환경 변수로도 지정할 수 있어요.-name=<string>- plugin 호스트 셋에 설정할 이름이에요.
속성 옵션 (Attribute options)
-attr- 요청의 attribute 맵에 추가할key=value쌍이에요. 이 옵션은 값만 있는 단일 키일 수도 있고, 이 경우 값은 JSON null로 설정돼요. 값을 주면 Boundary가 유형을 자동으로 추론해요.-string-attr,-bool-attr,-num-attr로 유형을 덮어쓸 수 있어요. 이 값은 여러 번 지정할 수 있고,file://로 파일에서,env://로 환경 변수에서 값을 참조하는 것을 지원해요.-attributes=<string>- 요청의 attributes 맵 전체로 사용할 수 있는 JSON 맵 값이에요. 보통file://구문으로 파일에서 가져와요. 이 옵션은 다른 attr 플래그와 배타적이에요.-bool-attr- 요청의 attributes 맵에 추가할 수 있는key=value불리언 값이에요. 이 값은 여러 번 지정할 수 있고,file://로 파일에서,env://로 환경 변수에서 값을 참조하는 것을 지원해요.-num-attr- 요청의 attributes 맵에 추가할 수 있는key=value숫자 값이에요. 이 값은 여러 번 지정할 수 있고, 이 속성은file://로 파일에서,env://로 환경 변수에서 값을 참조하는 것을 지원해요.-string-attr- 요청의 attributes 맵에 추가할 수 있는key=value문자열 값이에요. 이 값은 여러 번 지정할 수 있고, 이 옵션은file://로 파일에서,env://로 환경 변수에서 값을 참조하는 것을 지원해요.
Plugin 호스트 셋 옵션 (Plugin host-set options)
-preferred-endpoint=<string>- 설정하면 Boundary가 대상(target)과 세션을 맺을 때 호스트가 가진 옵션 중 어떤 IP 주소나 DNS 이름을 선호 엔드포인트로 쓸지 지정해요.preferred-endpoint옵션은 모든 plugin 유형에서 유효하지 않을 수 있어요. CIDR이나 DNS 형식으로 여러 엔드포인트를 지정해 선호 순서를 만들 수 있어요. CIDR 문자열은cidr:<valid IPv4/6 CIDR>형식을 따라야 해요. 예:cidr:10.0.0.0/16. DNS 문자열은dns:<globbed name>형식을 따라야 해요. 예:dns:*.internal. 선호를 지정하지 않으면 Boundary는 다음 기본 우선순위로 엔드포인트를 선택해요: Private IPv4, Public IPv4, DNS, Private IPv6, Public IPv6.-sync-interval=<string>- 호스트 셋에서 동기화 작업 사이의 시간 간격이에요. 정수 초를 입력하거나400s,5m,6h같은 문자열을 입력할 수 있어요. 이 간격은 이전 동기화 작업의 시작이 아니라 끝에 적용돼요. 간격을 음수로 설정하면 해당 호스트 셋의 동기화가 비활성화돼요. 간격을null로 설정하면 Boundary가 기본값을 사용해요. 기본값은 릴리스마다 바뀔 수 있어요.
static 생성
boundary host-sets create static 명령어는 static 유형 호스트 셋을 만들어요.
예제
다음 예제는 이름이 prodops, 설명이 Static host-set for ProdOps인 static 유형 호스트 셋을 만들어요.
$ boundary host-sets create static -name prodops -description "Static host-set for ProdOps"
사용법
$ boundary host-sets create static [options] [args]
명령 옵션 (Command options)
-description=<string>- static 호스트 셋에 설정할 설명이에요.-host-catalog-id=<string>- 작업에 사용할 호스트 카탈로그 리소스예요. 호스트 카탈로그는BOUNDARY_HOST_CATALOG_ID환경 변수로도 지정할 수 있어요.-name=<string>- static 호스트 셋에 설정할 이름이에요.
CLI 옵션 (CLI options)
명령어 고유 옵션 외에도 모든 Boundary CLI 명령어·하위 명령어에 공통으로 적용되는 옵션들이 있어요.
- 연결 옵션 (Connection options)
- 클라이언트 옵션 (Client options)
- 출력 옵션 (Output options)
- 환경 변수 (Environment variables)