Terraform을 사용한 Google Cloud Pub/Sub 로그 소스 관리
Terraform에서 Google Cloud Pub/Sub 로그 소스를 코드로 관리
개요
Terraform에서 Panther Pub/Sub 로그 소스를 정의하는 방법
사전 요구 사항
1단계: 인증 방법 선택
2단계: 변수 정의
variable "panther_api_token" {
description = "Panther API 토큰"
type = string
}
variable "panther_api_url" {
description = "Panther API URL"
type = string
}
variable "integration_label" {
description = "통합의 이름."
type = string
}
variable "credentials_type" {
description = "사용되는 인증 방법."
type = string
}
variable "subscription_id" {
description = "Google Cloud Pub/Sub 구독 ID"
type = string
}
// 인증 변수는 credentials_type에 따라 다릅니다. 아래 표를 참조하세요
variable "credentials" {
description = "서비스 계정 JSON 키 또는 WIF 자격 증명 구성 파일 내용"
type = string
sensitive = true
}
variable "project_id" {
description = "Google Cloud 프로젝트 ID (WIF에는 필수, 서비스 계정에는 선택 사항)"
type = string
}
// (선택 사항) 지역 엔드포인트
variable "regional_endpoint" {
description = "Pub/Sub의 지역 엔드포인트"
type = string
}
// (선택 사항) log_stream_type = "JsonArray"일 때만 관련 있음
variable "json_array_envelope_field" {
description = "JSON 배열 스트림의 봉투 필드"
type = string
}
// (선택 사항) log_stream_type = "XML"일 때만 관련 있음
variable "xml_root_element" {
description = "XML 로그 스트림의 루트 요소 이름"
type = string
}인증 방법별 변수
인증 방법
credentials_type 값
추가 변수
3단계: 정의된 변수에 대한 값을 제공합니다
4단계: Terraform 프로바이더 정의
5단계: Panther Pub/Sub 로그 소스 정의
6단계: 드롭오프 알람 구성(선택 사항)
마지막 업데이트
도움이 되었나요?

