{"id":18990910,"url":"https://github.com/datadrivers/terraform-provider-nexus","last_synced_at":"2025-04-04T09:06:29.814Z","repository":{"id":36958860,"uuid":"233050716","full_name":"datadrivers/terraform-provider-nexus","owner":"datadrivers","description":"Terraform provider for Sonatype Nexus","archived":false,"fork":false,"pushed_at":"2025-03-18T00:22:26.000Z","size":1949,"stargazers_count":127,"open_issues_count":38,"forks_count":55,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-03-28T08:06:02.897Z","etag":null,"topics":["automation","cicd","go","golang","nexus","sonatype","sonatype-nexus","terraform","terraform-provider"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/providers/datadrivers/nexus","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datadrivers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-10T13:17:24.000Z","updated_at":"2025-03-13T16:06:52.000Z","dependencies_parsed_at":"2023-10-10T16:56:10.636Z","dependency_job_id":"2c0bc422-4d0b-4f02-b756-1889d5f152f8","html_url":"https://github.com/datadrivers/terraform-provider-nexus","commit_stats":null,"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadrivers%2Fterraform-provider-nexus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadrivers%2Fterraform-provider-nexus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadrivers%2Fterraform-provider-nexus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadrivers%2Fterraform-provider-nexus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datadrivers","download_url":"https://codeload.github.com/datadrivers/terraform-provider-nexus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149500,"owners_count":20891954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","cicd","go","golang","nexus","sonatype","sonatype-nexus","terraform","terraform-provider"],"created_at":"2024-11-08T17:12:06.228Z","updated_at":"2025-04-04T09:06:29.787Z","avatar_url":"https://github.com/datadrivers.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform provider Nexus\n\n![codeql workflow](https://github.com/datadrivers/terraform-provider-nexus/actions/workflows/codeql-analysis.yml/badge.svg)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)\n[![Go Report Card](https://goreportcard.com/badge/github.com/datadrivers/terraform-provider-nexus)](https://goreportcard.com/report/github.com/datadrivers/terraform-provider-nexus)\n\n- [Terraform provider Nexus](#terraform-provider-nexus)\n  - [Introduction](#introduction)\n  - [Usage](#usage)\n    - [Provider config](#provider-config)\n  - [Development](#development)\n    - [Build](#build)\n    - [Testing](#testing)\n      - [To debug tests](#to-debug-tests)\n    - [Create documentation](#create-documentation)\n  - [Author](#author)\n\n## Introduction\n\nTerraform provider to configure Sonatype Nexus using its API.\n\nImplemented and tested with Sonatype Nexus `3.72.0` with `java17` and DB `H2`.\n\n## Usage\n\n### Provider config\n\n```hcl\nprovider \"nexus\" {\n  insecure         = true\n  password         = \"admin123\"\n  url              = \"https://127.0.0.1:8080\"\n  username         = \"admin\"\n}\n```\n\nOptionally with mTLS if Nexus is deployed behind a reverse proxy:\n\n```hcl\nprovider \"nexus\" {\n  insecure         = true\n  password         = \"admin123\"\n  url              = \"https://127.0.0.1:8080\"\n  username         = \"admin\"\n  client_cert_path = \"/path/to/client.crt\"\n  client_key_path  = \"/path/to/client.key\"\n  root_ca_path     = \"/path/to/root_ca.crt\"\n}\n```\n\nNote that the `root_ca_path` should contain ALL certificates required for\ncommunication. It overrides the system CA store, rather than adding to it.\n\nYou can point the `root_ca_path` to the system trust store if required, e.g.:\n\n`root_ca_path = \"/etc/ssl/certs/ca-certificates.crt\"`\n\n## Development\n\n### Build\n\nThere is a [makefile](./GNUmakefile) to build the provider and place it in repos root dir.\n\n```sh\nmake\n```\n\nTo use the local build version you need tell terraform where to look for it via a terraform config override.\n\nCreate `dev.tfrc` in your terraform code folder (f.e. in [dev.tfrc](./examples/local-development/dev.tfrc)):\n\n```hcl\n# dev.tfrc\nprovider_installation {\n\n  # Use /home/developer/tmp/terraform-nexus as an overridden package directory\n  # for the datadrivers/nexus provider. This disables the version and checksum\n  # verifications for this provider and forces Terraform to look for the\n  # nexus provider plugin in the given directory.\n  # relative path also works, but no variable or ~ evaluation\n  dev_overrides {\n    \"datadrivers/nexus\" = \"../../\"\n  }\n\n  # For all other providers, install them directly from their origin provider\n  # registries as normal. If you omit this, Terraform will _only_ use\n  # the dev_overrides block, and so no other providers will be available.\n  direct {}\n}\n```\n\nTell your shell environment to use override file:\n\n```bash\nexport TF_CLI_CONFIG_FILE=dev.tfrc\n```\n\nNow run your terraform commands (`plan` or `apply`), `init` is ***not*** required.\n\n```bash\n# start local nexus\nmake start-services\n# run local terraform code\ncd examples/local-development\nterraform plan\nterraform apply\n```\n\n### Testing\n\n**NOTE**: For testing Nexus Pro features, place the `license.lic` in `scripts/`.\n\nFor testing start a local Docker containers using make\n\n```shell\nmake start-services\n```\n\nThis will start a Docker and MinIO containers and expose ports 8081 and 9000.\n\nNow start the tests\n\n```shell\nmake testacc\n```\n\nor skipped tests:\n\n```shell\nSKIP_S3_TESTS=true make testacc\nSKIP_AZURE_TESTS=true make testacc\nSKIP_PRO_TESTS=true make testacc\n```\n\n#### To debug tests\n\nSet env variable `TF_LOG=DEBUG` to see additional output.\n\nUse `printState()` function to discover terraform state (and resource props) during test.\n\nDebug configurations are also available for VS Code.\n\n### Create documentation\n\nWhen creating or updating resources/data resources please make sure to update the examples in the respective folder (`./examples/resources/\u003cname\u003e` for resources, `./examples/data-sources/\u003cname\u003e` for data sources)\n\nNext you can use the following command to generate the terraform documentation from go files\n\n```shell\nmake docs\n```\n\n## Author\n\n[Datadrivers GmbH](https://www.datadrivers.de)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadrivers%2Fterraform-provider-nexus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatadrivers%2Fterraform-provider-nexus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadrivers%2Fterraform-provider-nexus/lists"}