host-sets update 명령어

host-sets update 명령어

boundary host-sets update는 기존 호스트 셋(host set)을 업데이트하는 명령어예요. 유형은 plugin과 static 두 가지가 있어요.

출처: HashiCorp Boundary docs

본문

boundary host-sets update 명령어는 기존 호스트 셋을 업데이트해요.

예제 (Example)

다음 예제는 ID가 hsst_1234567890인 스태틱 호스트 셋에 이름 devops와 설명 For DevOps usage를 추가해요.

$ boundary host-sets update static -id hsst_1234567890 -name devops -description "For DevOps usage"

사용법 (Usage)

$ boundary host-sets update [type] <subcommand> [options] [args]

Please see the typed subcommand help for detailed usage information.

Subcommands:
    plugin    Update a plugin-type host set
    static    Update a static-type host set

유형별 사용법 (Usages by type)

plugin 또는 static 호스트 셋 유형을 업데이트할 수 있어요.

plugin 업데이트

boundary host-sets update plugin 명령어는 plugin 유형 호스트 셋을 업데이트해요.

예제

다음 예제는 ID가 hsplg_1234567890인 plugin 유형 호스트 셋에 이름 devops와 설명 Plugin host-set for DevOps를 추가해요.

$ boundary host-sets update plugin -id hsplg_1234567890 -name "devops" -description "Plugin host-set for DevOps"
사용법
$ boundary host-sets update plugin [options] [args]
명령 옵션 (Command options)
  • -description=<string> - plugin 호스트 셋에 설정할 설명이에요.
  • -id=<string> - 업데이트할 plugin 유형 호스트 셋의 ID예요.
  • -name=<string> - plugin 호스트 셋에 설정할 이름이에요.
  • -version=<int> - 업데이트할 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 update static 명령어는 static 유형 호스트 셋을 업데이트해요.

예제

다음 예제는 ID가 hsst_1234567890인 static 유형 호스트 셋에 이름 devops와 설명 Static host-set for DevOps를 추가해요.

$ boundary host-sets update static -id hsst_1234567890 -name "devops" -description "Static host-set for DevOps"
사용법
$ boundary host-sets update static [options] [args]
명령 옵션 (Command options)
  • -description=<string> - static 호스트 셋에 설정할 설명이에요.
  • -id=<string> - 업데이트할 static 유형 호스트 셋의 ID예요.
  • -name=<string> - static 호스트 셋에 설정할 이름이에요.
  • -version=<int> - 업데이트할 static 유형 호스트 셋의 버전이에요. 버전을 지정하지 않으면 명령어가 자동으로 체크-앤-셋을 수행해요.

CLI 옵션 (CLI options)

명령어 고유 옵션 외에도 모든 Boundary CLI 명령어·하위 명령어에 공통으로 적용되는 옵션들이 있어요.

  • 연결 옵션 (Connection options)
  • 클라이언트 옵션 (Client options)
  • 출력 옵션 (Output options)
  • 환경 변수 (Environment variables)

더 알아보기 (Learn more)