diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 43ea0ae..20f5484 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -75,6 +75,7 @@ jobs: TF_VAR_region: ${{ vars.GCP_REGION }} TF_VAR_run_hash: ${{ github.sha }} TF_VAR_pdf_bucket: ${{ vars.GCP_PDF_BUCKET }} + TF_VAR_resend_api_key: ${{ secrets.RESEND_API_KEY }} working-directory: ./terraform run: terraform apply -auto-approve -target=google_artifact_registry_repository.tldd @@ -95,6 +96,7 @@ jobs: TF_VAR_region: ${{ vars.GCP_REGION }} TF_VAR_run_hash: ${{ github.sha }} TF_VAR_pdf_bucket: ${{ vars.GCP_PDF_BUCKET }} + TF_VAR_resend_api_key: ${{ secrets.RESEND_API_KEY }} run: terraform apply -auto-approve - name: Install frontend dependencies diff --git a/terraform/main.tf b/terraform/main.tf index 9c6ff6f..42468e1 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -33,6 +33,9 @@ resource "google_secret_manager_secret" "resend_api_key" { } } } + secret_data { + value = var.resend_api_key + } } resource "google_firestore_database" "tldd" { diff --git a/terraform/variables.tf b/terraform/variables.tf index 27cb8b2..a98d703 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -16,4 +16,9 @@ variable "run_hash" { variable "pdf_bucket" { description = "The name of the bucket to store the PDFs in" type = string +} + +variable "resend_api_key" { + description = "The API key for Resend" + type = string } \ No newline at end of file