From 85000c585fbb50773a098d963d8c1ddca74bc801 Mon Sep 17 00:00:00 2001 From: Edward Kirk <ek599@cam.ac.uk> Date: Tue, 14 May 2024 13:28:24 +0100 Subject: [PATCH] chore: remove pubsub module --- terraform/faas.tf | 10 +++++----- terraform/modules/pubsub/main.tf | 3 --- terraform/modules/pubsub/outputs.tf | 4 ---- terraform/modules/pubsub/variables.tf | 4 ---- 4 files changed, 5 insertions(+), 16 deletions(-) delete mode 100644 terraform/modules/pubsub/main.tf delete mode 100644 terraform/modules/pubsub/outputs.tf delete mode 100644 terraform/modules/pubsub/variables.tf diff --git a/terraform/faas.tf b/terraform/faas.tf index e73d02b..854cabb 100644 --- a/terraform/faas.tf +++ b/terraform/faas.tf @@ -1,6 +1,6 @@ -module "pubsub" { - source = "./modules/pubsub" - topic_name = "faas-test" +resource "google_pubsub_topic" "faas_test" { + name = "faas-test" + project = local.project } module "faas_service" { @@ -14,7 +14,7 @@ module "faas_service" { timeout_seconds = 10 triggers = { - pubsub_topic_id = module.pubsub.main_topic_id + pubsub_topic_id = google_pubsub_topic.faas_test.id } function_env = [ @@ -41,7 +41,7 @@ module "faas_service_set_retry" { timeout_seconds = 20 triggers = { - pubsub_topic_id = module.pubsub.main_topic_id + pubsub_topic_id = google_pubsub_topic.faas_test.id } retry_count = 4 diff --git a/terraform/modules/pubsub/main.tf b/terraform/modules/pubsub/main.tf deleted file mode 100644 index 2047863..0000000 --- a/terraform/modules/pubsub/main.tf +++ /dev/null @@ -1,3 +0,0 @@ -resource "google_pubsub_topic" "main" { - name = var.topic_name -} diff --git a/terraform/modules/pubsub/outputs.tf b/terraform/modules/pubsub/outputs.tf deleted file mode 100644 index c6769c5..0000000 --- a/terraform/modules/pubsub/outputs.tf +++ /dev/null @@ -1,4 +0,0 @@ -output "main_topic_id" { - value = google_pubsub_topic.main.id - description = "The ID of the main Pub/Sub topic." -} diff --git a/terraform/modules/pubsub/variables.tf b/terraform/modules/pubsub/variables.tf deleted file mode 100644 index 5beddbf..0000000 --- a/terraform/modules/pubsub/variables.tf +++ /dev/null @@ -1,4 +0,0 @@ -variable "topic_name" { - type = string - description = "The name of the Pub/Sub topic." -} -- GitLab