Package: opentofu-local
tflocal- OpenTofu with LocalStackThis package providestflocal- a small wrapper script to runOpenTofuagainstLocalStack.PrerequisitesPython 3.xpipOpenTofuHow it worksThe script uses theTerraform Override mechanismand creates a temporary filelocalstack_providers_override.tfto configure the endpoints for the AWSprovidersection. The endpoints for all services are configured to point to the LocalStack API (http://localhost:4566by default).InstallationThetflocalcommand line interface can be installed viapip:pip install opentofu-localConfigurationsThe following environment variables can be configured:TF_CMD: OpenTofu command to call (default:tofu)AWS_ENDPOINT_URL: hostname and port of the target LocalStack instanceLOCALSTACK_HOSTNAME:(Deprecated)host name of the target LocalStack instanceEDGE_PORT:(Deprecated)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.execinstead ofsubprocess.Popen(try using this in case of I/O issues)<SERVICE>_ENDPOINT: setting a custom service endpoint, e.g.,COGNITO_IDP_ENDPOINT=http://example.comAWS_DEFAULT_REGION: the AWS region to use (default:us-east-1, or determined from local credentials ifboto3is 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_IDenvironment variable is setaccess_keyis set in the Terraform AWS providerAWS_PROFILEenvironment variable is set and configuredAWS_DEFAULT_PROFILEenvironment variable is set and configureddefaultprofile's credentials are configuredfalls back to the defaultAWS_ACCESS_KEY_IDmock valueAWS_ACCESS_KEY_ID: AWS Access Key ID to use for multi account setups (default:test-> account ID:000000000000)UsageThetflocalcommand has the same usage as thetofucommand. For detailed usage,
please refer to the man pages oftofu --help.Change Logv0.16.1: Update Setuptools to exclude tests during packagingv0.16.0: Introducing semantic versioning and AWS_ENDPOINT_URL variablev0.15: Update endpoint overrides for Terraform AWS provider 5.22.0v0.14: Add support to multi-account environmentsv0.13: Fix S3 automaticuse_s3_path_styledetection when setting S3_HOSTNAME or LOCALSTACK_HOSTNAMEv0.12: Fix local endpoint overrides for Terraform AWS provider 5.9.0; fix parsing of alias and region defined as value listsv0.11: Minor fix to handle boolean values in S3 backend configsv0.10: Add support for storing state files in local S3 backendsv0.9: Fix unsupported provider override for emrserverlessv0.8: Configure the endpoint for opensearch servicev0.7: Add initial support for provider aliasesv0.6: Fix selection of default regionv0.5: Make AWS region configurable, addregionto provider configv0.4: Fix using use_s3_path_style for S3_HOSTNAME=localhost; excludemeteringmarketplaceservice endpointv0.3: Fix support for -chdir=... to create providers file in target directoryv0.2: Add ability to specify custom endpoints; pass INT signals to subprocessv0.1: Initial releaseLicenseThis software library is released under the Apache License, Version 2.0 (seeLICENSE).