Deploy AWS Resources for Static Site by Terraform
Create S3 Bucket named "your-terraform-config-bucket"
You need below
- aws-cli >= 1.29.X
- Terraform >= 1.7.2
brew install tfenv
tfenv install 1.7.2
tfenv use 1.7.2
Copy sample file and edit variables for your env
cd (project_root_dir)
cp terraform.tfvars.sample terraform.tfvars
vi terraform.tfvars
export AWS_PROFILE=your-aws-profile-name
export AWS_REGION="ap-northeast-1"
Command Example to init
terraform init -backend-config="bucket=your-deployment" -backend-config="key=terraform/your-project/terraform.tfstate" -backend-config="region=ap-northeast-1"
terraform apply -var-file=./terraform.tfvars