Skip to content

devops-ia/terraform-nexus-script

Repository files navigation

Nexus Script

This module allows you to create Nexus Script as a global resource and individual Nexus Script resources. For individual examples, see the usage snippets and examples.

Provider

You need use a Nexus provider.

provider "nexus" {
  insecure = true
  password = "admin123"
  url      = "https://127.0.0.1:8080"
  username = "admin"
}

Root module usage

nexus-script:

module "nexus_script" {
  source  = "devops-ia/script/nexus/"

  nexus_script = [
    {
      name    = "create-repo-pypi-internal"
      type    = "groovy"
      content = "repository.createPyPiHosted('pypi-internal')"
    }
  ]
}

Individual module usage

nexus-script:

module "nexus_script" {
  source  = "devops-ia/script/nexus//modules/nexus-script"

  name    = "create-repo-pypi-internal"
  type    = "groovy"
  content = "repository.createPyPiHosted('pypi-internal')"
}

Terraform Docs

Requirements

Name Version
terraform >= 1.3.0
nexus >= 2.0.0

Providers

No providers.

Modules

Name Source Version
nexus_script ./modules/nexus-script n/a

Resources

No resources.

Inputs

Name Description Type Default Required
nexus_script value
list(object({
name = string
type = optional(string)
content = string
}))
[] no

Outputs

Name Description
script_name The name of the script.

Authors

Module is maintained by DevOps IA with help from these awesome contributors.