Skip to content

Commit 8f458ab

Browse files
authored
added docs for version 0.6.0 (#288)
Co-authored-by: Pim Simons <pim.simons@codit.eu>
1 parent 2a82457 commit 8f458ab

20 files changed

Lines changed: 24491 additions & 11603 deletions

docs/package-lock.json

Lines changed: 22382 additions & 11602 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"docusaurus": "docusaurus",
77
"start": "docusaurus start",
8-
"build": "docusaurus build --config ./docusaurus.build.config.js" ,
8+
"build": "docusaurus build --config ./docusaurus.build.config.js",
99
"swizzle": "docusaurus swizzle",
1010
"deploy": "docusaurus deploy",
1111
"clear": "docusaurus clear",
@@ -20,6 +20,7 @@
2020
"@mdx-js/react": "^1.6.21",
2121
"@svgr/webpack": "^5.5.0",
2222
"clsx": "^1.1.1",
23+
"docusaurus": "^1.14.7",
2324
"file-loader": "^6.2.0",
2425
"prism-react-renderer": "^1.2.1",
2526
"react": "^17.0.1",
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: "Arcus - Scripting"
3+
layout: default
4+
slug: /
5+
sidebar_label: Welcome
6+
---
7+
8+
# Installation
9+
10+
The Arcus.Scripting modules can be found on the PowerShell gallery.
11+
Install the latest version of a module by executing the following command:
12+
13+
```powershell
14+
PS> Install-Module -Name Arcus.Scripting.All
15+
```
16+
17+
For more granular packages we recommend reading the documentation.
18+
19+
# Features
20+
21+
* Automate Azure API Management tasks ([powershell](./02-Features/powershell/azure-api-management.md))
22+
* Automate Azure App Service tasks ([powershell](./02-Features/powershell/azure-app-service.md))
23+
* Automate Azure Data Factory tasks ([powershell](./02-Features/powershell/azure-data-factory.md))
24+
* Automate Azure DevOps tasks ([powershell](./02-Features/powershell/azure-devops.md))
25+
* Automate Azure Integration Account tasks ([powershell](./02-Features/powershell/azure-integration-account.md))
26+
* Automate Azure Key Vault tasks ([powershell](./02-Features/powershell/azure-key-vault.md))
27+
* Automate Azure Logic Apps tasks ([powershell](./02-Features/powershell/azure-logic-apps.md))
28+
* Automate Azure Resource Manager (ARM) tasks ([powershell](./02-Features/powershell/arm.md))
29+
* Automate Azure Security tasks ([powershell](./02-Features/powershell/azure-security.md))
30+
* Automate Azure SQL tasks ([powershell](./02-Features/powershell/azure-sql.md))
31+
* Automate Azure Storage tasks ([powershell](./02-Features/powershell/azure-storage/azure-storage-all.md))
32+
* Azure Table Storage tasks ([powershell](./02-Features/powershell/azure-storage/azure-storage-table.md))
33+
* Azure Blob Storage tasks ([powershell](./02-Features/powershell/azure-storage/azure-storage-blob.md))
34+
* Azure File Share Storage tasks ([powershell](./02-Features/powershell/azure-storage/azure-storage-fileshare.md))
35+
36+
# License
37+
This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application.
38+
39+
*[Full license here](https://github.com/arcus-azure/arcus.scripting/blob/master/LICENSE)*
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: "ARM templates"
3+
layout: default
4+
---
5+
6+
# ARM
7+
8+
This module provides the following capabilities:
9+
- [ARM](#arm)
10+
- [Installation](#installation)
11+
- [Injecting content into an ARM template](#injecting-content-into-an-arm-template)
12+
- [Usage](#usage)
13+
- [Injection Instructions](#injection-instructions)
14+
- [Recommendations](#recommendations)
15+
16+
## Installation
17+
18+
To have access to the following features, you have to import the module:
19+
20+
```powershell
21+
PS> Install-Module -Name Arcus.Scripting.ARM
22+
```
23+
24+
## Injecting content into an ARM template
25+
26+
In certain scenarios, you have to embed content into an ARM template to deploy it.
27+
28+
However, the downside of it is that it's buried inside the template and tooling around it might be less ideal - An example of this is OpenAPI specifications you'd want to deploy.
29+
30+
By using this script, you can inject external files inside your ARM template.
31+
32+
| Parameter | Mandatory | Description |
33+
| --------- | --------- | ----------------------------------------------------------------------------------------------- |
34+
| `Path` | no | The file path to the ARM template to inject the external files into (default: `$PSScriptRoot`) |
35+
36+
### Usage
37+
Annotating content to inject:
38+
39+
```json
40+
{
41+
"type": "Microsoft.ApiManagement/service/apis",
42+
"name": "[concat(parameters('ApiManagement.Name'),'/', parameters('ApiManagement.Api.Name'))]",
43+
"apiVersion": "2019-01-01",
44+
"properties": {
45+
"subscriptionRequired": true,
46+
"path": "demo",
47+
"value": "${ FileToInject='.\\..\\openapi\\api-sample.json', InjectAsJsonObject}$",
48+
"format": "swagger-json"
49+
},
50+
"tags": "[variables('Tags')]",
51+
"dependsOn": [
52+
]
53+
}
54+
```
55+
56+
Injecting the content:
57+
58+
```powershell
59+
PS> Inject-ArmContent -Path deploy\arm-template.json
60+
```
61+
62+
### Injection Instructions
63+
64+
It is possible to supply injection instructions in the injection annotation, this allows you to add specific functionality to the injection. These are the available injection instructions:
65+
66+
| Injection Instruction | Description |
67+
| --------------------- | ----------------------------------------------------------------------------------------------------------- |
68+
| `EscapeJson` | Replace double quotes not preceded by a backslash with escaped quotes |
69+
| `ReplaceSpecialChars` | Replace newline characters with literal equivalents, tabs with spaces and `"` with `\"` |
70+
| `InjectAsJsonObject` | Tests if the content is valid JSON and makes sure the content is injected without surrounding double quotes |
71+
72+
Usage of multiple injection instructions is supported as well, for example if you need both the `EscapeJson` and `ReplaceSpecialChars` functionality.
73+
74+
Some examples are:
75+
```powershell
76+
${ FileToInject = ".\Parent Directory\file.xml" }
77+
${ FileToInject = ".\Parent Directory\file.xml", EscapeJson, ReplaceSpecialChars }
78+
${ FileToInject = '.\Parent Directory\file.json', InjectAsJsonObject }
79+
```
80+
81+
### Recommendations
82+
Always inject the content in your ARM template as soon as possible, preferably during release build that creates the artifact

0 commit comments

Comments
 (0)