325 sao GitHub và vẫn tăng — localstack/terraform-local là dự án Python mà TopGit đang theo dõi trên nền tảng. Terraform CLI wrapper to deploy your Terraform applications directly to LocalStack
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
[!WARNING]
tflocal is deprecated. Use lstk terraform instead.
tflocal no longer receives updates.
Get started with lstk, the new LocalStack CLI: docs.localstack.cloud/.../lstk
Switch your scripts and CI workflows to lstk terraform: docs.localstack.cloud/.../lstk/migration
This package provides tflocal - a small wrapper script to run Terraform against LocalStack.
Prerequisites
Python 3.x
pip or pipx
terraform
How it works
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).
Installation
The recommended way to install tflocal is using pipx, which installs Python CLI tools in their own isolated environments. This avoids conflicts with system packages and the externally-managed-environment error (PEP 668) seen on modern Linux distributions.
1) Recommended: Using pipx
First, ensure pipx is installed.
On Debian/Ubuntu:
sudo apt install pipx
Or, using pip (for other systems):
pip install --user pipx
Then, run pipx ensurepath to add pipx's binaries to your system's PATH. You may need to restart your shell for this to take effect.
Install tflocal with pipx:
pipx install terraform-local
To upgrade tflocal in the future, run: pipx upgrade terraform-local.
2) Alternative: Using a Virtual Environment
If you prefer not to use pipx, you can install tflocal into a standard Python virtual environment (venv):
Bash
Create a virtual environment (e.g., in your project directory)
python3 -m venv .venv
Activate it
source .venv/bin/activate
Install the package
pip install terraform-local
Note: You must activate this venv (source .venv/bin/activate) every time you want to use the tflocal command.
Configurations
The following environment variables can be configured:
DRY_RUN: Generate the override file without invoking Terraform
TF_CMD: Terraform command to call (default: terraform)
AWS_ENDPOINT_URL: hostname and port of the target LocalStack instance
LOCALSTACK_HOSTNAME: (Deprecated) host name of the target LocalStack instance
EDGE_PORT: (Deprecated) port number of the target LocalStack instance
S3_HOSTNAME: special hostname to be used to connect to LocalStack S3 (default: s3.localhost.localstack.cloud)
USE_EXEC: whether to use os.exec instead of subprocess.Popen (try using this in case of I/O issues)
<SERVICE>_ENDPOINT: setting a custom service endpoint, e.g., COGNITO_IDP_ENDPOINT=http://example.com
AWS_DEFAULT_REGION: the AWS region to use (default: us-east-1, or determined from local credentials if boto3 is installed)
CUSTOMIZE_ACCESS_KEY: enables to override the static AWS Access Key ID. The following cases are taking precedence over each other from top to bottom:
AWS_ACCESS_KEY_ID environment variable is set
access_key is set in the Terraform AWS provider
AWS_PROFILE environment variable is set and configured
AWS_DEFAULT_PROFILE environment variable is set and configured
default profile's credentials are configured
falls back to the default AWS_ACCESS_KEY_ID mock value
AWS_ACCESS_KEY_ID: AWS Access Key ID to use for multi account setups (default: test -> account ID: 000000000000)
SKIP_ALIASES: Allows to skip generating AWS provider overrides for specified aliased providers, e.g. SKIP_ALIASES=aws_secrets,real_aws
ADDITIONAL_TF_OVERRIDE_LOCATIONS: Comma-separated list of folder paths that will also receive a temporary localstack_providers_override.tf file
DISABLE_DEPRECATION_NOTICE: set to 1 to hide the deprecation notice
Usage
The tflocal command has the same usage as the terraform command. For detailed usage,
please refer to the man pages of terraform --help.
Validation errors when using local terraform modules
Note that if your project uses local terraform modules, and those modules reference providers, those folders also need to receive a temporary localstack_providers_override.tf file. Without it, you would get an error that looks like this when starting to process code from inside the module
╷
│ Error: No valid credential sources found
│
│ with module.lambda.provider["registry.terraform.io/hashicorp/aws"],
│ on ../../providers.tf line 11, in provider "aws":
│ 11: provider "aws" {
│
│ Please see https://registry.terraform.io/providers/hashicorp/aws
│ for more information about providing credentials.
│
│ Error: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, access disabled to EC2 IMDS via client option, or "AWS_EC2_METADATA_DISABLED" environment variable
To address this issue, you may include a comma-separated list of folder paths that will recieve additional override files via an environment variable
ADDITIONAL_TF_OVERRIDE_LOCATIONS=/path/to/module1,path/to/module2 tflocal plan
See this issue for more discussion
Change Log
v0.27.0: Print a deprecation notice that points to lstk terraform
v0.26.0: Fix compatibility with python-hcl2 v8+ by using SerializationOptions to handle quoted dict keys, block metadata, and comments
v0.25.0: Improve s3control local endpoint override and respect AWS_ENDPOINT_URL configuration for mwaa
v0.24.1: Exclude broken python-hcl2 version from requirements
v0.24.0: Add support to return terraform-local version when calling tflocal -version and fix AWS provider detection
v0.23.1: Fix endpoint overrides for Terraform AWS provider >= 6.0.0-beta2
v0.23.0: Add support for terraform_remote_state with s3 backend to read the state stored in local S3 backend; fix S3 backend config detection with multiple Terraform blocks
v0.22.0: Fix S3 backend forcing DynamoDB State Lock to be enabled by default
v0.21.0: Add ability to drop an override file in additional locations
localstack/terraform-local có 325 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/localstack/terraform-local. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
localstack/terraform-local có những chủ đề gì?
GitHub topics của localstack/terraform-local: "localstack", "terraform". TopGit xếp repo vào nhóm Developer Tools.
localstack/terraform-local còn đang phát triển không?
Commit gần nhất trên localstack/terraform-local là 1 tháng trước (theo timestamp GitHub). Repo có 43 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
localstack/terraform-local là gì?
localstack/terraform-local (localstack/terraform-local) là dự án Python trên GitHub. Theo mô tả gốc: Terraform CLI wrapper to deploy your Terraform applications directly to LocalStack
localstack/terraform-local so với các dự án Developer Tools khác thế nào?
localstack/terraform-local được TopGit xếp vào nhóm Developer Tools, với 325 sao GitHub và viết bằng Python. Xem trang chủ đề Developer Tools trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
localstack/terraform-local viết bằng ngôn ngữ gì?
localstack/terraform-local chủ yếu viết bằng Python. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Vì sao localstack/terraform-local được xếp vào nhóm Developer Tools?
TopGit xếp localstack/terraform-local vào nhóm Developer Tools dựa trên GitHub topics và mô tả của repo (gắn thẻ: "localstack", "terraform"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
Đọc đầy đủ README ở tab phía trên.
terraform-local có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về terraform-local.