From fb3ff013fb4c7e16da0394c92c4f53a74b94b78b Mon Sep 17 00:00:00 2001 From: Volodymyr Machula Date: Mon, 28 Oct 2024 01:49:15 +0100 Subject: [PATCH] Add deployment scripts --- .github/workflows/deploy.yml | 21 +++++++++++++++++++++ infrastructure/backend_v1.hcl | 5 +++++ infrastructure/main.tf | 10 ++++++++++ 3 files changed, 36 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 infrastructure/backend_v1.hcl create mode 100644 infrastructure/main.tf diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..f3db7fa --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,21 @@ +name: Deploy + +on: + workflow_dispatch: + push: + branches: + - main + +concurrency: + group: deploy + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: connery-io/deploy-plugin-on-aws-lambda/build-and-deploy@v0.1.0 + with: + aws-access-key-id: ${{ secrets.PLUGINS_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.PLUGINS_AWS_SECRET_ACCESS_KEY }} + aws-region: eu-central-1 + backend-config: backend_v1.hcl diff --git a/infrastructure/backend_v1.hcl b/infrastructure/backend_v1.hcl new file mode 100644 index 0000000..fe21f9a --- /dev/null +++ b/infrastructure/backend_v1.hcl @@ -0,0 +1,5 @@ +bucket = "connery-terraform-remote-state-np" +key = "deepl/v1/terraform.tfstate" +region = "eu-central-1" +encrypt = true +dynamodb_table = "connery-terraform-statelock" \ No newline at end of file diff --git a/infrastructure/main.tf b/infrastructure/main.tf new file mode 100644 index 0000000..be69a83 --- /dev/null +++ b/infrastructure/main.tf @@ -0,0 +1,10 @@ +terraform { + backend "s3" {} +} + +module "deploy-plugin-on-aws-lambda" { + source = "github.com/connery-io/deploy-plugin-on-aws-lambda?ref=v0.1.0" + + plugin_name = "deepl" + plugin_version = "v1" +} \ No newline at end of file