This is a Github Template Repository which provides a Pulumi Devcontainer together with GitOps ready boilerplate for quickly starting new Pulumi IaC projects.
The Pulumi Devcontainer is designed with deep VS Code and Github Codespaces integration to streamline a common Pulumi IaC and Provider development environment. dependencies and prerequisites as much as possible using Dev Containers to prepare your development environment, or even just run your development directly in the browser with Github CodeSpaces.
With multiple ways to get started, it is a good idea to briefly review:
Codespaces is the easiest way to get started quickly. Simply click the button above to open this repository in a new Codespace and then follow the First time setup instructions below.
- Pulumi Login
pulumi login
- Create a new stack
pulumi new
pulumi stack init
To use the Dev Container in VS Code, you will need to install the Remote - Containers extension, and follow the official tutorial here to begin.
The pulumi Dev Container repository can be added as a submodule to an existing project to provide an easy and consistent development environment that is maintained upstream.
To add this repository as a submodule to your project, run the following commands:
git submodule add https://github.com/pulumi/devcontainer .github/devcontainer
git submodule update --init .github/devcontainer
mkdir -p .devcontainer
rsync -av .github/devcontainer/.devcontainer/* .devcontainer/
To update the devcontainer submodule in consuming repos:
git submodule update --remote --merge .github/devcontainer
rsync -av .github/devcontainer/devcontainer/* .devcontainer
After the submodule is added, you can open your project in VS Code and it will automatically detect the Dev Container configuration and prompt you to open the project in a container, or you can open the project in Github CodeSpaces.
# remove submodule
git submodule deinit -f .github/devcontainer
rm -rf .git/modules/.github/devcontainer
git rm -f .github/devcontainer
git commit -m 'Remove devcontainer submodule'