Skip to content

Commit

Permalink
feat(names): add azurerm names module logic app resources names (Azur…
Browse files Browse the repository at this point in the history
…e#49)

* feat(names): add azurerm names module logic app resources names

feat(names): add azurerm names module logic app resources names

* feat(names): add azurerm names module logic app resources names

feat(names): add azurerm names module logic app resources names
  • Loading branch information
ryanwang2 authored Jul 25, 2022
1 parent 9710d59 commit 4d35935
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
14 changes: 14 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1224,6 +1224,16 @@ locals {
scope = "parent"
regex = "^[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$"
}
logic_app_workflow = {
name = substr(join("-", compact([local.prefix, "logic", local.suffix])), 0, 80)
name_unique = substr(join("-", compact([local.prefix, "logic", local.suffix_unique])), 0, 80)
dashes = true
slug = "logic"
min_length = 1
max_length = 80
scope = "resourceGroup"
regex = "^[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$"
}
machine_learning_workspace = {
name = substr(join("-", compact([local.prefix, "mlw", local.suffix])), 0, 260)
name_unique = substr(join("-", compact([local.prefix, "mlw", local.suffix_unique])), 0, 260)
Expand Down Expand Up @@ -2752,6 +2762,10 @@ locals {
valid_name = length(regexall(local.az.log_analytics_workspace.regex, local.az.log_analytics_workspace.name)) > 0 && length(local.az.log_analytics_workspace.name) > local.az.log_analytics_workspace.min_length
valid_name_unique = length(regexall(local.az.log_analytics_workspace.regex, local.az.log_analytics_workspace.name_unique)) > 0
}
logic_app_workflow = {
valid_name = length(regexall(local.az.logic_app_workflow.regex, local.az.logic_app_workflow.name)) > 0 && length(local.az.logic_app_workflow.name) > local.az.logic_app_workflow.min_length
valid_name_unique = length(regexall(local.az.logic_app_workflow.regex, local.az.logic_app_workflow.name_unique)) > 0
}
machine_learning_workspace = {
valid_name = length(regexall(local.az.machine_learning_workspace.regex, local.az.machine_learning_workspace.name)) > 0 && length(local.az.machine_learning_workspace.name) > local.az.machine_learning_workspace.min_length
valid_name_unique = length(regexall(local.az.machine_learning_workspace.regex, local.az.machine_learning_workspace.name_unique)) > 0
Expand Down
4 changes: 4 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@ output "log_analytics_workspace" {
value = local.az.log_analytics_workspace
}

output "logic_app_workflow" {
value = local.az.logic_app_workflow
}

output "machine_learning_workspace" {
value = local.az.machine_learning_workspace
}
Expand Down
11 changes: 11 additions & 0 deletions resourceDefinition.json
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,17 @@
"slug": "log",
"dashes": true
},
{
"name": "logic_app_workflow",
"length": {
"min": 1,
"max": 80
},
"regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$",
"scope": "resourceGroup",
"slug": "logic",
"dashes": true
},
{
"name": "machine_learning_workspace",
"length": {
Expand Down

0 comments on commit 4d35935

Please sign in to comment.