Skip to content

Commit

Permalink
resend secret fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanBaker committed Jul 10, 2024
1 parent cbec5ad commit 877fe0f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ resource "google_secret_manager_secret" "resend_api_key" {
}
}
}
secret_data {
value = var.resend_api_key
}
}

resource "google_firestore_database" "tldd" {
Expand Down
5 changes: 5 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 877fe0f

Please sign in to comment.