From 5f81100d7b3313976bc7fa5f2de9e29ba290ed17 Mon Sep 17 00:00:00 2001 From: Nathanael Liechti Date: Thu, 17 Oct 2024 19:53:12 +0200 Subject: [PATCH] feat: add devcontainer (#446) --- .devcontainer.json | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .devcontainer.json diff --git a/.devcontainer.json b/.devcontainer.json new file mode 100644 index 00000000..f11b1682 --- /dev/null +++ b/.devcontainer.json @@ -0,0 +1,37 @@ +{ + "name": "terraform-provider-argocd", + // officiall MS template from https://github.com/devcontainers/templates/tree/main/src/go + "image": "mcr.microsoft.com/devcontainers/go:1.21-bookworm", + "features": { + // https://github.com/devcontainers/features/tree/main/src/docker-in-docker + "ghcr.io/devcontainers/features/docker-in-docker:2": { + "enableNonRootDocker": "false", + "disableIp6tables": true // experienced issues with missing chains in ip6tables when creating kind clusters + }, + // https://github.com/devcontainers/features/tree/main/src/terraform + "ghcr.io/devcontainers/features/terraform:1": { + "version": "1.9.7" // omit for latest + }, + // https://github.com/mpriscella/features/tree/main/src/kind + "ghcr.io/mpriscella/features/kind:1": { + "version": "v0.20.0" // omit for latest + }, + // https://github.com/devcontainers/features/tree/main/src/kubectl-helm-minikube + "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": { + "version": "1.27.11" + }, + // https://github.com/rio/features/tree/main/src/kustomize + "ghcr.io/rio/features/kustomize:1": {}, + // https://github.com/guiyomh/features/blob/main/src/goreleaser + "ghcr.io/guiyomh/features/goreleaser:0": {}, + // https://github.com/audacioustux/devcontainers/tree/main/src/argo + "ghcr.io/audacioustux/devcontainers/argo:1": { + "argocd": "2.8.13" // omit if empty + } + }, + "forwardPorts": [ + 8080 // the "hard-coded" port for forwarded argo-cd" + ], + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "scripts/testacc_prepare_env.sh" // pre-create the kind cluster with argocd installed +} \ No newline at end of file