Azure DevOps Naming Module

November 30, 2024 · View on GitHub

terraform-azuredevops-naming

rm Standard Terraform Module Pull Request

Create New Release

Nightly Maintenance Scan of Full Codebase

made%20with-Markdown made%20with-MegaLinter made%20with-PowerShell made%20with-pre-commit made%20with-terraform

these are the pre-commit hooks used for this repo:

GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer) GitHub release (latest SemVer)

Table of Contents

About The Project

A terraform module to enable consistent naming of Azure DevOps resources


(Back to the Table of Contents)


Built With


(Back to the Table of Contents)


Terraform

The below documentation was generated via Terraform docs using pre-commit


(Back to the Table of Contents)


Requirements

NameVersion
terraform>= 1.10.0, <2.0.0
random>= 3.6.0, <4.0.0

(Back to the Table of Contents)


Consuming terraform-azuredevops-naming

To consume this module add the following to your module.tf:

  module "azdo_naming" {
    	 source  = "DownAtTheBottomOfTheMoleHole/naming/azuredevops"
    	 version  = "~>2.2.0"
    
	 # Optional variables
    	 environment_tags  = [
  "dev",
  "uat",
  "prd"
]
    	 prefix  = []
    	 suffix  = []
    	 unique_include_numbers  = true
    	 unique_length  = 4
    	 unique_seed  = ""
    	 work_items  = []
  }

Creating a project

module "azdo_naming" {
  source  = "DownAtTheBottomOfTheMoleHole/naming/azuredevops"
  version = ">= 6.0.0, <7.0.0"

  # Optional variables
  environment_tags = [
    "dev",
    "uat",
    "prd"
  ]
  prefix                 = ["dbmh"]
  suffix                 = ["test"]
  unique_include_numbers = true
  unique_length          = 4
  unique_seed            = ""
  work_items             = []
}

resource "azuredevops_project" "example_1" {
  name               = module.azdo_naming.project.name
  visibility         = "private"
  version_control    = "Git"
  work_item_template = "Agile"
  description        = "Managed by Terraform"
  features = {
    "testplans" = "disabled"
    "artifacts" = "disabled"
  }
}

(Back to the Top)


Creating a unique branch name

this shows creating:

  • a project
  • git repository inside the project
  • a feature branch based on the default branch with a unique name
module "azdo_naming" {
  source  = "DownAtTheBottomOfTheMoleHole/naming/azuredevops"
  version = ">=6.0.0, <7.0.0"

  # Optional variables
  environment_tags = [
    "dev",
    "uat",
    "prd"
  ]
  prefix                 = ["dbmh"]
  suffix                 = ["test"]
  unique_include_numbers = true
  unique_length          = 4
  unique_seed            = ""
  work_items             = []
}

resource "azuredevops_project" "example_2" {
  name               = module.azdo_naming.project.name
  visibility         = "private"
  version_control    = "Git"
  work_item_template = "Agile"
}

resource "azuredevops_git_repository" "example_2" {
  project_id = azuredevops_project.example.id
  name       = module.azdo_naming.git_repository.name
  initialization {
    init_type = "Clean"
  }
}

resource "azuredevops_git_repository_branch" "feature_branch" {
  repository_id = azuredevops_git_repository.example.id
  name          = module.azdo_naming.git_repository_feature_branch_slash.name_unique
  ref_branch    = azuredevops_git_repository.example.default_branch
}


(Back to the Table of Contents)


Resources

NameType
random_string.first_letterresource
random_string.mainresource

(Back to the Table of Contents)


Inputs

NameDescriptionTypeDefaultRequired
environment_tagsList of environment names in their shortened form. These will be translated to full names in the module.list(string)
[
"dev",
"uat",
"prd"
]
no
prefixPrefix to be used for naming resources. If used we suggest using a company abreviation e.g dbmh.list(string)[]no
suffixSuffix to be used for naming resources. It is recommended to use lowercase characters for consistency.list(string)[]no
unique_include_numbersDetermines whether numbers should be included in the unique suffix generation.booltrueno
unique_lengthMaximum length of the unique suffix to be added to resource names.number4no
unique_seedCustom seed value for generating unique random characters.string""no
work_itemsList of Work Items or issue numbers to be used in branch name and environment name creation. For example, ['1234', '1235'] will create branch names like 'feature/1234-' and 'feature/1235-'.list(string)[]no

