diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 60991a6f..fc68151f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -8,12 +8,11 @@ // Features to add to the dev container. More info: https://containers.dev/features. "features": { "ghcr.io/devcontainers/features/terraform:1": { - "version": "1.7.2" + "version": "1.9.4" } }, - // Workaround for https://github.com/orgs/community/discussions/75161 - "postAttachCommand": "unset GIT_COMMITTER_NAME; unset GIT_COMMITTER_EMAIL;", + "postAttachCommand": ["bash", "./.devcontainer/post-attach.sh"], // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [], diff --git a/.devcontainer/post-attach.sh b/.devcontainer/post-attach.sh new file mode 100644 index 00000000..7564b7fc --- /dev/null +++ b/.devcontainer/post-attach.sh @@ -0,0 +1,19 @@ +#!/usr/bin/bash + +# Workaround for https://github.com/orgs/community/discussions/75161 +unset GIT_COMMITTER_NAME +unset GIT_COMMITTER_EMAIL + +cat < ~/.terraformrc +provider_installation { + + dev_overrides { + "bpg/proxmox" = "${GOPATH}/bin/" + } + + # For all other providers, install them directly from their origin provider + # registries as normal. If you omit this, Terraform will _only_ use + # the dev_overrides block, and so no other providers will be available. + direct {} +} +EOF