This Terraform provider for the Password Manager Passwork can manage objects like passwords, vaults and folders.
The provider is compatible with Passwork API version 4.0.0
- Terraform 1.x
- Go 1.21 (for development)
If you want to develop the provider, the following steps can be done to set up a local development environment.
- Clone the repository
git clone [email protected]:lupa95/terraform-provider-passwork
- Make changes and compile the provider:
go install
- Create the file
~/.terraform.rc
and point to the local sources (GOPATH):
provider_installation {
dev_overrides {
"registry.terraform.io/lupa95/passwork" = "[insert GOPATH]/bin"
}
direct {}
}
Running tests requires access to a Passwork instance.
- Setup Provider configuration:
export PASSWORK_API_KEY=<replace-with-api-key>
export PASSWORK_HOST=https://my-passwork-instance.com
export PASSWORK_VAULT_ID=<replace with ID of existing vault> # Required for data source testing
- Run tests:
# Run all tests
TF_ACC=1 go test -v
# Run tests for specific resource, e.g. password resource only:
TF_ACC=1 go test -v -run TestPasswordResource