Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google_cloud_scheduler_job: support a "paused" attribute #7883

Assignees
Milestone

Comments

@pietrodn
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

Google Cloud Scheduler allows to pause jobs. A paused job is still present in the list of Cloud Scheduler tasks, but does not fire at its schedule, until it is un-paused.

It would be useful if the google_cloud_scheduler_job supported a paused boolean attribute, to define paused jobs in the infrastructure, or to make sure they are not paused.

Currently, the paused status of a Cloud Scheduler job is ignored by the provider in the Terraform plan.
The current behavior introduces the risk of drift between the desired infrastructure and the live one, as one may not realize that a Cloud Scheduler job is paused.

New or Affected Resource(s)

  • google_cloud_scheduler_job

Potential Terraform Configuration

resource "google_cloud_scheduler_job" "job" {
  name        = "test-job"
  description = "test job"
  schedule    = "*/2 * * * *"
  paused      = true

  pubsub_target {
    topic_name = google_pubsub_topic.topic.id
    data       = base64encode("test")
  }
}
@ghost ghost added enhancement labels Nov 25, 2020
@rileykarson rileykarson added this to the Goals milestone Nov 30, 2020
@felixogg-britned
Copy link

Using 3.65.0 actually a paused state, configuration drift originating from the GUI, blocked Terraform apply with an error
googleapi: Error 400: Job.state must be ENABLED or UPDATE_FAILED for UpdateJob.

It all cleared up when I manually enabled the jobs in the GUI, and re-ran plan and apply.

@dcarvalhal
Copy link

Hey guys!!

We have an update about this?

" An argument named "paused" is not expected here."

@irwinbraganza
Copy link

+1

@bluemalkin
Copy link

Any update on this ? Thanks.

@fkfouri
Copy link

fkfouri commented Jan 12, 2022

This feature would be great

@gorziza
Copy link

gorziza commented Feb 2, 2022

+1

@YohanGrember
Copy link

+1, it's a real pain not to be able to handle the cloud scheduler job state from Terraform :/

@lmartelli
Copy link

#11141 :-)

Please, give it a try

@SarahFrench SarahFrench self-assigned this Jul 11, 2022
@SarahFrench
Copy link
Member

🙋‍♀️ I'm working on a PR to add this to GoogleCloudPlatform/magic-modules

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.