Implements a Coder module for Sonatype Nexus Repository Manager integration that automatically configures Maven, npm, PyPI, and Docker registries for development workspaces.
https://github.com/user-attachments/assets/2c51f229-d34d-483b-a0e9-f4e0d79332c2
settings.xml configuration.npmrc configuration with scoped packagespip.conf configurationYes, this module requires Nexus Repository Manager Pro version for full functionality, though basic features work with the Community Edition (OSS).
This module supports 4 authentication methods:
User Token Authentication (Recommended - Pro only)
nx-usertoken-current privilegeAPI Token Authentication (Pro only)
Basic Authentication (OSS & Pro)
Base64 Encoded Credentials (OSS & Pro)
username:password formatCreate Test Repositories in your Nexus instance:
maven-public, maven-releasesnpm-public, @company:npm-privatepypi-public, pypi-privatedocker-public, docker-privateConfigure Authentication:
Test the Module:
module "nexus" {
source = "registry.coder.com/mavrickrishi/nexus/coder"
version = "1.0.0"
agent_id = coder_agent.main.id
nexus_url = "https://your-nexus-instance.com"
nexus_password = var.nexus_api_token # or password
package_managers = {
maven = ["maven-public", "maven-releases"]
npm = ["npm-public", "@company:npm-private"]
pypi = ["pypi-public", "pypi-private"]
docker = ["docker-public", "docker-private"]
}
}
Verify Configuration:
Tested by deploying on EC2 instance with:
module "nexus" {
source = "registry.coder.com/mavrickrishi/nexus/coder"
version = "1.0.0"
agent_id = coder_agent.main.id
nexus_url = "https://nexus.company.com"
nexus_password = var.nexus_api_token
package_managers = {
maven = ["maven-public", "maven-releases"]
npm = ["npm-public", "@company:npm-private"]
pypi = ["pypi-public", "pypi-private"]
docker = ["docker-public", "docker-private"]
}
}
registry/mavrickrishi/modules/nexus/main.tf - Main module configurationregistry/mavrickrishi/modules/nexus/README.md - Complete documentationregistry/mavrickrishi/modules/nexus/main.test.ts - Test suiteCloses #202 /claim #202
Rishi Mondal
@MAVRICK-1
Coder
@coder