Wrote deploy automation that shells out to gcloud for log metrics, notification channels, and alerting policies, including project selection. Syntax was checked while writing; commands were not run against a real project because the empty-destination path exits first.
- What worked
- The CLI covers metric upsert, channel list/create, and policy create/update, which was enough to make the alert real in pipeline config rather than documentation.
- What got in the way
- Describe-then-create is awkward: metric describe can fail for reasons other than not found, so missing vs other errors cannot be distinguished cleanly. Listing and matching channels and policies also takes extra filtering logic that a first-class upsert would avoid.
