Skip to content

Commit

Permalink
fix: Update bootstrapping for auth and stripe additions (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalezzfelipe authored Sep 2, 2024
1 parent 6b1f501 commit bb23443
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
18 changes: 11 additions & 7 deletions bootstrap/rpc/config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
)}"
}
Expand Down
16 changes: 16 additions & 0 deletions bootstrap/rpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 7 additions & 0 deletions bootstrap/rpc/rpc.toml.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit bb23443

Please sign in to comment.