Completes the following:
- Creates Resource Group for runbook, dsc or both.
- Creates Automation account for runbook, dsc or both.
- Creates Key vault certificate if not available.
- Create RunAsAccount and RunAsCertificate for Automation accounts.
-
Optionally sync code repository (tvfc git github).
This command forms part of the Core 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.
-TagSettingsFile
Required. (String) File path for settings containing tags definition.
-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-CmAzCoreAutomation -SettingsFile "c:/directory/settingsFile.yml"
Example 2
1
New-CmAzCoreAutomation -SettingsObject $settings
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
-
Value to determine what cmdlet should be dynamically loaded for these settings.
- Location
-
Automation account deployment location.
- Name
-
Becomes part of the generated automation account name.
- Service
-
Contains dependency and publish details for service location.
- Dependencies
-
Contains dependency details for service location.
- Keyvault
-
Dependency value to fetch existing resource type.
- Workspace
-
Dependency value to fetch existing resource type.
- Publish
-
Contains publish details for service location.
- ResourceGroup
-
Value to publish on deployed resource type.
- Automation
-
Value to publish on deployed resource type.
- Automation
-
Contains details required to deploy an Automation Account.
- CertificateName
-
Name of certificate in an existing key vault.
- CertificateSecretName
-
Name of certificate secret in an existing key vault.
- SourceControl
-
Container for an existing repo in source control.
- KeyVaultPersonalAccessToken
-
Secret name of PAT token in existing key vault to access repo.
- Url
-
Url of source control repo.
- Type
-
Type of repo e.g Github.
Default:
github
- Branch
-
Existing branch within repo.
Default:
master
- FolderPath
-
Directory path of Runbook or DSC files.
Default:
/
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
21
22
23
24
25
26
{
"component": "string",
"location": "string",
"name": "string",
"service": {
"dependencies": {
"keyvault": "string",
"workspace": "string"
},
"publish": {
"resourceGroup": "string",
"automation": "string"
}
},
"automation": {
"certificateName": "string",
"certificateSecretName": "string",
"sourceControl": {
"keyVaultPersonalAccessToken": "string",
"url": "string",
"type": "github",
"branch": "master",
"folderPath": "/"
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
component: "string" # Optional
location: "string" # Mandatory
name: "string" # Mandatory
service: # Mandatory
dependencies: # Mandatory
keyvault: "string" # Mandatory
workspace: "string" # Mandatory
publish: # Mandatory
resourceGroup: "string" # Mandatory
automation: "string" # Mandatory
automation: # Mandatory
certificateName: "string" # Optional
certificateSecretName: "string" # Mandatory
sourceControl: # Optional
keyVaultPersonalAccessToken: "string" # Optional
url: "string" # Optional
type: "github" # Optional
branch: "master" # Optional
folderPath: "/" # Optional