본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)22k · #10243

cloud-monitoring-notification-channels-configuration

하는 일

이 스킬은 Google Cloud에 알림을 어디로 보낼지 알려 주는 Terraform 코드를 만듭니다. 모니터링을 인프라 코드로 관리하는 엔지니어를 위한 스킬입니다.

사용하는 경우

  • ✓이메일, SMS, Slack, PagerDuty, Pub/Sub 또는 웹훅으로 알림을 보내고 싶을 때.
  • ✓기존 알림 정책에 알림 채널을 연결해야 할 때.
  • ✓Pub/Sub 토픽이 교차 프로젝트를 포함해 알림을 받을 수 있는지 확인하고 싶을 때.

스킬 링크

https://github.com/google/skills/blob/main/skills/cloud/cloud-monitoring-notification-channels-configuration/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/google/skills/blob/main/skills/cloud/cloud-monitoring-notification-channels-configuration/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Terraform을 써서 Cloud Monitoring 알림 정책에 Slack과 이메일 알림을 설정해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

알림 채널을 정의하고 알림 정책에 연결하는 Terraform 파일을 작성합니다. 채널을 배포해 달라고 요청한 경우에만 Terraform을 설치합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Cloud Monitoring Notification Channels Configuration

Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read Usage Attribution. For commands executed directly in the terminal (never in generated scripts, Terraform, or user code), prefix gcloud with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:cloud-monitoring-notification-channels-configuration)" and append agent-skills/1.0 (skill:cloud-monitoring-notification-channels-configuration) to User-Agent headers.

Context Provided

  • Terraform Only: Write the generated observability configuration ONLY as Terraform (.tf) files (e.g., notification_channels.tf).
    • Install Terraform ONLY if you are asked to deploy the channels AND there is no valid Terraform installation.
    • If you are NOT asked to deploy the channels, DO NOT install Terraform.
  • Working Directory Inference: Determine the target path for .tf files using the following order:
    1. If the user provides a path, use that exact path for the .tf file.
    2. If a path is not provided, search the workspace for existing .tf files (preferring files that already define google_monitoring_notification_channel or google_monitoring_alert_policy resources, or existing directories in the strict preference order: monitoring/, then ops/, then sre/). If found, write notification_channels.tf in that directory (or update the existing .tf file when modifying an existing resource).
    3. If a path is not provided and no .tf files or target directories exist in the workspace, create and write to monitoring/notification_channels.tf.
  • Google Cloud Prerequisites: When running gcloud CLI discovery commands or deploying configurations with the terraform CLI against a Google Cloud project, ensure the following prerequisites are met in order (do not execute these commands if the user only asks to generate or print Terraform HCL):
    1. Target Project ID & Project Number:
      • Identify the target Google Cloud {project_id} from the user's request or via gcloud config get-value project. If neither is available, prompt the user to provide {project_id} before continuing.
      • When the Google Cloud project number ({project_number}) is needed (such as constructing the Cloud Monitoring Service Agent identity for Pub/Sub channels):
        • Method A (Standard): Run gcloud projects describe {project_id} --format='value(projectNumber)'.
        • Method B (Ask User): If the command fails or you cannot retrieve the project number, ask the user to provide it.
    2. Authentication: Authenticate the gcloud CLI via gcloud auth login and configure Application Default Credentials (ADC) for Terraform via gcloud auth application-default login.
    3. Project Configuration & Billing: Configure the target Google Cloud project via gcloud config set project {project_id} (and ensure the project has an active billing account attached).
      • Recovery Actions: If gcloud config set project {project_id} or gcloud projects describe {project_id} fails, verify active credentials with gcloud auth list, list accessible projects with gcloud projects list, or prompt the user to confirm the project ID and access permissions. If deployment fails due to a missing or inactive billing account, stop deployment and instruct the user to link an active billing account (via gcloud billing projects link {project_id} --billing-account={account_id} or in the Google Cloud console) before retrying.
    4. IAM Permissions: Ensure the principal has permission to manage notification channels—either via the predefined Monitoring NotificationChannel Editor role (roles/monitoring.notificationChannelEditor, plus roles/monitoring.alertPolicyEditor when adding a channel to an existing alert policy) or via a custom IAM role containing the equivalent permissions (monitoring.notificationChannels.get, monitoring.notificationChannels.list, `m
자주 묻는 질문

채널을 대신 배포하나요?

요청했을 때만 배포합니다. 그렇지 않으면 Terraform 파일만 작성합니다.

파일은 어디에 저장되나요?

사용자가 지정한 경로나, 작업 공간에서 찾은 기존 Terraform 폴더에 저장됩니다.

Pub/Sub 토픽도 확인하나요?

네. 교차 프로젝트를 포함해 Pub/Sub 토픽이 호환되는지 확인할 수 있습니다.

상세 정보

작성자의 원본 설명

Generates Terraform HCL configurations for Cloud Monitoring notification channels (`google_monitoring_notification_channel`) and adds notification channels to alerting policies (`google_monitoring_alert_policy`) in Google Cloud projects. Use when creating or configuring email, SMS, Slack, PagerDuty, Pub/Sub, or webhook notification channels, verifying Pub/Sub topic compatibility (including cross-project topics, message storage policies, and in-transit enforcement) and publishing permissions for the Cloud Monitoring Service Agent, or adding notification channels to existing alert policies. Don'

repo: google/skills

인기도

GitHub 스타
22k
순위
#10243
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