diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 21d8478..35324db 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -38,12 +38,12 @@ jobs: TF_VAR_AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} TF_VAR_AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} TF_VAR_AWS_REGION: ${{ secrets.AWS_REGION }} - TF_VAR_STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }} + TF_VAR_STRIPE_API_KEY: ${{ secrets.STRIPE_API_KEY }} run: terraform -chdir=infrastructure plan - name: Apply Terraform env: TF_VAR_AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} TF_VAR_AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} TF_VAR_AWS_REGION: ${{ secrets.AWS_REGION }} - TF_VAR_STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }} + TF_VAR_STRIPE_API_KEY: ${{ secrets.STRIPE_API_KEY }} run: terraform -chdir=infrastructure apply -auto-approve \ No newline at end of file diff --git a/infrastructure/main.tf b/infrastructure/main.tf index 3977d30..e97b053 100644 --- a/infrastructure/main.tf +++ b/infrastructure/main.tf @@ -4,6 +4,10 @@ terraform { source = "hashicorp/aws" version = "4.4.0" } + stripe { + source = "lukasaron/stripe" + version = "1.7.7" + } } backend "s3" { @@ -19,4 +23,6 @@ provider "aws" { region = var.AWS_REGION access_key = var.AWS_ACCESS_KEY_ID secret_key = var.AWS_SECRET_ACCESS_KEY -} \ No newline at end of file +} + +provider "stripe" {} \ No newline at end of file diff --git a/infrastructure/vars.tf b/infrastructure/vars.tf index 82bb0bc..198b19d 100644 --- a/infrastructure/vars.tf +++ b/infrastructure/vars.tf @@ -6,7 +6,7 @@ variable "AWS_REGION" { } variable "STRIPE_SECRET_KEY" { - type = string + type = string } variable "AWS_ACCESS_KEY_ID" {