diff --git a/CHANGELOG.md b/CHANGELOG.md index d48795e..ee22a74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning][semver-site]. ### Added -- The `scheduler_job` variable, the `scheduler_job` output, and the `pubsub_topic_name` output to enable linking multiple +- The `scheduler_job` variable, the `scheduler_job` output, and the `pubsub_topic_name` output to enable linking multiple instances of the module to the same Cloud Scheduler job. [#15] ## [1.3.0] - 2019-12-18 diff --git a/outputs.tf b/outputs.tf index 8617e13..673cb2a 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 : null 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 : null description = "The Cloud Scheduler job instance" }