This repository contains Terraform code and Go-based tests for deploying and verifying an Azure Kubernetes Service cluster. The following conventions apply when modifying code here.
These instructions apply to the entire repository.
- Run
terraform fmt -recursivewhenever Terraform files (*.tf) are changed. - Run
go fmt ./...if Go source files undertest/are modified.
- After initializing Terraform (
terraform init), runterraform validatefor Terraform code changes. - Always execute
terraform planto ensure the configuration produces a valid plan. Saving the plan output withterraform plan -out=plan.outis recommended. - For Go code, run
golangci-lint runorgo vet ./...when available.
- Unit tests are located in
test/unit. Rungo test ./test/unit/.... - Integration tests in
test/integrationrequire Azure credentials and may incur cost. Run them only when necessary withRUN_INTEGRATION_TESTS=true go test ./test/integration/.... - When files under the
test/directory change, executego test ./...and ensuregolangci-lint runandgo fmt ./...pass.
- Code changes (Terraform or Go) require running the format, lint, and test steps above before committing.
- For Terraform changes, include
terraform planas part of the workflow to verify the execution plan. - Documentation or comment-only changes may skip tests and linting.