You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/internal/backend/remote-state/kubernetes
Daniel Banck a39e3bce32
make syncdeps
2 months ago
..
README.md Add backend testing documentation (#37448) 8 months ago
backend.go make copyrightfix 2 months ago
backend_state.go make copyrightfix 2 months ago
backend_test.go make copyrightfix 2 months ago
client.go make copyrightfix 2 months ago
client_test.go make copyrightfix 2 months ago
go.mod make syncdeps 2 months ago
go.sum make syncdeps 2 months ago

README.md

How to test the kubernetes backend

Create a Kubernetes cluster

  1. Install kind, e.g install kind via Homebrew
  2. Provision a new cluster with the command kind create cluster --name=terraform
    • You can check for the cluster using kind get clusters

Set up environment variables for testing

Creating the cluster in the steps above should have created and/or added an entry into the ~/.kube/config configuration file.

Create the KUBE_CONFIG_PATH environment variable to help the backend locate that file:

export KUBE_CONFIG_PATH=~/.kube/config

Run the tests!

The setup above should be sufficient for running the tests. Make sure your kind cluster exists and is running whenever you run the tests.