diff --git a/main.tf b/main.tf index b376bfdb..880dedc8 100644 --- a/main.tf +++ b/main.tf @@ -33,6 +33,7 @@ variable "drone_rpc_secret" {} variable "oauth_client_id" {} variable "oauth_client_secret" {} variable "webhook_handler_fb_verify_token" {} +variable "webhook_handler_fb_page_token" {} variable "ansible_prefix" { default = "ANSIBLE_VAULT_PASSWORD_FILE=~/.ansible/vault_pass.txt ansible-playbook -i playbook/hosts.yaml playbook/linux.yml -t linux/initial_setup" @@ -180,8 +181,10 @@ module "kubernetes_cluster" { mailserver_opendkim_key = var.mailserver_opendkim_key pihole_web_password = var.pihole_web_password + # Webhook tokens webhook_handler_secret = var.webhook_handler_secret webhook_handler_fb_verify_token = var.webhook_handler_fb_verify_token + webhook_handler_fb_page_token = var.webhook_handler_fb_page_token wireguard_wg_0_conf = var.wireguard_wg_0_conf wireguard_wg_0_key = var.wireguard_wg_0_key diff --git a/modules/kubernetes/main.tf b/modules/kubernetes/main.tf index 104665a4..4da952bf 100644 --- a/modules/kubernetes/main.tf +++ b/modules/kubernetes/main.tf @@ -20,6 +20,7 @@ variable "drone_rpc_secret" {} variable "oauth_client_id" {} variable "oauth_client_secret" {} variable "webhook_handler_fb_verify_token" {} +variable "webhook_handler_fb_page_token" {} resource "null_resource" "core_services" { # List all the core modules that must be provisioned first @@ -158,6 +159,7 @@ module "webhook_handler" { tls_secret_name = var.tls_secret_name webhook_secret = var.webhook_handler_secret fb_verify_token = var.webhook_handler_fb_verify_token + fb_page_token = var.webhook_handler_fb_page_token depends_on = [null_resource.core_services] } diff --git a/modules/kubernetes/webhook_handler/main.tf b/modules/kubernetes/webhook_handler/main.tf index d26fbbf8..ea0a7d06 100644 --- a/modules/kubernetes/webhook_handler/main.tf +++ b/modules/kubernetes/webhook_handler/main.tf @@ -2,6 +2,7 @@ variable "tls_secret_name" {} variable "webhook_secret" {} variable "fb_verify_token" {} +variable "fb_page_token" {} resource "kubernetes_namespace" "webhook-handler" { metadata { @@ -88,9 +89,13 @@ resource "kubernetes_deployment" "webhook_handler" { value = var.webhook_secret } env { - name = "FBVerifyToken" + name = "FB_VERIFY_TOKEN" value = var.fb_verify_token } + env { + name = "FB_PAGE_TOKEN" + value = var.fb_page_token + } } } } diff --git a/terraform.tfstate b/terraform.tfstate index 12592536..c94a5732 100644 Binary files a/terraform.tfstate and b/terraform.tfstate differ diff --git a/terraform.tfvars b/terraform.tfvars index 290b05ae..04b65ba1 100644 Binary files a/terraform.tfvars and b/terraform.tfvars differ