diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..7437c211b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,38 @@ +{ + "name": "Pulumi Examples Environment", + "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", + "features": { + "ghcr.io/devcontainers/features/dotnet:2": { + "version": "lts" + }, + "ghcr.io/devcontainers/features/go:1": { + "version": "latest" + }, + "ghcr.io/devcontainers/features/python:1": { + "installTools": true, + "version": "os-provided" + }, + "ghcr.io/devcontainers/features/github-cli:1": { + "installDirectlyFromGitHubRelease": true, + "version": "latest" + }, + "ghcr.io/devcontainers/features/aws-cli:1": { + "version": "latest" + }, + "ghcr.io/devcontainers/features/azure-cli:1": { + "version": "latest", + "bicepVersion": "latest" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "pulumi.pulumi", + "redhat.vscode-yaml", + "github.vscode-pull-request-github" + ] + } + }, + + "postCreateCommand": "./.devcontainer/scripts/post-create.sh" +} diff --git a/.devcontainer/scripts/post-create.sh b/.devcontainer/scripts/post-create.sh new file mode 100755 index 000000000..5943c4d36 --- /dev/null +++ b/.devcontainer/scripts/post-create.sh @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +# Install gcloud CLI (official apt repo) +sudo apt-get update -y +sudo apt-get install -y apt-transport-https ca-certificates gnupg +echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" \ + | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list +curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg \ + | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg +sudo apt-get update -y +sudo apt-get install -y google-cloud-cli + + +curl -fsSL https://get.pulumi.com | sh +echo 'export PATH=$HOME/.pulumi/bin:$PATH' >> ~/.bashrc +echo 'export PATH=$HOME/.pulumi/bin:$PATH' >> ~/.profile +export PATH=$HOME/.pulumi/bin:$PATH +pulumi version