From 5cad0f433ad80fcd99f481057882d3c39abc1528 Mon Sep 17 00:00:00 2001 From: gonzalezzfelipe Date: Mon, 2 Sep 2024 16:38:02 -0300 Subject: [PATCH] fix: Update bootstrapping for auth and stripe additions --- bootstrap/rpc/config.tf | 18 +++++++++++------- bootstrap/rpc/main.tf | 16 ++++++++++++++++ bootstrap/rpc/rpc.toml.tftpl | 7 +++++++ 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/bootstrap/rpc/config.tf b/bootstrap/rpc/config.tf index 5b4464a..2cd6cc2 100644 --- a/bootstrap/rpc/config.tf +++ b/bootstrap/rpc/config.tf @@ -10,13 +10,17 @@ resource "kubernetes_config_map_v1" "fabric_rpc_config" { { port = local.port, // If we change the consumer, we must rebuild the cache. - db_path = "/var/cache/${var.consumer_name}.db", - broker_urls = var.broker_urls - consumer_name = var.consumer_name - kafka_username = var.kafka_username - kafka_password = var.kafka_password - topic = var.kafka_topic - secret = var.secret + db_path = "/var/cache/${var.consumer_name}.db", + broker_urls = var.broker_urls + consumer_name = var.consumer_name + kafka_username = var.kafka_username + kafka_password = var.kafka_password + topic = var.kafka_topic + secret = var.secret + auth0_client_id = var.auth0_client_id + auth0_client_secret = var.auth0_client_secret + auth0_audience = var.auth0_audience + stripe_api_key = var.stripe_api_key } )}" } diff --git a/bootstrap/rpc/main.tf b/bootstrap/rpc/main.tf index 11479fe..27c31f1 100644 --- a/bootstrap/rpc/main.tf +++ b/bootstrap/rpc/main.tf @@ -29,6 +29,22 @@ variable "kafka_password" { type = string } +variable "auth0_client_id" { + type = string +} + +variable "auth0_client_secret" { + type = string +} + +variable "auth0_audience" { + type = string +} + +variable "stripe_api_key" { + type = string +} + variable "kafka_topic" { type = string default = "events" diff --git a/bootstrap/rpc/rpc.toml.tftpl b/bootstrap/rpc/rpc.toml.tftpl index 6231810..4dbd469 100644 --- a/bootstrap/rpc/rpc.toml.tftpl +++ b/bootstrap/rpc/rpc.toml.tftpl @@ -6,6 +6,13 @@ crds_path = "/fabric/crds" [auth] url = "https://txpipe.us.auth0.com" +client_id="${auth0_client_id}" +client_secret="${auth0_client_secret}" +audience="${auth0_audience}" + +[stripe] +url = "https://api.stripe.com/v1" +api_key = "${stripe_api_key}" [kafka_producer] "bootstrap.servers" = "${broker_urls}"