GCP 자원들에 대해서, 비용 데이터에서 확인이나 기타 자원관리를 위해서 label 설정이 필요할때가있다.

 매번 수작업으로 하기는 귀찮기에 github에 auto 라벨링 가이드가 있어 따라하면 쉽게 자동 라벨링을 할 수 있다.

# Github: https://github.com/GoogleCloudPlatform/community/blob/master/archived/cloud-asset-inventory-auto-label-resources/index.md

 

1.pub sub topic 생성
2. feed생성(gcloud cli)
3. function 생성: 파이썬 코드 https://github.com/GoogleCloudPlatform/community/blob/master/archived/cloud-asset-inventory-auto-label-resources/cloud-function-auto-resource-labeler/main.py