diff --git a/Tasks/AzureResourceManagerTemplateDeploymentV3/Strings/resources.resjson/en-US/resources.resjson b/Tasks/AzureResourceManagerTemplateDeploymentV3/Strings/resources.resjson/en-US/resources.resjson index d29f0406c0d3..bb4449642c71 100644 --- a/Tasks/AzureResourceManagerTemplateDeploymentV3/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/AzureResourceManagerTemplateDeploymentV3/Strings/resources.resjson/en-US/resources.resjson @@ -81,5 +81,6 @@ "loc.messages.LogDeploymentName": "Deployment name is %s", "loc.messages.ResourceGroupNameNotProvided": "Resource Group name should be provided", "loc.messages.LocationNotProvided": "Location is required for deployment", - "loc.messages.ARMServiceConnectionScope": "ARM Service Conection deployment scope - %s" + "loc.messages.ARMServiceConnectionScope": "ARM Service Conection deployment scope - %s", + "loc.messages.CompleteDeploymentModeNotSupported": "Deployment mode 'Complete' is not supported for deployment at '%s' scope" } \ No newline at end of file diff --git a/Tasks/AzureResourceManagerTemplateDeploymentV3/models/TaskParameters.ts b/Tasks/AzureResourceManagerTemplateDeploymentV3/models/TaskParameters.ts index d0c9072c22f9..536f70070f3e 100644 --- a/Tasks/AzureResourceManagerTemplateDeploymentV3/models/TaskParameters.ts +++ b/Tasks/AzureResourceManagerTemplateDeploymentV3/models/TaskParameters.ts @@ -86,6 +86,11 @@ export class TaskParameters { throw new Error(tl.loc("LocationNotProvided")); } + //Deployment mode + this.deploymentMode = tl.getInput("deploymentMode"); + if(!!this.deploymentMode && this.deploymentMode === "Complete" && this.deploymentScope != "Resource Group"){ + throw new Error(tl.loc("CompleteDeploymentModeNotSupported", this.deploymentScope)); + } this.templateLocation = tl.getInput("templateLocation"); if (this.templateLocation === "Linked artifact") { @@ -98,7 +103,6 @@ export class TaskParameters { this.overrideParameters = tl.getInput("overrideParameters"); this.outputVariable = tl.getInput("outputVariable"); this.deploymentName = tl.getInput("deploymentName"); - this.deploymentMode = tl.getInput("deploymentMode"); this.credentials = await this.getARMCredentials(this.connectedService); this.deploymentOutputs = tl.getInput("deploymentOutputs"); this.addSpnToEnvironment = tl.getBoolInput("addSpnToEnvironment", false); diff --git a/Tasks/AzureResourceManagerTemplateDeploymentV3/task.json b/Tasks/AzureResourceManagerTemplateDeploymentV3/task.json index f65702d96cd3..6bad16409860 100644 --- a/Tasks/AzureResourceManagerTemplateDeploymentV3/task.json +++ b/Tasks/AzureResourceManagerTemplateDeploymentV3/task.json @@ -15,7 +15,7 @@ "version": { "Major": 3, "Minor": 0, - "Patch": 0 + "Patch": 1 }, "preview": "true", "demands": [], @@ -294,6 +294,7 @@ "LogDeploymentName": "Deployment name is %s", "ResourceGroupNameNotProvided": "Resource Group name should be provided", "LocationNotProvided": "Location is required for deployment", - "ARMServiceConnectionScope": "ARM Service Conection deployment scope - %s" + "ARMServiceConnectionScope": "ARM Service Conection deployment scope - %s", + "CompleteDeploymentModeNotSupported": "Deployment mode 'Complete' is not supported for deployment at '%s' scope" } } diff --git a/Tasks/AzureResourceManagerTemplateDeploymentV3/task.loc.json b/Tasks/AzureResourceManagerTemplateDeploymentV3/task.loc.json index 393fe8fa3cee..045a89bd0462 100644 --- a/Tasks/AzureResourceManagerTemplateDeploymentV3/task.loc.json +++ b/Tasks/AzureResourceManagerTemplateDeploymentV3/task.loc.json @@ -15,7 +15,7 @@ "version": { "Major": 3, "Minor": 0, - "Patch": 0 + "Patch": 1 }, "preview": "true", "demands": [], @@ -294,6 +294,7 @@ "LogDeploymentName": "ms-resource:loc.messages.LogDeploymentName", "ResourceGroupNameNotProvided": "ms-resource:loc.messages.ResourceGroupNameNotProvided", "LocationNotProvided": "ms-resource:loc.messages.LocationNotProvided", - "ARMServiceConnectionScope": "ms-resource:loc.messages.ARMServiceConnectionScope" + "ARMServiceConnectionScope": "ms-resource:loc.messages.ARMServiceConnectionScope", + "CompleteDeploymentModeNotSupported": "ms-resource:loc.messages.CompleteDeploymentModeNotSupported" } } \ No newline at end of file