From 24153293a18ae1523e052d2ea743c908cfed5781 Mon Sep 17 00:00:00 2001 From: Cam Date: Thu, 21 Aug 2025 14:09:52 +0000 Subject: [PATCH 1/2] Add devcontainer configuration and post-create script for Pulumi examples --- .devcontainer/devcontainer.json | 38 ++++++++++++++++++++++++++++ .devcontainer/scripts/post-create.sh | 19 ++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100755 .devcontainer/scripts/post-create.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..594620015 --- /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-lsp-client", + "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 From fb74e876558f10b2a0f5c1824e15b4aabb75d961 Mon Sep 17 00:00:00 2001 From: Cam Date: Fri, 22 Aug 2025 19:50:57 +0000 Subject: [PATCH 2/2] Update Pulumi extension in devcontainer configuration --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 594620015..7437c211b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -27,7 +27,7 @@ "customizations": { "vscode": { "extensions": [ - "pulumi.pulumi-lsp-client", + "pulumi.pulumi", "redhat.vscode-yaml", "github.vscode-pull-request-github" ]