Example repo on exploring the use of Terraform with LocalStack
brew install tflint
tflint -v
# To install the AWS tflint plugin specified in the .tflint.hcl file
tflint --init
brew install tfsec
tfsec -v
python3 -m pip install --user localstack
Configure AWS test environment variables and add the --endpoint-url=<localstack_url> flag to your aws CLI invocations. For example:
export AWS_ACCESS_KEY_ID="test"
export AWS_SECRET_ACCESS_KEY="test"
export AWS_DEFAULT_REGION="ap-southeast-1"
aws --endpoint-url=http://localhost:4566 <aws_service> <aws_service_action>
Start LocalStack in detached mode (-d)
localstack start -d