Skip to content

Commit

Permalink
Add Search Service (Azure#82)
Browse files Browse the repository at this point in the history
Co-authored-by: Ferry de Groot <[email protected]>
  • Loading branch information
ferrydg and Ferry de Groot authored May 27, 2023
1 parent 3c1d123 commit c06baf3
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ No modules.
| <a name="output_role_definition"></a> [role\_definition](#output\_role\_definition) | Role Definition |
| <a name="output_route"></a> [route](#output\_route) | Route |
| <a name="output_route_table"></a> [route\_table](#output\_route\_table) | Route Table |
| <a name="output_search_service"></a> [search\_service](#output\_search\_service) | Search Service |
| <a name="output_service_fabric_cluster"></a> [service\_fabric\_cluster](#output\_service\_fabric\_cluster) | Service Fabric Cluster |
| <a name="output_servicebus_namespace"></a> [servicebus\_namespace](#output\_servicebus\_namespace) | Servicebus Namespace |
| <a name="output_servicebus_namespace_authorization_rule"></a> [servicebus\_namespace\_authorization\_rule](#output\_servicebus\_namespace\_authorization\_rule) | Servicebus Namespace Authorization Rule |
Expand Down
14 changes: 14 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1866,6 +1866,16 @@ locals {
scope = "resourceGroup"
regex = "^[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$"
}
search_service = {
name = substr(join("-", compact([local.prefix, "srch", local.suffix])), 0, 64)
name_unique = substr(join("-", compact([local.prefix, "srch", local.suffix_unique])), 0, 64)
dashes = true
slug = "srch"
min_length = 2
max_length = 64
scope = "global"
regex = "^[a-zA-Z0-9][a-zA-Z0-9-]+$"
}
service_fabric_cluster = {
name = substr(join("-", compact([local.prefix, "sf", local.suffix])), 0, 23)
name_unique = substr(join("-", compact([local.prefix, "sf", local.suffix_unique])), 0, 23)
Expand Down Expand Up @@ -3110,6 +3120,10 @@ locals {
valid_name = length(regexall(local.az.route_table.regex, local.az.route_table.name)) > 0 && length(local.az.route_table.name) > local.az.route_table.min_length
valid_name_unique = length(regexall(local.az.route_table.regex, local.az.route_table.name_unique)) > 0
}
search_service = {
valid_name = length(regexall(local.az.search_service.regex, local.az.search_service.name)) > 0 && length(local.az.search_service.name) > local.az.search_service.min_length
valid_name_unique = length(regexall(local.az.search_service.regex, local.az.search_service.name_unique)) > 0
}
service_fabric_cluster = {
valid_name = length(regexall(local.az.service_fabric_cluster.regex, local.az.service_fabric_cluster.name)) > 0 && length(local.az.service_fabric_cluster.name) > local.az.service_fabric_cluster.min_length
valid_name_unique = length(regexall(local.az.service_fabric_cluster.regex, local.az.service_fabric_cluster.name_unique)) > 0
Expand Down
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,11 @@ output "route_table" {
description = "Route Table"
}

output "search_service" {
value = local.az.search_service
description = "Search Service"
}

output "service_fabric_cluster" {
value = local.az.service_fabric_cluster
description = "Service Fabric Cluster"
Expand Down
11 changes: 11 additions & 0 deletions resourceDefinition.json
Original file line number Diff line number Diff line change
Expand Up @@ -1671,6 +1671,17 @@
"slug": "route",
"dashes": true
},
{
"name": "search_service",
"length": {
"min": 2,
"max": 64
},
"regex": "^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9-]+$",
"scope": "global",
"slug": "srch",
"dashes": true
},
{
"name": "service_fabric_cluster",
"length": {
Expand Down

0 comments on commit c06baf3

Please sign in to comment.