From c09890fc315b846454c5d46c762b1eac5993da96 Mon Sep 17 00:00:00 2001 From: Olivier Cervello Date: Fri, 20 Dec 2019 15:19:04 +0100 Subject: [PATCH] Fix issue #29 --- outputs.tf | 4 ++-- variables.tf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/outputs.tf b/outputs.tf index 8617e134..e1db53fd 100644 --- a/outputs.tf +++ b/outputs.tf @@ -15,12 +15,12 @@ */ output "name" { - value = var.scheduler_job == null ? google_cloud_scheduler_job.job.0.name : var.scheduler_job.name + value = length(google_cloud_scheduler_job.job) > 0 ? google_cloud_scheduler_job.job.0.name : var.scheduler_job.name description = "The name of the job created" } output "scheduler_job" { - value = var.scheduler_job == null ? google_cloud_scheduler_job.job : var.scheduler_job + value = length(google_cloud_scheduler_job.job) > 0 ? google_cloud_scheduler_job.job.0 : var.scheduler_job description = "The Cloud Scheduler job instance" } diff --git a/variables.tf b/variables.tf index 9ab5e0b2..8e3c3935 100644 --- a/variables.tf +++ b/variables.tf @@ -151,7 +151,7 @@ variable "time_zone" { } variable "scheduler_job" { - type = object({ name = string }) + type = any description = "An existing Cloud Scheduler job instance" default = null }