generated from arcus-azure/arcus.github.template
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: publish v0.4.3 feature docs (#168)
* Docs: prepare publish of v0.4.3 docs * docs: correct small typo preventing proper visualisation of PowerShell-script * docs: update v0.4.3 index to set correct version + link to powershell gallery
- Loading branch information
Showing
16 changed files
with
1,390 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
title: "Scripts related to ARM templates" | ||
layout: default | ||
--- | ||
|
||
# ARM | ||
|
||
This module provides the following capabilities: | ||
- [Injecting content into an ARM template](#injecting-content-into-an-arm-template) | ||
|
||
## Installation | ||
|
||
To have access to the following features, you have to import the module: | ||
|
||
```powershell | ||
PS> Install-Module -Name Arcus.Scripting.ARM | ||
``` | ||
|
||
## Injecting content into an ARM template | ||
|
||
In certain scenarios, you have to embed content into an ARM template to deploy it. | ||
|
||
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. | ||
|
||
By using this script, you can inject external files inside your ARM template. | ||
|
||
| Parameter | Mandatory | Description | | ||
| --------- | --------- | ----------------------------------------------------------------------------------------------- | | ||
| `Path` | no | The file path to the ARM template to inject the external files into (default: `$PSScriptRoot`) | | ||
|
||
**Usage** | ||
Annotating content to inject: | ||
|
||
```json | ||
{ | ||
"type": "Microsoft.ApiManagement/service/apis", | ||
"name": "[concat(parameters('ApiManagement.Name'),'/', parameters('ApiManagement.Api.Name'))]", | ||
"apiVersion": "2019-01-01", | ||
"properties": { | ||
"subscriptionRequired": true, | ||
"path": "demo", | ||
"value": "${ FileToInject='.\\..\\openapi\\api-sample.json', InjectAsJsonObject}$", | ||
"format": "swagger-json" | ||
}, | ||
"tags": "[variables('Tags')]", | ||
"dependsOn": [ | ||
] | ||
} | ||
``` | ||
|
||
Injecting the content: | ||
|
||
```powershell | ||
PS> Inject-ArmContent -Path deploy\arm-template.json | ||
``` | ||
|
||
**Recommendations** | ||
Always inject the content in your ARM template as soon as possible, preferably during release build that creates the artifact |
Oops, something went wrong.