This is the repository for the meshStack Terraform Provider, which allows one to use Terraform with meshStack by meshcloud. Learn more about meshcloud at https://www.meshcloud.io. This provider is officially registered and documented under terraform registry.
For general information about Terraform, visit the official website.
Please submit support questions via email to support@meshcloud.io. Support questions submitted under the Issues section of this repo will be handled on a "best effort" basis.
Feature requests can be submitted at canny.io.
To use the provider locally during development place the following in ~/.terraformrc:
provider_installation {
dev_overrides {
"meshcloud/meshstack" = "<GOBIN>",
"registry.terraform.io/meshcloud/meshstack" = "<GOBIN>"
}
# 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 {}
}
Replace <GOBIN> with the output of go env GOBIN or go env GOPATH + /bin.
Run go install to update your local provider installation.
If everything is working correctly Terraform will show a warning that dev overrides are being used.
Note: task is also available via nix, for example
nix develop --command task testaccDebugging can be enabled by setting TF_LOG=DEBUG or TF_ACC_LOG=DEBUG (when running tests),
which shows all full HTTP request and response communication.
This project uses Task for common development workflows.
The available tasks can be found in Taskfile.yml.
Acceptance tests run against a real meshStack API and require environment variables to be configured in a .env file:
# Run all acceptance tests
task testacc
# Run specific acceptance test(s) by name pattern
task testacc -- -run=BuildingBlockDefinition
# Run multiple specific tests
task testacc -- -run=BuildingBlock|Workspace# Run unit tests only (excludes acceptance tests)
task test
# Run specific unit test(s)
task test -- -run=TestValidation# Build the provider
task build
# Install provider locally
task install
# Run linter (also checks formatting)
task lint
# Fix formatting and linting issues
task lint -- --fix
# Generate documentation
task generate
# Clean build artifacts
task cleanThis project uses golangci-lint with the gci formatter to enforce consistent import ordering:
- Go standard library imports
- External dependencies (third-party packages)
- Local modules (this repository's packages)
Each section is separated by a blank line. To format your code, run:
task lint -- --fix