-
Terraform cli installed via Homebrew https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli#install-terraform
-
If you install deprecated one from homebrew, here are the steps to install latests one
-
brew uninstall terraform
-
brew tap hashicorp/tap
-
brew install hashicorp/tap/terraform
-
cd infrastructure
-
Set AWS environment variables from AWS Playground Access Keys by running below commands
export AWS_ACCESS_KEY_ID="key1"
export AWS_SECRET_ACCESS_KEY="key2"
export AWS_SESSION_TOKEN="key3"
- open main.tf and replace your_name with your actual name
- copy paste aws playgroud access keys in terminal
- run
terraform init
- run
terraform plan
- run
terraform apply -auto-approve
- will get strange 403 error of aws_s3_bucket_policy (probably playground account is setup with specific permission? 🤔)
- run
terraform apply -auto-approve
again - go to AWS Playground - SRE 1 > Type 'S3' in searchbar > filter by gha-{your_name}
- confirm new S3 bucket with your name exists in AWS
- confirm that static site hosting is enabled, public access is turned on and bucket policy is attached
- run
terraform destroy -auto-approve
- go to your forked repository > Settings > Security > Secrets and Variables > Actions
- add
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
, andAWS_SESSION_TOKEN
with the values from AWS Playground - you can find those values by clicking Access Keys under the AWS Playground - SRE 1
npm install
npm run dev
npm run build
npm run test
npm run lint