Skip to content

Commit 9e8b6b5

Browse files
ibersanoMSrbradley51github-actions[bot]
authored
feat: maximum_elastic_worker_count to allow WS SKU (#104) (#113)
* updated example naming module - terraform_module_version exact = true * add WS sku to regex maximum_elastic_worker_count * pre-commit * (pre-commit) updated regex --------- Co-authored-by: Ryan Bradley <110427869+rbradley51@users.noreply.github.com> Co-authored-by: github-actions[bot] <tfmod442916@users.noreply.github.com>
1 parent fc34bfe commit 9e8b6b5

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

examples/default/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ resource "random_integer" "region_index" {
3838
# This ensures we have unique CAF compliant names for our resources.
3939
module "naming" {
4040
source = "Azure/naming/azurerm"
41-
version = ">= 0.3.0"
41+
version = "0.4.2"
4242
}
4343
4444
# This is required for resource modules
@@ -133,7 +133,7 @@ The following Modules are called:
133133

134134
Source: Azure/naming/azurerm
135135

136-
Version: >= 0.3.0
136+
Version: 0.4.2
137137

138138
### <a name="module_test"></a> [test](#module\_test)
139139

examples/default/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ resource "random_integer" "region_index" {
3131
# This ensures we have unique CAF compliant names for our resources.
3232
module "naming" {
3333
source = "Azure/naming/azurerm"
34-
version = ">= 0.3.0"
34+
version = "0.4.2"
3535
}
3636

3737
# This is required for resource modules

locals.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
locals {
2-
maximum_elastic_worker_count = can(regex("EP1|EP2|EP3", var.sku_name)) ? var.maximum_elastic_worker_count : null
2+
maximum_elastic_worker_count = can(regex("EP1|EP2|EP3|WS1|WS2|WS3", var.sku_name)) ? var.maximum_elastic_worker_count : null
33
role_definition_resource_substring = "/providers/Microsoft.Authorization/roleDefinitions"
44
worker_count = (
55
var.sku_name == "Y1" ? 0 :

variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ variable "name" {
1111
description = "The name of the this resource."
1212

1313
validation {
14-
condition = can(regex("^[a-zA-Z0-9-]{1,60}$", var.name))
15-
error_message = "The name must be between 1 and 60 characters long and can only contain letters, numbers, hyphens and Unicode characters."
14+
condition = can(regex("^[a-zA-Z0-9-_]{1,60}$", var.name))
15+
error_message = "The name must be between 1 and 60 characters long and can only contain letters, numbers, hyphens, underscores and Unicode characters."
1616
}
1717
}
1818

0 commit comments

Comments
 (0)