Skip to content

Latest commit

 

History

History
109 lines (73 loc) · 4.63 KB

Marketplace.md

File metadata and controls

109 lines (73 loc) · 4.63 KB

ARM Outputs Banner

This extension enables you to use the ARM Deployment outputs in your Azure Pipelines.

This step will use the last successful deployment within the selected resource group. If this deployent has outputs, all of them are copied to Pipelines variables by the ARM Output key:

screenshot-1

This outputs can then be used by default Azure Devops Pipelines ways: $(same-key-as-in-arm-template)

Usually this task is ran directly after the 'Azure Resource Group Deployment' task.

screenshot-2

Release notes

Version 5.1 - 03-03-2019

  • Deprecation warning for the PowerShell based version
  • Support for MSI based agents

Version 5.0 - 25-12-2018

  • Rewrite to Node to enable Linux based agents
  • Updated naming (VSTS > Azure DevOps)

Previous release info can be found on GitHub Releases

Parameter usage

Prefix

Using the 'prefix' parameter, it is possible to prefix the variables used within Pipelines. A prefix can be used to distinct variables coming out of ARM from regular Pipelines variables. A prefix can also be to prevent collisions between ARM Output names and Pipelines Variable names.

Output Names

Using the 'Output Names' parameter, it is possible to process only a subset of the ARM Outputs. When this field is left empty (it is by default) all ARM Outputs are used.

When last deployment is failed

Using the 'When last deployment is failed' parameter, you can choose the behaviour when the last deployment to a resource group has failed. There are two options, 1. fail the task (the default) or 2. take the last succesful deployment.

Filter deployment name

Optional string to filter deployments by. This can be useful if you have concurrent deployments to the same resource group. Deployment names in Pipelines are the name of the json file plus date and time, so a file CreateKeyVault.json could have a deployment name of CreateKeyVault-20180025-151538-0688. In this case, if you want to filter to deployments of this file enter CreateKeyVault as the filter

Good to know

Secrets

If your output is of type SecureString the output value cannot be read and these outputs are therefore ignored.

You can off course output your secrets as string but then these values might be exposed in logfiles (and visible via the Azure Portal as well)

Telemetry

From version 5.x onwards this task sends some data to my Application Insights. You can opt-out by adding a variable in your pipelines with the name 'arm-outputs-notelemetry'

The things I track to improve/monitor this task are: the type of host/os, the version and duration of this task and the message/callstack of exceptions when they occur. I will never send things like name/value of your tenant, subscription, resource-group or your ARM Outputs. Please don't just take my word but check the code and see the actual deployment pipelines history for any (recent) version.

Complex outputs

If your output is not a single value but a complex type, like second in this example:

{
    "parameters": {},
    "resources": {},
    "outputs": {
        "simple": "value",
        "complex": {
            "someKey":"someValue",
            "second": {
                "foo":"bar",
                "oops": {
                    "asdasdasd":true,
                    "arrayName": [
                        {
                            "asd":"qqq"
                        },
                        {
                            "efg":"aaa"
                        }
                    ]
                }
            }
        }
    }
}

This will result in the following 5 variables:

simple => value
complex_someKey => someValue
complex_second_foo => bar
complex_second_oops_asdasdasd => True
complex_second_oops_arrayName_0_asd => qqq
complex_second_oops_arrayName_1_efg => aaa

Note that names are seperated using an underscore and arrays are indexed.

Help & Contact

Find me at http://case.schollaart.net/. Experiencing problems, or do you have an idea? Please let me know via Twitter or by mail. Or even better, raise an issue on GitHub.