Skip to content

Commit

Permalink
fix: bastion, route table and route names do not match documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmckenna committed Sep 3, 2024
1 parent de86cde commit 92d139e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
19 changes: 10 additions & 9 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
terraform {
required_version = ">= 1.0"
required_providers {
random = {
source = "hashicorp/random"
Expand Down Expand Up @@ -197,10 +198,10 @@ locals {
regex = "^[a-zA-Z0-9][a-zA-Z0-9-_.]+[a-zA-Z0-9_]$"
}
bastion_host = {
name = substr(join("-", compact([local.prefix, "snap", local.suffix])), 0, 80)
name_unique = substr(join("-", compact([local.prefix, "snap", local.suffix_unique])), 0, 80)
name = substr(join("-", compact([local.prefix, "bas", local.suffix])), 0, 80)
name_unique = substr(join("-", compact([local.prefix, "bas", local.suffix_unique])), 0, 80)
dashes = true
slug = "snap"
slug = "bas"
min_length = 1
max_length = 80
scope = "parent"
Expand Down Expand Up @@ -1907,20 +1908,20 @@ locals {
regex = "^[^%]+[^ %.]$"
}
route = {
name = substr(join("-", compact([local.prefix, "rt", local.suffix])), 0, 80)
name_unique = substr(join("-", compact([local.prefix, "rt", local.suffix_unique])), 0, 80)
name = substr(join("-", compact([local.prefix, "route", local.suffix])), 0, 80)
name_unique = substr(join("-", compact([local.prefix, "route", local.suffix_unique])), 0, 80)
dashes = true
slug = "rt"
slug = "route"
min_length = 1
max_length = 80
scope = "parent"
regex = "^[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$"
}
route_table = {
name = substr(join("-", compact([local.prefix, "route", local.suffix])), 0, 80)
name_unique = substr(join("-", compact([local.prefix, "route", local.suffix_unique])), 0, 80)
name = substr(join("-", compact([local.prefix, "rt", local.suffix])), 0, 80)
name_unique = substr(join("-", compact([local.prefix, "rt", local.suffix_unique])), 0, 80)
dashes = true
slug = "route"
slug = "rt"
min_length = 1
max_length = 80
scope = "resourceGroup"
Expand Down
6 changes: 3 additions & 3 deletions resourceDefinition.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
},
"regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$",
"scope": "parent",
"slug": "snap",
"slug": "bas",
"dashes": true
},
{
Expand Down Expand Up @@ -1723,7 +1723,7 @@
},
"regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$",
"scope": "parent",
"slug": "rt",
"slug": "route",
"dashes": true
},
{
Expand All @@ -1734,7 +1734,7 @@
},
"regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$",
"scope": "resourceGroup",
"slug": "route",
"slug": "rt",
"dashes": true
},
{
Expand Down

0 comments on commit 92d139e

Please sign in to comment.