This package provides tflocal
- a small wrapper script to run Terraform against LocalStack.
- Python 3.x
pip
terraform
The script uses the Terraform Override mechanism and creates a temporary file localstack_providers_override.tf
to configure the endpoints for the AWS provider
section. The endpoints for all services are configured to point to the LocalStack API (http://localhost:4566
by default).
The tflocal
command line interface can be installed via pip
:
pip install terraform-local
The following environment variables can be configured:
TF_CMD
: Terraform command to call (default:terraform
)LOCALSTACK_HOSTNAME
: host name of the target LocalStack instanceEDGE_PORT
: port number of the target LocalStack instanceS3_HOSTNAME
: special hostname to be used to connect to LocalStack S3 (default:s3.localhost.localstack.cloud
)USE_EXEC
: whether to useos.exec
instead ofsubprocess.Popen
(try using this in case of I/O issues)
The tflocal
command has the same usage as the terraform
command. For detailed usage,
please refer to the man pages of terraform --help
.
- v0.1: Initial release
This software library is released under the Apache License, Version 2.0 (see LICENSE
).