diff --git a/.github/workflows/lambda-site-origin-request-handler.yaml b/.github/workflows/lambda-site-origin-request-handler.yaml new file mode 100644 index 0000000000..d2ebe6e387 --- /dev/null +++ b/.github/workflows/lambda-site-origin-request-handler.yaml @@ -0,0 +1,60 @@ +--- +name: lambda-site-origin-request-handler + +env: + AWS_REGION: us-east-1 + +on: + push: + branches: + - development + paths: + - 'src/lambdas/site-origin-request-handler/src/index.mjs' + - 'src/lambdas/site-origin-request-handler/terraform/**' + pull_request: + branches: + - development + paths: + - 'src/lambdas/site-origin-request-handler/src/index.mjs' + - 'src/lambdas/site-origin-request-handler/terraform/**' + +permissions: + id-token: write + contents: read + +jobs: + deploy: + runs-on: fusionauth-standard + container: 752443094709.dkr.ecr.us-west-2.amazonaws.com/gha-runner-ubuntu-22.04:bootstrap-05 + steps: + + - name: checkout + uses: actions/checkout@v4 + with: + sparse-checkout: | + src + + - name: set aws credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-chaining: true + role-to-assume: arn:aws:iam::752443094709:role/github-actions + role-session-name: github-actions + aws-region: ${{ env.AWS_REGION }} + + - name: setup terraform + uses: hashicorp/setup-terraform@v2 + with: + terraform_version: 1.6.2 + + - name: terraform plan + if: github.event_name == 'pull_request' + working-directory: src/lambdas/site-origin-request-handler/terraform + shell: bash + run: terraform init && terraform plan + + - name: terraform apply + if: github.event_name == 'push' + working-directory: src/lambdas/site-origin-request-handler/terraform + shell: bash + run: terraform init && terraform apply -auto-approve diff --git a/.github/workflows/publish-site-redirect-rules.yaml b/.github/workflows/publish-site-redirect-rules.yaml index 5889d5637d..7d63b5564c 100644 --- a/.github/workflows/publish-site-redirect-rules.yaml +++ b/.github/workflows/publish-site-redirect-rules.yaml @@ -10,7 +10,7 @@ on: branches: - development paths: - - 'src/lambdas/fusionauth-site-origin-handler/data/redirects.json' + - 'src/lambdas/site-origin-request-handler/data/redirects.json' permissions: id-token: write @@ -34,6 +34,6 @@ jobs: aws-region: ${{ env.AWS_REGION }} - name: upload file to s3 - working-directory: src/lambdas/fusionauth-site-origin-handler/data + working-directory: src/lambdas/site-origin-request-handler/data run: | - aws s3 cp ./redirects.json s3://fusionauth-dev-us-east-1-artifacts/lambda/fusionauth-site-origin-handler/redirects.json + aws s3 cp ./redirects.json s3://fusionauth-dev-us-east-1-artifacts/lambda/site-origin-request-handler/redirects.json diff --git a/.gitignore b/.gitignore index 536ea73e7c..01c579d456 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,6 @@ node_modules .savant/cache astro/.astro + +# Local .terraform directories +**/.terraform/* diff --git a/astro/src/components/Aside.astro b/astro/src/components/Aside.astro index 66a0e079ed..5e4e60f9b7 100644 --- a/astro/src/components/Aside.astro +++ b/astro/src/components/Aside.astro @@ -55,7 +55,7 @@ const bgColor = bgColors[type];