From 7f4874659922061b60bda5f22cca1e8a1d726da3 Mon Sep 17 00:00:00 2001 From: TBS093A Date: Thu, 23 Mar 2023 17:54:15 +0100 Subject: [PATCH] add localstack helpfull commands section in README.md --- localstack/README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/localstack/README.md b/localstack/README.md index 58712d1..1bf0443 100644 --- a/localstack/README.md +++ b/localstack/README.md @@ -63,3 +63,53 @@ localstack status services more information on: https://github.com/localstack/localstack +## Helpful commands + +use ```tflocal``` instead ```terraform```: + +```bash +pip install terraform-local +``` + +```tflocal``` takes care of automatically configuring the local service endpoints, which allows you to easily deploy your unmodified Terraform scripts against LocalStack. Otherwise you must declare ```aws``` provider like that: + +```tf +provider "aws" { + access_key = "test" + secret_key = "test" + region = "us-east-1" + s3_use_path_style = false + skip_credentials_validation = true + skip_metadata_api_check = true + skip_requesting_account_id = true + + endpoints { + apigateway = "http://localhost:4566" + apigatewayv2 = "http://localhost:4566" + cloudformation = "http://localhost:4566" + cloudwatch = "http://localhost:4566" + dynamodb = "http://localhost:4566" + ec2 = "http://localhost:4566" + es = "http://localhost:4566" + elasticache = "http://localhost:4566" + firehose = "http://localhost:4566" + iam = "http://localhost:4566" + kinesis = "http://localhost:4566" + lambda = "http://localhost:4566" + rds = "http://localhost:4566" + redshift = "http://localhost:4566" + route53 = "http://localhost:4566" + s3 = "http://s3.localhost.localstack.cloud:4566" + secretsmanager = "http://localhost:4566" + ses = "http://localhost:4566" + sns = "http://localhost:4566" + sqs = "http://localhost:4566" + ssm = "http://localhost:4566" + stepfunctions = "http://localhost:4566" + sts = "http://localhost:4566" + } +} +``` + +more information on: https://docs.localstack.cloud/user-guide/integrations/terraform/ +