Fix issue with GKE cluster notifications topic, change pubsub module output to static.

This commit is contained in:
Taneli Leppä
2023-03-02 10:21:52 +01:00
parent a5fd32edcb
commit 99d19d5ec8
4 changed files with 12 additions and 8 deletions

View File

@@ -169,10 +169,10 @@ module "pubsub" {
| name | description | sensitive |
|---|---|:---:|
| [id](outputs.tf#L17) | Topic id. | |
| [schema](outputs.tf#L25) | Schema resource. | |
| [schema_id](outputs.tf#L30) | Schema resource id. | |
| [subscription_id](outputs.tf#L35) | Subscription ids. | |
| [subscriptions](outputs.tf#L45) | Subscription resources. | |
| [topic](outputs.tf#L53) | Topic resource. | |
| [schema](outputs.tf#L26) | Schema resource. | |
| [schema_id](outputs.tf#L31) | Schema resource id. | |
| [subscription_id](outputs.tf#L36) | Subscription ids. | |
| [subscriptions](outputs.tf#L46) | Subscription resources. | |
| [topic](outputs.tf#L54) | Topic resource. | |
<!-- END TFDOC -->

View File

@@ -33,6 +33,7 @@ locals {
options = try(v.options, v, null) == null ? var.defaults : v.options
}
}
topic_id_static = "projects/${var.project_id}/topics/${var.name}"
}
resource "google_pubsub_schema" "default" {

View File

@@ -16,8 +16,9 @@
output "id" {
description = "Topic id."
value = google_pubsub_topic.default.id
value = local.topic_id_static
depends_on = [
google_pubsub_topic.default,
google_pubsub_topic_iam_binding.default
]
}