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 a09bd1332f
Make syncdeps
2 months ago
..
README.md Add backend testing documentation (#37448) 8 months ago
backend.go chore: move validation to configure 2 years ago
backend_state.go Update `backend.Backend`'s `StateMgr` method to return diagnostics instead of primitive errors (#37496) 8 months ago
backend_test.go Update `backend.Backend`'s `StateMgr` method to return diagnostics instead of primitive errors (#37496) 8 months ago
client.go Update `remote.Client` interface's methods to return diagnostics instead of primitive errors (#37502) 8 months ago
client_test.go Update calls to StateMgr method to use diagnostics more conventionally (#37597) 8 months ago
go.mod Make syncdeps 2 months ago
go.sum Backport: Bump go.opentelemetry.io/otel to v1.40.0 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.