New-CmAzCustomExtension

Enables generic deployment of an ARM template as a framework extension.

Has following features:

  • Self-loading deployments using the component: “extension” header value.
  • A library of reusable templates automatically resolved in a [REPO]/extensions directory.
  • The ability to plug into useful functionality like the name generator and service locator.
  • Ability to use keyvault reference for secure strings.

This command forms part of the IaaS Building Block.

Parameters

-SettingsFile

Required. (String) File path for the settings file to be converted into a settings object.

-SettingsObject

Required. (Object) Object containing the configuration values required to run this cmdlet.

-WhatIf

(Switch) Run the command without executing any actions, so that no changes are made. The command will output a description of actions to be performed against the affected resources in the console window. Use this option if you are unsure of the overall impact of your command and wish to review it before committing to making changes.

-Confirm

(Switch) Run the command without executing any actions, so that no changes are made. The command will output a description of actions to be performed against the affected resources in the console window. Use this option if you are unsure of the overall impact of your command and wish to review it before committing to making changes.

Usage

Example 1

1
New-CmAzCustomExtension -settingsFile "extensions.yml"

Example 2

1
New-CmAzCustomExtension -settingsObject $extensions

Settings

Beta documentation
The following schema documentation is automatically generated as part of a recent roadmap task. There may be inaccuracies or incomplete information while we flush out bugs; please refer to the packed project settings examples where necessary.

Settings Root.

Component

component [string | null]

Value to determine what cmdlet should be dynamically loaded for these settings.

Names

names [array]

Contains containers with properties required to create standard names for resources.

Templates

templates [array]

Contains details required to deploy custom templates.

Name

name [string]

Name and path of the template. Defaults to _extension folder.

Location

location [string | null]

Location for subscription scoped deployment

Parameters

parameters [array | object]

Parameters to be passed to template.

Service

service [object | null]

Contains dependency and publish details for service location.

Dependencies

dependencies [object | null]

Contains dependency details for service location.

ResourceGroup

resourceGroup [string | null]

Local overriding dependency value to fetch existing resource type.

Examples

The following example files are automatically generated from the settings file schema definition to show how the specification can be used in practise. Cloudmarque can accept both JSON and YAML parameter files.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
  "component": "string",
  "names": [

  ],
  "templates": [
    {
      "name": "string",
      "location": "string",
      "parameters": [

      ],
      "service": {
        "dependencies": {
          "resourceGroup": "string"
        }
      }
    }
  ]
}
1
2
3
4
5
6
7
8
9
component: "string"    # Optional
names:     # Optional
  - templates:     # Optional
  - name: "string"    # Mandatory
    location: "string"    # Optional
    parameters:     # Mandatory
      -     service:     # Optional
      dependencies:     # Optional
        resourceGroup: "string"    # Optional