(Back to the Table of Contents)


Outputs

NameDescriptionValueSensitive
agent_poolThe agent pool used in Azure DevOps
{
"dashes": true,
"max_length": 64,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^\u003c,\u003e,%,\u0026,,:,\,?,/,*,
,",#,,+,.,],+,.,']*",
"scope": "Organization",
"slug": "agtpol"
}
branch_policy_build_validationThe display name of the branch policy for build validation in Azure DevOps
{
"dashes": true,
"max_length": 256,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/:\~\u0026%;@'"?\u003c\u003e
#*}{,+=\\[\\]]*",
"scope": "repository",
"slug": "bpbv"
}
build_definitionThe build definition in Azure DevOps
{
"dashes": true,
"max_length": 260,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
]*$",
"scope": "Project",
"slug": "blddef"
}
build_folderThe folder containing the build files in Azure DevOps
{
"dashes": true,
"max_length": 260,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
]*$",
"scope": "Organization",
"slug": "arpth"
}
elastic_poolThe elastic pool used in Azure DevOps
{
"dashes": true,
"max_length": 64,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^\u003c,\u003e,%,\u0026,,:,\,?,/,*,
,",#,,,+,.,],+,.,']*",
"scope": "Organization",
"slug": "eapool"
}
environmentThe name of the environment in Azure DevOps
{
"development": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "dbmh-development-apply-adonaming",
"name_unique": "dbmh-development-apply-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
]$",
"scope": "Project",
"slug": "envapp"
},
"production": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "dbmh-production-apply-adonaming",
"name_unique": "dbmh-production-apply-adonaming-h6lf",
"regex": "^[^/\:
?"\u003c\u003e
environment_applyThe name of the environment where apply operations are performed in Azure DevOps
{
"development": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "dbmh-development-apply-adonaming",
"name_unique": "dbmh-development-apply-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
]$",
"scope": "Project",
"slug": "envapp"
},
"production": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "dbmh-production-apply-adonaming",
"name_unique": "dbmh-production-apply-adonaming-h6lf",
"regex": "^[^/\:
?"\u003c\u003e
environment_apply_basicThe basic name of the environment where apply operations are performed in Azure DevOps
{
"development": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "development-apply",
"name_unique": "development-apply-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
]$",
"scope": "Project",
"slug": "envappb"
},
"production": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "production-apply",
"name_unique": "production-apply-adonaming-h6lf",
"regex": "^[^/\:
?"\u003c\u003e
environment_basicThe basic name of the environment in Azure DevOps
{
"development": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "development",
"name_unique": "development-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
]$",
"scope": "Project",
"slug": "envbas"
},
"production": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "production",
"name_unique": "production-adonaming-h6lf",
"regex": "^[^/\:
?"\u003c\u003e
environment_planThe name of the environment where plan operations are performed in Azure DevOps
{
"development": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "dbmh-development-plan-adonaming",
"name_unique": "dbmh-development-plan-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
]$",
"scope": "Project",
"slug": "envpln"
},
"production": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "dbmh-production-plan-adonaming",
"name_unique": "dbmh-production-plan-adonaming-h6lf",
"regex": "^[^/\:
?"\u003c\u003e
environment_plan_basicThe basic name of the environment where plan operations are performed in Azure DevOps
{
"development": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "development-plan",
"name_unique": "development-plan-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
]$",
"scope": "Project",
"slug": "envplnb"
},
"production": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "production-plan",
"name_unique": "production-plan-adonaming-h6lf",
"regex": "^[^/\:
?"\u003c\u003e
environment_work_itemThe name of the environment associated with work items in Azure DevOps
{
"development": {
"1234": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "dbmh-development-1234-adonaming",
"name_unique": "dbmh-development-1234-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
]$",
"scope": "Project",
"slug": "envwi"
},
"1235": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "dbmh-development-1235-adonaming",
"name_unique": "dbmh-development-1235-adonaming-h6lf",
"regex": "^[^/\:
?"\u003c\u003e
environment_work_item_basicThe basic name of the environment associated with work items in Azure DevOps
{
"development": {
"1234": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "development-1234",
"name_unique": "development-1234-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
]$",
"scope": "Project",
"slug": "envwib"
},
"1235": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "development-1235",
"name_unique": "development-1235-adonaming-h6lf",
"regex": "^[^/\:
?"\u003c\u003e
git_repositoryThe Git repository in Azure DevOps
{
"dashes": true,
"max_length": 64,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "gitrepo"
}
git_repository_branchThe branch of the Git repository in Azure DevOps
{
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=\\x00-\\x1F\\x7F]+",
"scope": "Repository",
"slug": "gitbranch"
}
git_repository_bug_branch_dashThe bug branch of the Git repository in Azure DevOps, with dashes
{
"1234": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "bug-1234-dbmh-adonaming",
"name_unique": "bug-1234-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=\\x00-\\x1F\\x7F]+",
"scope": "Repository",
"slashes": false,
"slug": "gitbugbr"
},
"1235": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "bug-1235-dbmh-adonaming",
"name_unique": "bug-1235-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
git_repository_bug_branch_slashThe bug branch of the Git repository in Azure DevOps, with slashes
{
"1234": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "bug/1234-dbmh-adonaming",
"name_unique": "bug/1234-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=\\x00-\\x1F\\x7F]+",
"scope": "Repository",
"slashes": true,
"slug": "gitbugbr"
},
"1235": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "bug/1235-dbmh-adonaming",
"name_unique": "bug/1235-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
git_repository_dev_branch_dashThe development branch of the Git repository in Azure DevOps, with dashes
{
"1234": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "dev-1234-dbmh-adonaming",
"name_unique": "dev-1234-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=\\x00-\\x1F\\x7F]+",
"scope": "Repository",
"slashes": false,
"slug": "gitdevbr"
},
"1235": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "dev-1235-dbmh-adonaming",
"name_unique": "dev-1235-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
git_repository_dev_branch_slashThe development branch of the Git repository in Azure DevOps, with slashes
{
"1234": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "dev/1234-dbmh-adonaming",
"name_unique": "dev/1234-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=\\x00-\\x1F\\x7F]+",
"scope": "Repository",
"slashes": true,
"slug": "gitdevbr"
},
"1235": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "dev/1235-dbmh-adonaming",
"name_unique": "dev/1235-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
git_repository_development_branch_dashThe development branch of the Git repository in Azure DevOps, with dashes
{
"1234": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "development-1234-dbmh-adonaming",
"name_unique": "development-1234-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=\\x00-\\x1F\\x7F]+",
"scope": "Repository",
"slashes": false,
"slug": "gitdevbr"
},
"1235": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "development-1235-dbmh-adonaming",
"name_unique": "development-1235-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
git_repository_development_branch_slashThe development branch of the Git repository in Azure DevOps, formatted with slashes
{
"1234": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "development/1234-dbmh-adonaming",
"name_unique": "development/1234-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=\\x00-\\x1F\\x7F]+",
"scope": "Repository",
"slashes": true,
"slug": "gitdevbr"
},
"1235": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "development/1235-dbmh-adonaming",
"name_unique": "development/1235-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
git_repository_feature_branch_dashThe feature branch of the Git repository in Azure DevOps, formatted with dashes
{
"1234": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "feature-1234-dbmh-adonaming",
"name_unique": "feature-1234-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=\\x00-\\x1F\\x7F]+",
"scope": "Repository",
"slashes": false,
"slug": "gitfetbr"
},
"1235": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "feature-1235-dbmh-adonaming",
"name_unique": "feature-1235-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
git_repository_feature_branch_slashThe feature branch of the Git repository in Azure DevOps, formatted with slashes
{
"1234": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "feature/1234-dbmh-adonaming",
"name_unique": "feature/1234-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=\\x00-\\x1F\\x7F]+",
"scope": "Repository",
"slashes": true,
"slug": "gitfetbr"
},
"1235": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "feature/1235-dbmh-adonaming",
"name_unique": "feature/1235-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
git_repository_fix_branch_dashThe fix branch of the Git repository in Azure DevOps, formatted with dashes
{
"1234": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "fix-1234-dbmh-adonaming",
"name_unique": "fix-1234-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=\\x00-\\x1F\\x7F]+",
"scope": "Repository",
"slashes": false,
"slug": "gitfixbr"
},
"1235": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "fix-1235-dbmh-adonaming",
"name_unique": "fix-1235-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
git_repository_fix_branch_slashThe fix branch of the Git repository in Azure DevOps, formatted with slashes
{
"1234": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "fix/1234-dbmh-adonaming",
"name_unique": "fix/1234-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=\\x00-\\x1F\\x7F]+",
"scope": "Repository",
"slashes": true,
"slug": "gitfixbr"
},
"1235": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "fix/1235-dbmh-adonaming",
"name_unique": "fix/1235-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
git_repository_hotfix_branch_dashThe hotfix branch of the Git repository in Azure DevOps, formatted with dashes
{
"1234": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "hotfix-1234-dbmh-adonaming",
"name_unique": "hotfix-1234-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=\\x00-\\x1F\\x7F]+",
"scope": "Repository",
"slashes": false,
"slug": "githotbr"
},
"1235": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "hotfix-1235-dbmh-adonaming",
"name_unique": "hotfix-1235-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
git_repository_hotfix_branch_slashThe hotfix branch of the Git repository in Azure DevOps, formatted with slashes
{
"1234": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "hotfix/1234-dbmh-adonaming",
"name_unique": "hotfix/1234-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=\\x00-\\x1F\\x7F]+",
"scope": "Repository",
"slashes": true,
"slug": "githotbr"
},
"1235": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "hotfix/1235-dbmh-adonaming",
"name_unique": "hotfix/1235-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
git_repository_release_branch_dashThe release branch of the Git repository in Azure DevOps, formatted with dashes
{
"1234": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "release-1234-dbmh-adonaming",
"name_unique": "release-1234-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=\\x00-\\x1F\\x7F]+",
"scope": "Repository",
"slashes": false,
"slug": "gitrelbr"
},
"1235": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "release-1235-dbmh-adonaming",
"name_unique": "release-1235-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
git_repository_release_branch_slashThe release branch of the Git repository in Azure DevOps, formatted with slashes
{
"1234": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "release/1234-dbmh-adonaming",
"name_unique": "release/1234-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=\\x00-\\x1F\\x7F]+",
"scope": "Repository",
"slashes": true,
"slug": "gitrelbr"
},
"1235": {
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "release/1235-dbmh-adonaming",
"name_unique": "release/1235-dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
groupThe group in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Organization",
"slug": "grp"
}
projectThe project in Azure DevOps
{
"dashes": true,
"max_length": 64,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^_\.\/\:*?"\u003c\u003e
;#*{}+,=\\[\\]\\x00-\\x1F]*",
"scope": "Organization",
"slug": "prj"
}
serviceendpoint_argocdThe ArgoCD service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "seargocd"
}
serviceendpoint_artifactoryThe Artifactory service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "seart"
}
serviceendpoint_awsThe AWS service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "seaws"
}
serviceendpoint_azurecrThe Azure Container Registry service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "seazcr"
}
serviceendpoint_azuredevopsThe Azure DevOps service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "seazdo"
}
serviceendpoint_azurermThe Azure Resource Manager service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "seazrm"
}
serviceendpoint_bitbucketThe Bitbucket service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "sebitb"
}
serviceendpoint_dockerregistryThe Docker Registry service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "sedr"
}
serviceendpoint_externaltfsThe external TFS service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "setfs"
}
serviceendpoint_gcp_terraformThe GCP Terraform service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "segcptf"
}
serviceendpoint_genericThe generic service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "seg"
}
serviceendpoint_generic_gitThe generic Git service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "seggit"
}
serviceendpoint_githubThe GitHub service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "segh"
}
serviceendpoint_github_enterpriseThe GitHub Enterprise service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "segh"
}
serviceendpoint_incomingwebhookThe incoming webhook service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "seiw"
}
serviceendpoint_jenkinsThe Jenkins service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "sej"
}
serviceendpoint_jfrog_artifactory_v2The JFrog Artifactory v2 service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "sejfa"
}
serviceendpoint_jfrog_distribution_v2The JFrog Distribution v2 service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "sejfd"
}
serviceendpoint_jfrog_platform_v2The JFrog Platform v2 service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "sejfp"
}
serviceendpoint_jfrog_xray_v2The JFrog Xray v2 service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "sejx"
}
serviceendpoint_kubernetesThe Kubernetes service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "sek"
}
serviceendpoint_mavenThe Maven service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "semvn"
}
serviceendpoint_nexusThe Nexus service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "sen"
}
serviceendpoint_npmThe NPM service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "senpm"
}
serviceendpoint_nugetThe NuGet service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "senug"
}
serviceendpoint_octopusdeployThe Octopus Deploy service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "seod"
}
serviceendpoint_runpipelineThe Run Pipeline service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "serp"
}
serviceendpoint_servicefabricThe Service Fabric service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "sesf"
}
serviceendpoint_sonarcloudThe SonarCloud service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "sesc"
}
serviceendpoint_sonarqubeThe SonarQube service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "sesq"
}
serviceendpoint_sshThe SSH service endpoint in Azure DevOps
{
"dashes": true,
"max_length": 1024,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "sessh"
}
teamThe team in Azure DevOps
{
"dashes": true,
"max_length": 255,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "adt"
}
unique_seedA custom value for generating random characters, used when a unique seed is not provided"h6lft43juihfyd9pp0qi3hldl6evepm2su9aztf5mqnyuwzzx48lniw479adc"no
validationThe validation rules that have been applied
{
"agent_pool": {
"valid_name": true,
"valid_name_unique": true
},
"branch_policy_build_validation": {
"valid_name": true,
"valid_name_unique": true
},
"build_definition": {
"valid_name": true,
"valid_name_unique": true
},
"elastic_pool": {
"valid_name": true,
"valid_name_unique": true
},
"environment": {
"development": {
"valid_name": true,
"valid_name_unique": true
},
"production": {
"valid_name": true,
"valid_name_unique": true
},
"user-acceptance-testing": {
"valid_name": true,
"valid_name_unique": true
}
},
"environment_apply": {
"development": {
"valid_name": true,
"valid_name_unique": true
},
"production": {
"valid_name": true,
"valid_name_unique": true
},
"user-acceptance-testing": {
"valid_name": true,
"valid_name_unique": true
}
},
"environment_apply_basic": {
"development": {
"valid_name": true,
"valid_name_unique": true
},
"production": {
"valid_name": true,
"valid_name_unique": true
},
"user-acceptance-testing": {
"valid_name": true,
"valid_name_unique": true
}
},
"environment_basic": {
"development": {
"valid_name": true,
"valid_name_unique": true
},
"production": {
"valid_name": true,
"valid_name_unique": true
},
"user-acceptance-testing": {
"valid_name": true,
"valid_name_unique": true
}
},
"environment_plan": {
"development": {
"valid_name": true,
"valid_name_unique": true
},
"production": {
"valid_name": true,
"valid_name_unique": true
},
"user-acceptance-testing": {
"valid_name": true,
"valid_name_unique": true
}
},
"environment_plan_basic": {
"development": {
"valid_name": true,
"valid_name_unique": true
},
"production": {
"valid_name": true,
"valid_name_unique": true
},
"user-acceptance-testing": {
"valid_name": true,
"valid_name_unique": true
}
},
"environment_work_item": {
"development": {
"1234": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "dbmh-development-1234-adonaming",
"name_unique": "dbmh-development-1234-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
]$",
"scope": "Project",
"slug": "envwi"
},
"1235": {
"dashes": true,
"max_length": 240,
"min_length": 1,
"name": "dbmh-development-1235-adonaming",
"name_unique": "dbmh-development-1235-adonaming-h6lf",
"regex": "^[^/\:
?"\u003c\u003e
variable_groupThe variable group in Azure DevOps
{
"dashes": true,
"max_length": 256,
"min_length": 1,
"name": "dbmh-adonaming",
"name_unique": "dbmh-adonaming-h6lf",
"regex": "^[^/\:*?"\u003c\u003e
~';.,\[\]{}()@#%^\u0026!+=]*",
"scope": "Project",
"slug": "advg"
}

(Back to the Table of Contents)


Modules

No modules.


(Back to the Table of Contents)


Terraform versions

Terraform version and terraform provider versions have been set using tfupdate. In order to update the installed providers to the latest versions please first install tfupdate using the below instructions and then run the following commands from the root of the repo in a powershell session. Please only run the commands for the providers/modules you are using.

Installing Tfupdate

the tfupdate repo can be found here

either download the tarball and add tfupdate.exe to your PATH or do the following:

  1. Ensure you have Go installed
  2. Clone the repository locally git clone https://github.com/minamijoyo/tfupdate.git
  3. build the source code with go build
  4. Add the complied binaries to your PATH
Terraform version
tfupdate terraform . --version "~> $(tfupdate release latest hashicorp/terraform)" --recursive

please also add the terraform version to the terraform_installer_version variable in build/pipelines/iac_templates/variables.yml

Random version
tfupdate provider random . --version "~> $(tfupdate release latest hashicorp/random --source-type tfregistryProvider)" --recursive

(Back to the Table of Contents)



(Back to the Table of Contents)


Roadmap

  • Support majority of Azure DevOps resources
  • Test validation rules
  • Include output examples in docs
  • Different branch types to satisfy gitversion
  • Additional examples in docs
  • Feature 3
    • Nested Feature

See the issues for a full list of proposed features (and known issues).


(Back to the Table of Contents)


Contributing

All are encouraged to contribute Contributions are what make the open source community such a great way to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please create a branch and create a pull request. You can also simply open an issue with the tag "enhancement".

Don't forget to give the project a star! Thanks again!

  1. Clone the Repo (git clone https://github.com/DownAtTheBottomOfTheMoleHole/terraform-azuredevops-naming)
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

NOTE: This repo has tagged releases where the version is generated by gitversion. You can increment the release version by adding to your commit message as follows:

Adding +semver: breaking or +semver: major will cause the major version to be increased, +semver: feature or +semver: minor will bump minor and +semver: patch or +semver: fix will bump the patch. source



(Back to the Table of Contents)


To work with this repo we recommend you install the tools that are included in the prerequisites. However, you may work on the repo in the browser if you prefer.

Contributing Prerequisites

To replicate the setup used to initially create this repository you will need

  1. Clone the Repo

    git clone https://github.com/DownAtTheBottomOfTheMoleHole/terraform-azuredevops-naming.git
    
  2. Install pip

    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
    python get-pip.py
    
  3. Install Chocolatey

    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
    
  4. Install Terraform

    choco install terraform
    
  5. Install TFlint

    choco install tflint
    

    Also download the tflint plugins from github such as tflint-ruleset-azurerm and tflint-ruleset-aws put these in your .tflint.d/plugins directory at the root of your user directory

  6. Install terraform-docs

    choco install terraform-docs
    
  7. Install pre-commit

    pip install pre-commit
    
  8. Install vscode

    choco install vscode
    
  9. Install tfupdate

Download the latest compiled binaries from here then put it in your executable path.


(Back to the Table of Contents)


License

This module is licensed under the MIT license which can be found here: LICENSE.md

(Back to the Table of Contents)


Contact

Rolf Moleman - @RolfMoleman

Module Link: https://github.com/DownAtTheBottomOfTheMoleHole/terraform-azuredevops-naming


(Back to the Table of Contents)