Skip to content

ottramst/terraform-provider-dependencytrack

Repository files navigation

Terraform Provider for OWASP Dependency-Track

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

Features

  • 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.

Requirements

Building The Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the Go install command:
go install

Adding Dependencies

This 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 tidy

Then commit the changes to go.mod and go.sum.

Using the Provider

For usage examples and comprehensive documentation, please refer to the:

Developing the Provider

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.

Running Acceptance Tests

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 testacc

Note: Acceptance tests create real resources in your Dependency-Track instance. Make sure to use a test instance and not a production environment.

About

Terraform provider for OWASP Dependency-Track

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published