FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 7efeaf00 authored by Dave Hart's avatar Dave Hart :pizza:
Browse files

Merge branch '16-add-enabled-var' into 'master'

feat: add `paused` variable for pausing/unpausing the schedule

Closes #16

See merge request !19
parents a458b0e6 44d68414
No related branches found
No related tags found
1 merge request!19feat: add `paused` variable for pausing/unpausing the schedule
Pipeline #581994 passed
......@@ -160,6 +160,7 @@ environment variable.
| <a name="input_local_files_dir"></a> [local\_files\_dir](#input\_local\_files\_dir) | A local directory where files may be created which persist between runs but<br>which are not checked into source control. | `string` | n/a | yes |
| <a name="input_monitoring_project"></a> [monitoring\_project](#input\_monitoring\_project) | Project to create Cloud Monitoring resources in. Defaults to the project<br>used by the google.monitoring provider if not specified. | `string` | `""` | no |
| <a name="input_name"></a> [name](#input\_name) | Short resource-friendly name for the script. | `string` | n/a | yes |
| <a name="input_paused"></a> [paused](#input\_paused) | Flag indicating if the schedule is in a paused state or not. The script<br>runs automatically according to the schedule when the schedule is not<br>paused. When paused, the script only runs when triggered manually.<br>Defaults to `true`. | `bool` | `false` | no |
| <a name="input_project"></a> [project](#input\_project) | Project to create resources in. Defaults to provider project. | `string` | `""` | no |
| <a name="input_region"></a> [region](#input\_region) | Region to create resources in. Defaults to London, UK. | `string` | `"europe-west2"` | no |
| <a name="input_requirements"></a> [requirements](#input\_requirements) | requirements.txt-style file containing script dependencies | `string` | `""` | no |
......
......@@ -190,6 +190,7 @@ resource "google_cloud_scheduler_job" "script" {
name = var.name
description = var.description
paused = var.paused
schedule = var.schedule
time_zone = var.time_zone
attempt_deadline = "${var.timeout}s"
......
......@@ -40,6 +40,17 @@ variable "region" {
description = "Region to create resources in. Defaults to London, UK."
}
variable "paused" {
type = bool
default = false
description = <<-EOT
Flag indicating if the schedule is in a paused state or not. The script
runs automatically according to the schedule when the schedule is not
paused. When paused, the script only runs when triggered manually.
Defaults to `true`.
EOT
}
variable "script" {
type = string
default = <<-EOT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment