Skip to content

Commit

Permalink
Updated README, task,json and addressed review comments (#11402)
Browse files Browse the repository at this point in the history
* Implemented ARMTemplateDeployment task

* Implemented ARMTemplateDeployment task

* Implemented ARMTemplateDeployment task3

* Implemented ARMTemplateDeployment task4

* Added support for Management group and Subscription level deployment scope (#11265)

* Implemented AzureServiceClientBase &DeploymentBase

* Added validations

* Updated properties of base classes

* Modified patch version of related tasks

* Revert "Modified patch version of related tasks"

This reverts commit 8e01c19.

* Modified patch version of related tasks

* Updated existing tests

* Addressed review comments

* Implemented ARMTemplateDeployment task5

* Revert "Added support for Management group and Subscription level deployment scope (#11265)"

This reverts commit 06f0b29.

* Addressed review comments

* Updated L0 tests & addressed review comments

* update readme

* Updated help text
  • Loading branch information
vinodkumar3 committed Sep 23, 2019
1 parent 0bc03e9 commit f8b7d96
Show file tree
Hide file tree
Showing 26 changed files with 951 additions and 68 deletions.
18 changes: 10 additions & 8 deletions Tasks/AzureResourceManagerTemplateDeploymentV3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

### Overview

This task is used to deploy [Azure Resource Manager templates](https://azure.microsoft.com/en-in/documentation/articles/resource-group-template-deploy/). it support template deployment as three scopes - Resource group, Subscription and Management group The task is also used to create or update a resource group.
This task is used to deploy [Azure Resource Manager templates](https://azure.microsoft.com/en-in/documentation/articles/resource-group-template-deploy/) at resource group deployment scope, subscription deployment scope and management group [deployment scopes](https://docs.microsoft.com/bs-latn-ba/Azure/azure-resource-manager/resource-group-template-deploy-rest#deployment-scope). The task is also used to create or update a resource group in Azure.

### What's new in Version 3.0
- Added support for deployment scope at Subscription and Management group scope.
- Added support for Subscription and Management Group deployment scopes.
- Removed all the VM related actions.


Expand Down Expand Up @@ -34,19 +34,21 @@ The task needs the Azure PowerShell version to be installed on the automation ag

The parameters of the task are described in details, including examples, to show how to input the parameters. The parameters listed with a \* are required parameters for the task:

* **Deployment Scope**\*: Select the scope of deployment fom the options: Resource Group, Subscription and Mangement Group.
* **Deployment Scope**\*: Select the scope of deployment from the options: Resource Group, Subscription and Mangement Group. For more info refer this [link](https://docs.microsoft.com/bs-latn-ba/Azure/azure-resource-manager/resource-group-template-deploy-rest#deployment-scope)

* **Azure Resource Manager connection**\*: Select the ARM service connection of appropriate deployment scope i.e. Deployment Scope selected above should be of lower or same level to the deployment scope of service connection. To configure new service connection, select the Azure subscription from the list and click 'Authorize'. If your subscription is not listed or if you want to use an existing Service Principal, you can setup an Azure service connection using 'Manage' link.
* **Azure Resource Manager connection**\*: Select the ARM service connection with appropriate access i.e. the ARM service connection should have access to the resource group, subscription or the management group where the ARM template is targetted. To configure new service connection, select the Azure subscription from the list and click 'Authorize'. If your subscription is not listed or if you want to use an existing Service Principal, you can setup an Azure service connection using 'Manage' link.

* **Action**\*: For deployment scope of 'Resource Group', elect the action to be performed on the resource group. Following actions are available:
* **Subscription**\*: Select the subscripton to which the deployment is targetted.

* **Action**\*: If the deployment scope is 'Resource Group', select the action to be performed on the resource group. Following actions are available:
- Create or Update Resource Group: creates a new resource group or to update an existing one (using [Azure Resource Manager templates](https://azure.microsoft.com/en-in/documentation/articles/resource-group-template-deploy/)).
- Delete Resource Group

* **Resource Group**\*: Enter the name of the resource group. If this is an existing resource group, and the selected action is to create or update the resource group, then the task will update the resource group with the resources specified in the Azure template. If no Resource Group with the name exists in the subscription, then a new one will be created.

* **Location**\*: Resource Group deployment scope: Location for deploying the resource group. If the resource group already exists in the subscription, then this value will be ignored. Other deployment scope: Location to store deployment metadata.

The following parameters are shown when the selected action is to create or update a resource group:
* **Location**\*:
- For Resource Group deployment scope: Location for deploying the resource group. If the resource group already exists in the subscription, then this value will be ignored.
- For other deployment scopes: Location for storing the deployment metadata.

* **Template location**: The location of the Template & the Parameters JSON files. Select "Linked Artifact" if the files are part of the linked code/build artifacts. Select "URL of the file" if the JSON files are located at any publicly accessible http/https URLs. To use a file stored in a private storage account, retrieve and include the shared access signature (SAS) token in the URL of the template. Example: <blob_storage_url>/template.json?<SAStoken>. To upload a parameters file to a storage account and generate a SAS token, you could use [Azure file copy task](https://aka.ms/azurefilecopyreadme) or follow the steps using [PowerShell](https://go.microsoft.com/fwlink/?linkid=838080) or [Azure CLI](https://go.microsoft.com/fwlink/?linkid=836911).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"loc.friendlyName": "ARM template deployment",
"loc.helpMarkDown": "[Learn more about this task](https://aka.ms/armdeploymenttaskreadme)",
"loc.helpMarkDown": "[Learn more about this task](https://aka.ms/armtaskreadme)",
"loc.description": "Deploy an Azure Resource Manager (ARM) template to all the deployment scopes",
"loc.instanceNameFormat": "ARM Template deployment: $(deploymentScope) scope",
"loc.releaseNotes": "- Added support for deployment at all the deployment scopes.\n- Removed all the VM related actions.",
"loc.group.displayName.AzureDetails": "Azure Details",
"loc.group.displayName.Template": "Template",
"loc.group.displayName.Advanced": "Advanced",
"loc.input.label.deploymentScope": "Deployment Scope",
"loc.input.help.deploymentScope": "Deployment scope of the deployment",
"loc.input.label.deploymentScope": "Deployment scope",
"loc.input.help.deploymentScope": "Deployment scope of the deployment. To know more abour deployment scopes, refer this [link](https://docs.microsoft.com/bs-latn-ba/Azure/azure-resource-manager/resource-group-template-deploy-rest#deployment-scope)",
"loc.input.label.ConnectedServiceName": "Azure Resource Manager connection",
"loc.input.help.ConnectedServiceName": "Select the Azure Resource Manager service connection having access to the selected deployment scope.",
"loc.input.label.subscriptionName": "Subscription",
Expand All @@ -18,7 +18,7 @@
"loc.input.label.resourceGroupName": "Resource group",
"loc.input.help.resourceGroupName": "Provide the name of a resource group.",
"loc.input.label.location": "Location",
"loc.input.help.location": "Resource Group deployment scope: Location for deploying the resource group. If the resource group already exists in the subscription, then this value will be ignored.\n Other deployment scope: Location to store deployment metadata.",
"loc.input.help.location": "For Resource Group deployment scope: Location for deploying the resource group. If the resource group already exists in the subscription, then this value will be ignored.\n For other deployment scope: Location to store deployment metadata.",
"loc.input.label.templateLocation": "Template location",
"loc.input.label.csmFileLink": "Template link",
"loc.input.help.csmFileLink": "Specify the URL of the template file. Example: [https://raw.githubusercontent.com/Azure/...](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vm-simple-windows/azuredeploy.json) \n\nTo deploy a template stored in a private storage account, retrieve and include the shared access signature (SAS) token in the URL of the template. Example: `<blob_storage_url>/template.json?<SAStoken>` To upload a template file (or a linked template) to a storage account and generate a SAS token, you could use [Azure file copy](https://aka.ms/azurefilecopyreadme) task or follow the steps using [PowerShell](https://go.microsoft.com/fwlink/?linkid=838080) or [Azure CLI](https://go.microsoft.com/fwlink/?linkid=836911).\n\nTo view the template parameters in a grid, click on “…” next to Override template parameters text box. This feature requires that CORS rules are enabled at the source. If templates are in Azure storage blob, refer to [this](https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Cross-Origin-Resource-Sharing--CORS--Support-for-the-Azure-Storage-Services?redirectedfrom=MSDN#understanding-cors-requests) to enable CORS.",
Expand All @@ -31,7 +31,7 @@
"loc.input.label.overrideParameters": "Override template parameters",
"loc.input.help.overrideParameters": "To view the template parameters in a grid, click on “…” next to Override Parameters textbox. This feature requires that CORS rules are enabled at the source. If templates are in Azure storage blob, refer to [this](https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Cross-Origin-Resource-Sharing--CORS--Support-for-the-Azure-Storage-Services?redirectedfrom=MSDN#understanding-cors-requests) to enable CORS. Or type the template parameters to override in the textbox. Example, <br>–storageName fabrikam –adminUsername $(vmusername) -adminPassword $(password) –azureKeyVaultName $(fabrikamFibre).<br>If the parameter value you're using has multiple words, enclose them in quotes, even if you're passing them using variables. For example, -name \"parameter value\" -name2 \"$(var)\"<br>To override object type parameters use stringified JSON objects. For example, -options [\"option1\"] -map {\"key1\": \"value1\" }. ",
"loc.input.label.deploymentMode": "Deployment mode",
"loc.input.help.deploymentMode": "Refer to [this](https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-modes) for more details. \n\n Incremental mode handles deployments as incremental updates to the resource group. It leaves unchanged resources that exist in the resource group but are not specified in the template. \n\n Complete mode deletes resources that are not in your template. Complete mode takes relatively more time than incremental mode. If the task times out, consider increasing the timeout, or changing the mode to 'Incremental'. \n [Warning] This action will delete all the existing resources in the resource group that are not specified in the template. \n\n Validate mode enables you to find problems with the template before creating actual resources. \n\n By default, Incremental mode is used.",
"loc.input.help.deploymentMode": "Refer to [this](https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-modes) for more details. \n\n Incremental mode handles deployments as incremental updates to the resource group. It leaves unchanged resources that exist in the resource group but are not specified in the template. \n\n Complete mode deletes resources that are not in your template. Complete mode takes relatively more time than incremental mode. If the task times out, consider increasing the timeout, or changing the mode to 'Incremental'. \n [Warning] This action will delete all the existing resources in the resource group that are not specified in the template. \n\n Validate mode enables you to find problems with the template before creating actual resources. \n\n By default, Incremental mode is used. \n\n 'Complete' mode is supported for 'Resource Group' Deployment scope only.",
"loc.input.label.deploymentName": "Deployment name",
"loc.input.help.deploymentName": "Specifies the name of the resource group deployment to create.",
"loc.input.label.deploymentOutputs": "Deployment outputs",
Expand Down Expand Up @@ -80,5 +80,6 @@
"loc.messages.MoreInformationOnAzurePortal": "More information on Azure Portal",
"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.LocationNotProvided": "Location is required for deployment",
"loc.messages.ARMServiceConnectionScope": "ARM Service Conection deployment scope - %s"
}
8 changes: 8 additions & 0 deletions Tasks/AzureResourceManagerTemplateDeploymentV3/Tests/CSM.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parameters": {
"param": {
"value": false,
"toBeRemoved": true
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
// This json file has comments
"var": "value ending with escaped character\\\"\\\\"
/*some Comment After the escaped Character */
}
Loading

0 comments on commit f8b7d96

Please sign in to comment.