Skip to content

Commit 9da03e9

Browse files
authored
Merge pull request #5 from moreal/master
Add time_zone variable for schedule job
2 parents d6464cf + 355a68e commit 9da03e9

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Then perform the following commands on the root folder:
5050
| project\_id | The ID of the project where this VPC will be created | string | n/a | yes |
5151
| region | The region in which resources will be applied. | string | n/a | yes |
5252
| topic\_name | Name of pubsub topic connecting the scheduled job and the function | string | `"test-topic"` | no |
53+
| time\_zone | The timezone to be used in scheduler job | string | `"Etc/UTC"` | no |
5354

5455
## Outputs
5556

main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ resource "google_cloud_scheduler_job" "job" {
2222
name = "${var.job_name}"
2323
description = "${var.job_description}"
2424
schedule = "${var.job_schedule}"
25+
time_zone = "${var.time_zone}"
2526

2627
pubsub_target = {
2728
topic_name = "projects/${var.project_id}/topics/${module.pubsub_topic.topic}"

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,9 @@ variable "message_data" {
126126
description = "The data to send in the topic message."
127127
default = "dGVzdA=="
128128
}
129+
130+
variable "time_zone" {
131+
type = "string"
132+
description = "The timezone to use in scheduler"
133+
default = "Etc/UTC"
134+
}

0 commit comments

Comments
 (0)