From 8f410dd32bbe880aeefab88bdbf76dd7a570e641 Mon Sep 17 00:00:00 2001 From: Quentin Lemaire Date: Tue, 17 Dec 2019 11:53:19 +0100 Subject: [PATCH] Fixes #16 --- outputs.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/outputs.tf b/outputs.tf index 5dfd865..ba44ff5 100644 --- a/outputs.tf +++ b/outputs.tf @@ -15,22 +15,22 @@ */ output "topic" { - value = google_pubsub_topic.topic.0.name + value = length(google_pubsub_topic.topic) > 0 ? google_pubsub_topic.topic.0.name : "" description = "The name of the Pub/Sub topic" } output "topic_labels" { - value = google_pubsub_topic.topic.0.labels + value = length(google_pubsub_topic.topic) > 0 ? google_pubsub_topic.topic.0.labels : {} description = "Labels assigned to the Pub/Sub topic" } output "id" { - value = google_pubsub_topic.topic.0.id + value = length(google_pubsub_topic.topic) > 0 ? google_pubsub_topic.topic.0.id : "" description = "The ID of the Pub/Sub topic" } output "uri" { - value = "pubsub.googleapis.com/${google_pubsub_topic.topic.0.id}" + value = length(google_pubsub_topic.topic) > 0 ? "pubsub.googleapis.com/${google_pubsub_topic.topic.0.id}" : "" description = "The URI of the Pub/Sub topic" }