From 13b7274dc1b622863b97222cf17c2d7fa0a0c4ed Mon Sep 17 00:00:00 2001 From: Maxwell Weru Date: Mon, 25 Sep 2023 08:40:14 +0300 Subject: [PATCH] Restrict the length for name and imageTag parameters --- server/main.bicep | 3 +++ server/main.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/server/main.bicep b/server/main.bicep index c74bc997..718304a7 100644 --- a/server/main.bicep +++ b/server/main.bicep @@ -1,6 +1,8 @@ @description('Location for all resources.') param location string = resourceGroup().location +@minLength(5) +@maxLength(24) @description('Name of the resources. Make sure it is unique e.g. dependabotcontoso to avoid conflicts or failures') param name string = 'dependabot' @@ -10,6 +12,7 @@ param projectSetups string = '[]' @description('Access token for authenticating requests to GitHub.') param githubToken string = '' +@minLength(1) @description('Tag of the docker images.') param imageTag string = '#{GITVERSION_NUGETVERSIONV2}#' diff --git a/server/main.json b/server/main.json index ea16ae0a..50fc1ffb 100644 --- a/server/main.json +++ b/server/main.json @@ -12,6 +12,8 @@ "name": { "type": "string", "defaultValue": "dependabot", + "minLength": 5, + "maxLength": 24, "metadata": { "description": "Name of the resources. Make sure it is unique e.g. dependabotcontoso to avoid conflicts or failures" } @@ -33,6 +35,7 @@ "imageTag": { "type": "string", "defaultValue": "#{GITVERSION_NUGETVERSIONV2}#", + "minLength": 1, "metadata": { "description": "Tag of the docker images." }