Thin wrapper script to use Pulumi with LocalStack
Low maintenance activity. Last release over 2 years ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install pulumi-localPulumi CLI for LocalStack
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.
Installation
You can install the pulumilocal command via pip:
pip install pulumi-local
Prerequisites
Please make sure you have a LocalStack instance running on your local machine.
Usage
The pulumilocal command has the same usage as the pulumi command. For detailed usage,
please refer to the man pages of pulumi -h.
Add environment variables to store state on local backend (optional)
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.
Create a new Pulumi project with stack name lsdev
mkdir myproj
pulumilocal new typescript -y -s lsdev --cwd myproj
Note: --cwd switch is unnecessary if commands are being run in project directory.
Select and create the lsdev Pulumi stack
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
Deploy the stack to LocalStack
pulumilocal up --cwd myproj
How it works
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.