Search code examples
apigoogle-deployment-managergoogle-cloud-scheduler

Google Deployment Manager Cloud Scheduler type


I see there's no schedule type provided by GCP. I'd like to know the steps to create a template, a composite-type or similar, to provide Cloud Scheduler type. I know Google already provides an example about it.

If it's posible to do so by code It could make use of the python client library though it says in the documentation this library is not available, I could inline it in the code.

I cannot think of a way to authenticate against the google API to do such requests.

In short, my question is how can make Deployment Manager type for Cloud? I know it is sort of vague. Just want to know if it would be doable.

On the other hand, where can I find the official development for this GCP service?

For completenesss here's the related Github issue too


Solution

  • I was looking for this functionality and thought I should give an up to date answer on the topic.

    Thanks to https://stackoverflow.com/users/9253778/dany-l for the feature request which led me to this answer.

    It looks like this functionality is indeed provided, just that the documentation has yet to be updated to reflect it.

    Here's the snippet from https://issuetracker.google.com/issues/123013878:

      - type: gcp-types/cloudscheduler-v1:projects.locations.jobs
        name: <YOUR_JOB_NAME_HERE>
        properties:
          parent: projects/<YOUR_PROJECT_ID_HERE>/locations/<YOUR_REGION_HERE>
          name: <YOUR_JOB_NAME_HERE>
          description: <YOUR_JOB_DESCRIPTION_HERE>
          schedule: "0 2 * * *" # daily at 2 am
          timeZone: "Europe/Amsterdam"
          pubsubTarget:
            topicName: projects/<YOUR_PROJECT_ID_HERE>/topics/<YOUR_EXPECTED_TOPIC_HERE>
            data: aGVsbG8hCg== # base64 encoded "hello!"