Skip to content

Commit

Permalink
WebApp - CD con terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
Dario Di Gulio committed Dec 26, 2023
1 parent 52d5bec commit 6c96ac3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/webApp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ jobs:
cd webapp
yarn build
- name: Update AWS CLI
run: sudo apt-get update && sudo apt-get install -y awscli

- name: Deploy to S3
- name: Deploy Infrastructure with Terraform
run: |
aws s3 sync webapp/build/ s3://estelarte-web --delete --debug --profile s3-uploader
terraform init
terraform apply -auto-approve
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
7 changes: 7 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
provider "aws" {
region = "sa-east-1"
}

resource "aws_s3_bucket" "webapp_bucket" {
bucket = "estelarte-web"
}

0 comments on commit 6c96ac3

Please sign in to comment.