Skip to content

devops-ia/terraform-nexus-privilege

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nexus Privilege

This module allows you to create Nexus Privilege as a global resource and individual Nexus Privilege 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-privilege:

module "nexus_privilege" {
  source  = "devops-ia/privilege/nexus"

 nexus_privilege_application = [
    {
      name        = "example_privilege-app"
      description = "description"
      actions     = ["ADD", "READ", "EDIT", "DELETE"]
      domain      = "domain"
    },
  ]

  nexus_privilege_repository_admin = [
    {
      name        = "example_privilege-admin"
      description = "description"
      actions     = ["ADD", "READ", "DELETE", "BROWSE", "EDIT"]
      repository  = "repository-name"
      format      = "helm"
    },
  ]

  nexus_privilege_repository_content_selector = [
    {
      name             = "example_privilege-selector"
      description      = "description"
      actions          = ["ADD", "READ", "DELETE", "BROWSE", "EDIT"]
      repository       = "repository-name"
      format           = "helm"
      content_selector = "content-selector-name"
    },
  ]

  nexus_privilege_repository_view = [
    {
      name        = "example_privilege-view"
      description = "description"
      actions     = ["ADD", "READ", "DELETE", "BROWSE", "EDIT"]
      repository  = "repository-name"
      format      = "helm"
    },
  ]

  nexus_privilege_script = [
    {
      name        = "example_privilege-script"
      description = "description"
      actions     = ["ADD", "READ", "DELETE", "RUN", "BROWSE", "EDIT"]
      script_name = "script-name"
    },
  ]

  nexus_privilege_wildcard = [
    {
      name        = "example_privilege-wilcard"
      description = "description"
      pattern     = "nexus:*"
    },
  ]
}

Individual module usage

nexus-privilege-application:

module "nexus_privilege_application" {
  source  = "devops-ia/privilege/nexus//modules/nexus-privilege-application"

  name        = "example_privilege"
  description = "description"
  actions     = ["ADD", "READ", "EDIT", "DELETE"]
  domain      = "domain"
}

nexus-privilege-repository-admin:

module "nexus_privilege_repository_admin" {
  source  = "devops-ia/privilege/nexus//modules/nexus-privilege-repository-admin"

  name        = "example_privilege"
  description = "description"
  actions     = ["ADD", "READ", "DELETE", "BROWSE", "EDIT"]
  repository  = "repository-name"
  format      = "helm"
}

nexus-privilege-repository-content-selector:

module "nexus_privilege_repository_content_selector" {
  source  = "devops-ia/privilege/nexus//modules/nexus-privilege-repository-content-selector"

  name             = "example_privilege"
  description      = "description"
  actions          = ["ADD", "READ", "DELETE", "BROWSE", "EDIT"]
  repository       = "repository-name"
  format           = "helm"
  content_selector = "content-selector-name"
}

nexus-privilege-repository-view:

module "nexus_privilege_repository_view" {
  source  = "devops-ia/privilege/nexus//modules/nexus-privilege-repository-view"

  name        = "example_privilege"
  description = "description"
  actions     = ["ADD", "READ", "DELETE", "BROWSE", "EDIT"]
  repository  = "repository-name"
  format      = "helm"
}

nexus-privilege-script:

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

  name        = "example_privilege"
  description = "description"
  actions     = ["ADD", "READ", "DELETE", "RUN", "BROWSE", "EDIT"]
  script_name = "script-name"
}

nexus-privilege-wilcard:

module "nexus_privilege_wildcard" {
  source  = "devops-ia/privilege/nexus//modules/nexus-privilege-wildcard"

  description = "description"
  pattern     = "nexus:*"
}

Terraform Docs

Requirements

Name Version
terraform >= 1.3.0
nexus >= 2.0.0

Providers

No providers.

Modules

Name Source Version
nexus_privilege_application ./modules/nexus-privilege-application n/a
nexus_privilege_repository_admin ./modules/nexus-privilege-repository-admin n/a
nexus_privilege_repository_content_selector ./modules/nexus-privilege-repository-content-selector n/a
nexus_privilege_repository_view ./modules/nexus-privilege-repository-view n/a
nexus_privilege_script ./modules/nexus-privilege-script n/a
nexus_privilege_wildcard ./modules/nexus-privilege-wildcard n/a

Resources

No resources.

Inputs

Name Description Type Default Required
nexus_privilege_application Privilege Application.
list(object({
name = string
description = optional(string)
actions = list(string)
domain = string
}))
[] no
nexus_privilege_repository_admin Privilege Repository Admin.
list(object({
name = string
description = optional(string)
actions = list(string)
repository = string
format = string
}))
[] no
nexus_privilege_repository_content_selector Privilege Repository Content Selector.
list(object({
name = string
description = string
actions = list(string)
repository = string
format = string
content_selector = string
}))
[] no
nexus_privilege_repository_view Privilege Repository View.
list(object({
name = string
description = optional(string)
actions = list(string)
repository = string
format = string
}))
[] no
nexus_privilege_script Privilege Script.
list(object({
name = string
description = optional(string)
actions = list(string)
script_name = string
}))
[] no
nexus_privilege_wildcard Privilege Repository Wilcard.
list(object({
name = string
description = optional(string)
pattern = optional(string)
}))
[] no

Outputs

Name Description
privilege_application_name The name of the privilege application.
privilege_repository_admin_name The name of the privilege repository admin.
privilege_repository_content_selector_name The name of the privilege repository content selector.
privilege_repository_view_name The name of the privilege repository view.
privilege_repository_wildcard_name The name of the privilege wildcard.
privilege_script_name The name of the privilege script.

Authors

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