Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update bootstrapping for auth and stripe additions #106

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading