From 396bfcf49609ef09fc23745415dde918e7a6260b Mon Sep 17 00:00:00 2001 From: Ciprian Gologan <48557485+ciprianglg@users.noreply.github.com> Date: Wed, 28 Feb 2024 13:37:22 +0200 Subject: [PATCH 1/3] Update Devices/IotHubs/certificates Existing Regex gives error in case you want to generate a name: Invalid pattern '^[a-zA-Z0-9_-\.]{1,64}$' at offset 15. [x-y] range in reverse order. --- src/repository/resourcetypes.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repository/resourcetypes.json b/src/repository/resourcetypes.json index 63fb81f0..96ced906 100644 --- a/src/repository/resourcetypes.json +++ b/src/repository/resourcetypes.json @@ -2808,7 +2808,7 @@ "invalidCharactersStart": "", "invalidCharactersEnd": "", "invalidCharactersConsecutive": "", - "regx": "^[a-zA-Z0-9_-\\.]{1,64}$", + "Regx": "^[a-zA-Z0-9_\\.-]{1,64}$", "staticValues": "" }, { From 26bd7e53c1473545ddb38073726690dbe270d085 Mon Sep 17 00:00:00 2001 From: Ciprian Gologan <48557485+ciprianglg@users.noreply.github.com> Date: Wed, 28 Feb 2024 14:08:51 +0200 Subject: [PATCH 2/3] Fix regx for Logic/integrationAccounts-certificates/maps resource types Fixing regx which generated Invalid pattern '^[a-zA-Z0-9_-\.()]{1,80}$' at offset 15. [x-y] range in reverse order. --- src/repository/resourcetypes.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/repository/resourcetypes.json b/src/repository/resourcetypes.json index 63fb81f0..6a4519dd 100644 --- a/src/repository/resourcetypes.json +++ b/src/repository/resourcetypes.json @@ -3682,7 +3682,7 @@ "invalidCharactersStart": "", "invalidCharactersEnd": "", "invalidCharactersConsecutive": "", - "regx": "^[a-zA-Z0-9_-\\.()]{1,80}$", + "regx": "^[a-zA-Z0-9_\\.()-]{1,80}$", "staticValues": "" }, { @@ -3701,7 +3701,7 @@ "invalidCharactersStart": "", "invalidCharactersEnd": "", "invalidCharactersConsecutive": "", - "regx": "^[a-zA-Z0-9_-\\.()]{1,80}$", + "regx": "^[a-zA-Z0-9_\\.()-]{1,80}$", "staticValues": "" }, { From 55bb1420e1a1bd48a84502e5b5bc8bc6740a4fab Mon Sep 17 00:00:00 2001 From: Ciprian Gologan <48557485+ciprianglg@users.noreply.github.com> Date: Wed, 28 Feb 2024 14:57:40 +0200 Subject: [PATCH 3/3] Update DevTestLab/labs/virtualmachines resource type Regx for max and min were switched between linux and windows --- src/repository/resourcetypes.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/repository/resourcetypes.json b/src/repository/resourcetypes.json index 63fb81f0..f83439a3 100644 --- a/src/repository/resourcetypes.json +++ b/src/repository/resourcetypes.json @@ -2941,7 +2941,7 @@ "invalidCharactersStart": "", "invalidCharactersEnd": "", "invalidCharactersConsecutive": "", - "regx": "^(?![0-9]+$)([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,13}[a-zA-Z0-9])$", + "regx": "^(?![0-9]+$)([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,62}[a-zA-Z0-9])$", "staticValues": "" }, { @@ -2960,7 +2960,7 @@ "invalidCharactersStart": "", "invalidCharactersEnd": "", "invalidCharactersConsecutive": "", - "regx": "^(?![0-9]+$)([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,62}[a-zA-Z0-9])$", + "regx": "^(?![0-9]+$)([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,13}[a-zA-Z0-9])$", "staticValues": "" }, {