- Terraform >= 1.5.0
- AWS CLI configured with appropriate credentials
Create the S3 bucket and DynamoDB table before initializing:
aws s3api create-bucket --bucket gistpin-terraform-state --region us-east-1
aws s3api put-bucket-versioning --bucket gistpin-terraform-state --versioning-configuration Status=Enabled
aws dynamodb create-table --table-name gistpin-terraform-locks \
--attribute-definitions AttributeName=LockID,AttributeType=S \
--key-schema AttributeName=LockID,KeyType=HASH \
--billing-mode PAY_PER_REQUESTterraform init
terraform plan -var="environment=staging"
terraform apply -var="environment=staging"