I have created GCP Log Sinks using gcloud command and it works. I now want to move that code into a CloudBuild.Yaml file equivalent. Can someone please point me to the log sink cloud build yaml template please or if you can convert the below command to a cloudbuild.yaml file?
My gcloud command is below which works successfully from cloud shell:
gcloud logging sinks create test3-${_ENV} pubsub.googleapis.com/projects/amer-xxxxxx-us-yyyy-dv/topics/pppp-topic-qqq-pubsub-dv --log-filter='(resource.labels.job_name=("amer-xxx-dv-df-xhxh-sel-details") jsonPayload.message:("completed successfully") jsonPayload.step=("WriteSuccessfulRecords/BatchLoads/SinglePartitionWriteTables/ParMultiDo(WriteTables)")) OR (resource.labels.job_name=("amer-xxxx-dv-df-pqpq-sel-review") jsonPayload.message:("completed successfully") jsonPayload.step=("WriteSuccessfulRecords/BatchLoads/SinglePartitionWriteTables/ParMultiDo(WriteTables)")) OR (resource.labels.job_name=("amer-xxxx-dv-df-pqpq-order") jsonPayload.message:("completed successfully") jsonPayload.step=("WriteSuccessfulRecords/BatchLoads/SinglePartitionWriteTables/ParMultiDo(WriteTables)"))'
What's the difficulty?
And set correctly your _ENV substitution variable when you invoke your Cloud Build