Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1 basic tf setup and simple health endpoint for cli client #2

Merged
merged 30 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
440534b
Provide simple rust client and health endpoint
tbsklg Aug 13, 2024
e58ea56
Provide base_url in config file
tbsklg Aug 13, 2024
31c1da3
Provide usage plan for health endpoint
tbsklg Aug 13, 2024
85a901c
Provide s3 bucket for tf backend
tbsklg Aug 14, 2024
d6e009c
Update README.md
tbsklg Aug 14, 2024
8553d99
Provide first github action
tbsklg Aug 14, 2024
87b517f
Set default working directory for infrastructure
tbsklg Aug 14, 2024
d4ebaf6
Provide github oidc role to apply tf
tbsklg Aug 15, 2024
26d3b0f
Build up rust lambda
tbsklg Aug 15, 2024
18ec7b6
Update health directory
tbsklg Aug 15, 2024
6e4568c
Rustup cargo
tbsklg Aug 15, 2024
d3ad83c
Update working directory path
tbsklg Aug 15, 2024
0fea587
Merge pipeline steps
tbsklg Aug 15, 2024
9931655
Fix pipeline steps
tbsklg Aug 15, 2024
8cf9278
Remove uneccessary
tbsklg Aug 15, 2024
7211712
Rename cli-client to strikes
tbsklg Aug 15, 2024
915d457
Run deployment only on pull_request
tbsklg Aug 15, 2024
a95e5df
Setup s3 bucket for remote state initially
tbsklg Aug 15, 2024
df9756c
Update infrastructure
tbsklg Aug 15, 2024
60e9f22
Use oidc for bootstrap infra
tbsklg Aug 15, 2024
553df34
Update ci/cd pipeline
tbsklg Aug 15, 2024
1e9d84d
Remove remote state infrastructure build step
tbsklg Aug 15, 2024
886d8de
Fix pipeline
tbsklg Aug 15, 2024
e1d03fb
Refactor pipeline
tbsklg Aug 15, 2024
ee76ba9
Refactor pipeline
tbsklg Aug 15, 2024
c8326e4
Temporary disable steps
tbsklg Aug 15, 2024
ded1807
Temporary disable steps
tbsklg Aug 15, 2024
bf067e9
Remove unused steps
tbsklg Aug 15, 2024
5716eff
Plan and Apply only for pull request and in main
tbsklg Aug 15, 2024
0a0f532
Plan and Apply only for pull request and in main
tbsklg Aug 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
defaults:
run:
shell: bash
working-directory: infrastructure
name: Deploy
on: [pull_request]
permissions:
id-token: write
contents: read
pull-requests: write
jobs:
deploy-infrastructure:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3

- name: Build & Test lambda
run: |
pip3 install cargo-lambda
rustup update stable && rustup default stable
cargo lambda build --arm64 --release
cargo test --verbose
working-directory: infrastructure/health

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_OIDC_ASSUME_ROLE_ARN }}
aws-region: eu-central-1
role-session-name: GitHub-OIDC-TF

- name: Terraform Init
id: init
env:
AWS_BUCKET_NAME: ${{ secrets.AWS_STATE_BUCKET_NAME }}
run: terraform init --backend-config="bucket=${AWS_BUCKET_NAME}"

- name: Terraform Validation
id: validate
run: terraform validate

- name: Terraform Plan
id: plan
if: github.event == 'pull_request'
run: terraform plan

- name: Terraform Apply
id: apply
if: github.ref == 'refs/head/main' && github.event_name == 'push'
run: terraform apply -auto-approve
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Strike
# Strikes
1 change: 1 addition & 0 deletions cli-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
Loading