This Terraform provider is built using the Terraform Plugin Framework and allows you to manage OWASP Dependency-Track resources.
This provider includes:
- Resources and data sources for managing Dependency-Track entities (
internal/provider/) - Examples (
examples/) and generated documentation (docs/) - Acceptance tests for resources and data sources
- Team Management: Manage teams, team permissions, and team API keys
- User Management: Manage managed users, user permissions, and user team memberships
- Project Management: Manage projects and project ACL mappings
- Policy Management: Manage policies with conditions
- Configuration: Manage Dependency-Track configuration properties
For detailed documentation on all resources and data sources, see the docs/ directory.
- Clone the repository
- Enter the repository directory
- Build the provider using the Go
installcommand:
go installThis provider uses Go modules. Please see the Go documentation for the most up to date information about using Go modules.
To add a new dependency github.com/author/dependency to your Terraform provider:
go get github.com/author/dependency
go mod tidyThen commit the changes to go.mod and go.sum.
For usage examples and comprehensive documentation, please refer to the:
- Provider documentation for configuration details
- Resource documentation for available resources
- Data source documentation for available data sources
- Example configurations for complete working examples
If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).
To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.
To generate or update documentation, run make generate.
In order to run the full suite of acceptance tests, you need to set the following environment variables:
export DEPENDENCYTRACK_ENDPOINT="https://dtrack.example.com"
export DEPENDENCYTRACK_API_KEY="your-api-key-here"Then run the acceptance tests:
make testaccNote: Acceptance tests create real resources in your Dependency-Track instance. Make sure to use a test instance and not a production environment.