Skip to content

SolarFactories/terraform-provider-dependencytrack

Repository files navigation

Terraform Provider for DependencyTrack

Uses Terraform Plugin Framework as a template from which this is developed.

Requirements

Contents

Developing

  1. Clone the repository
  2. Enter the repository directory
  3. Run git config core.hooksPath .hooks to setup the use of hooks, which are located in .hooks directory.
  4. Run go install within a shell.
  5. Configure provider overrides so that Terraform uses the local installation
    provider_installation {
    	dev_overrides {
    		"registry.terraform.io/solarfactories/dependencytrack" = "$HOME/go/bin"
    	}
    	direct {}
    }
    
  6. Create required resources for Data Resource Tests
    1. Create a Project with name Project_Data_Test and version 1
    2. Create a ProjectProperty on Project_Data_Test with Group1, Name1, Value1, STRING, Description1
    3. Create a ProjectProperty on Project_Data_Test with Group2, Name2, 2, INTEGER, Description2
    4. Create a Tag on Project_Data_Test with name project_data_test_tag

Contributing

Contributions are welcome, either as a PR, or raising an issue to request functionality.

When contributing to resources, or data sources:

  1. Implementation, with appropriate input validation.
  2. Descriptions within the Schemas, listing options if only valid options are permitted.
  3. Examples, to show how to use the new item.

Supported versions

Various resources have minimum DependencyTrack API versions, which are documented within their descriptions. The following versions are tested and supported with any combination from options. Other API versions may work, with a subset of functionality, but are not guaranteed. The latest patch version within a minor release is supported, even if it might not be tested - PR's to update would always be welcome. The list of API Versions will grow as functionality adapts to allow further tests to pass. The latest 2 patches within the latest minor version, at a minimum, will be tested, and supported to allow for continued support while migrating.

  • Terraform: 1.0 -> 1.14
  • DependencyTrack: 4.11.7, 4.12.7, 4.13.0, 4.13.1, 4.13.2, 4.13.3, 4.13.4, 4.13.5, 4.13.6, 4.13.6-alpine.

Troubleshooting

- Fails to fetch version information: EOF

This is likely caused by a TLS issue. The provider requires a minimum TLS version of 1.3. Any certificates used to verify the connection, if not within the System Certificate Trust, can be specified with root_ca option on the provider. If necessary, a local reverse proxy can be configured to accept TLS v1.3, to then forward onto the API server.

- Unable to deserialize a timestamp value into int

This is likely caused by running the provider from a 32-bit system, as Golang's int type varies. Millisecond timestamp values do not fit in 32 bits, after 25 Jan 1970, as such, are only accessible from a 64-bit system.

- Other

Please raise an issue with relevant information, including:

  • Terraform version
  • Provider version
  • API server version
  • A minimal reproducible example
  • Redacted Terraform DEBUG logs

About

Terraform Provider to manage OWASP DependencyTrack

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •