mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-08-22 19:38:35 +00:00
feat(devcontainer): configure provider override in post attach command (#1481)
* feat(devcontainer): update terraform version * refactor(devcontainer): move post attach command to separate script * feat(devcontainer): configure provider override in post attach command --------- Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>
This commit is contained in:
parent
dd6d5ec88f
commit
daaedf2d99
@ -8,12 +8,11 @@
|
|||||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/terraform:1": {
|
"ghcr.io/devcontainers/features/terraform:1": {
|
||||||
"version": "1.7.2"
|
"version": "1.9.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Workaround for https://github.com/orgs/community/discussions/75161
|
"postAttachCommand": ["bash", "./.devcontainer/post-attach.sh"],
|
||||||
"postAttachCommand": "unset GIT_COMMITTER_NAME; unset GIT_COMMITTER_EMAIL;",
|
|
||||||
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
// "forwardPorts": [],
|
// "forwardPorts": [],
|
||||||
|
19
.devcontainer/post-attach.sh
Normal file
19
.devcontainer/post-attach.sh
Normal file
@ -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 <<EOF > ~/.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
|
Loading…
Reference in New Issue
Block a user