Skip to content

Commit

Permalink
Merge pull request #2 from terraform-google-modules/make-topic-name-r…
Browse files Browse the repository at this point in the history
…eusable

Add ID and URI to module outputs
  • Loading branch information
aaron-lane authored Mar 8, 2019
2 parents 96be6a1 + e880cb5 commit 4de6438
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ module "pubsub" {

| Name | Description |
|------|-------------|
| id | The ID of the Pub/Sub topic |
| subscription_names | The name list of Pub/Sub subscriptions |
| subscription_paths | The path list of Pub/Sub subscriptions |
| topic | The name of the Pub/Sub topic |
| uri | The URI of the Pub/Sub topic |

[^]: (autogen_docs_end)

Expand Down Expand Up @@ -155,4 +157,4 @@ are as follows:
- Golang - gofmt. gofmt comes with the standard golang installation. golang
-s a compiled language so there is no standard linter.
- Terraform - terraform has a built-in linter in the `terraform validate` command.
- Dockerfiles - hadolint. Can be found in homebrew
- Dockerfiles - hadolint. Can be found in homebrew
10 changes: 10 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ output "topic" {
description = "The name of the Pub/Sub topic"
}

output "id" {
value = "${google_pubsub_topic.topic.id}"
description = "The ID of the Pub/Sub topic"
}

output "uri" {
value = "pubsub.googleapis.com/${google_pubsub_topic.topic.id}"
description = "The URI of the Pub/Sub topic"
}

output "subscription_names" {
value = "${concat(
google_pubsub_subscription.push_subscriptions.*.name,
Expand Down

0 comments on commit 4de6438

Please sign in to comment.