https://pulumi.com logo
#google-cloud
Title
# google-cloud
f

fast-arm-63150

03/11/2022, 11:41 AM
Hey everyone! I did some googling on enabling/pausing the state of jobs in cloud scheduler - does anyone know if this is feasible with pulumi? Many thanks, this would be a great help.
w

witty-candle-66007

03/11/2022, 5:36 PM
You can manage cloudscheduler jobs with the Pulumi Google Cloud providers (e.g. https://www.pulumi.com/registry/packages/google-native/api-docs/cloudscheduler/v1/job/) But the only way to really manage pause and run for a job would that once you’ve created (or imported) the job to Pulumi management, you would run a
pulumi up
that updates the job resource with a schedule that doesn’t run anytime soon to “pause” it. And then update it again with the proper schedule to get it to run again. Depending on the use-case, I would likely use Pulumi to manage the creation/updating of the jobs but use the Google API SDK “pause” and “resume” methods to pause/unpause (https://cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations.jobs/pause)
f

fast-arm-63150

03/12/2022, 12:26 AM
@witty-candle-66007 hey thanks, was hoping Pulumi would have been able to set a state of the cloud scheduler job like "enabled" or "paused"