DISCLAIMER: pulumi-local currently does not support the aws-native package. (pulumi/pulumi-aws-native #108)
This package provides the pulumilocal
command, which is a thin wrapper around the pulumi
command line interface to use Pulumi
with LocalStack.
You can install the pulumilocal
command via pip
:
pip install pulumi-local
Please make sure you have a LocalStack instance running on your local machine.
The pulumilocal
command has the same usage as the pulumi
command. For detailed usage,
please refer to the man pages of pulumi -h
.
export PULUMI_CONFIG_PASSPHRASE=lsdevtest
export PULUMI_BACKEND_URL=file://`pwd`/myproj
Note: For further options please consult the official documentation on available environment variables and local backend.
mkdir myproj
pulumilocal new typescript -y -s lsdev --cwd myproj
Note: --cwd
switch is unnecessary if commands are being run in project directory.
This is unnecessary if you just did the new typescript
command above as it will already be selected.
pulumilocal stack select -c lsdev --cwd myproj
pulumilocal up --cwd myproj
When running any pulumi deployment command like pulumilocal ["up", "destroy", "preview", "cancel"]
,
the wrapper script runs the pulumi config
command to augment the pulumi config with LocalStack AWS configuration,
and then runs the original pulumi command.
You can configure the following environment variables:
AWS_ENDPOINT_URL
: hostname and port of the target LocalStack instanceLOCALSTACK_HOSTNAME
: (Deprecated) Target host to use for connecting to LocalStack (default:localhost
)EDGE_PORT
: (Deprecated) Target port to use for connecting to LocalStack (default:4566
)PULUMI_CMD
: Name of the executable Pulumi command on the system PATH (default:pulumi
)
Use your preferred Pulumi backend. https://www.pulumi.com/docs/concepts/state/#deciding-on-a-state-backend
Change the pulumilocal
command in the instructions above to pulumi
.
- v1.2.2: Fix project URL in package metadata
- v1.2.1: Add support for AWS_ENDPOINT_URL env variable
- v1.2.0: Added dynamic endpoint generation and tests
- v1.1: Added README to long description and update twine publish.
- v1.0: Using
pulumi config set-all
to set all the AWS provider configurating instead of modifying the Stack file directly. Removed defaulting the stack name tolocalstack
. Added argparse. Removed pyyaml dependency. Removed python2 package classifiers. - v0.6: Replace deprecated
s3ForcePathStyle
withs3UsePathStyle
in default config - v0.5: Remove deprecated
mobileanalytics
service config to fix invalid key error - v0.4: Point pulumilocal.bat to the correct script
- v0.3: Add apigatewayv2 service endpoint
- v0.2: Add init command and add aws:region key by default
- v0.1: Initial release
This software library is released under the Apache License, Version 2.0 (see LICENSE
).