During DevOps development, interacting with Azure resources was done with PowerShell scripts using the AzureRM modules.
Setting up new projects with similar needs, often meant that we were forced to copy the scripts into the source control of this new project, resulting in a lot of duplications, and due to the lack of a real management system, there was no way to follow up on any changes. We were forced to manually change all the scripts spread across all the projects.
This problem leads us to develop the Arcus Scripting-repository, where we define, test, and manage the PowerShell scripts that can help you interact with Azure resources during development or deployment. While creating this repository, we decided to remove any references to the old AzureRM-library and make use of the cross-platform Az PowerShell library instead, making our scripts even more relevant.
Come and take a look at what this first version has to offer!
All features described below are published in separate PowerShell modules, published at the PowerShell Gallery.
Azure API Management
Arcus.Scripting.ApiManagement PowerShell module already has a lot of functionality and is even the most populated module in this first version.
The functionality included in this version ranges from creating, importing, to removing resources on an Azure API Management instance:
- Creating a new API operation in the Azure API Management instance
- Importing a policy to a product in the Azure API Management instance
- Importing a policy to an API in the Azure API Management instance
- Importing a policy to an operation in the Azure API Management instance
- Removing all Azure API Management defaults from the instance
See the docs for more information on these functions.
Azure Key Vault
The next module has been specifically designed to gather functionality related to the Azure Key Vault.
While loads of additional functionalities can be included to assist you in interacting with this Azure resource, the
Arcus.Scripting.KeyVault PowerShell module is currently limited to the following functions:
The following example shows how we can get all the access policies from an Azure Key Vault into a PowerShell object.
See the dedicated docs pages for more info on this subject.
Azure Data Factory
We’re always looking to improve user-friendliness, and we aim to split up enable/disable, setting/getting, start/stop… functionality in 2 different functions, instead of a single function that does both according to given arguments. This makes things much more straight-forward.
A good example of this approach is the creation of the
Arcus.Scripting.DataFactory PowerShell module, which has two separate functions allowing you to enable or disable a trigger of an Azure Data Factory pipeline:
The following example shows how we can enable the Azure Data Factory trigger:
See the docs for more information on these two functions.
Azure (Table) Storage
Arcus.Scripting.Storage.Table PowerShell module is the start of a set of Azure Storage Account-related scripts that will become part of the
Arcus.Scripting.Storage PowerShell module.
For now, we only have the Azure Table Storage module which contains functionality to (re-)create a table within an Azure Storage Account:
Azure Resource Manager (ARM)
Arcus.Scripting.ARM PowerShell module has been built to help you in manipulating ARM templates before triggering a deployment, allowing you to reduce the complexity of these templates.
Currently, this module contains the capability to inject content into an ARM template, allowing you to control the formatting of the injected content:
The docs show you an example of injecting OpenAPI specifications into an ARM template.
Something that came up a few times, but was never actually seen as separate functionality, was the possibility to set Azure DevOps pipeline variables. As a result, this functionality was scattered across scripts and was making those unnecessarily complex. By separating this functionality into an Azure DevOps dedicated module named
Arcus.Scripting.DevOps, we have made using it a lot more user-friendly and easier to maintain.
Set-AzDevOpsVariable takes in the name and the value of the variable. It’s as simple as that!
What's on the Horizon?
But this is only the beginning of a great scripting story!
Here are some features that are on the horizon:
- Azure API Management
- Azure Key Vault
- Azure Logic Apps
Are we missing something? Don’t hesitate to make a suggestion and we’re happy to help where we can!
Thanks for reading!
Subscribe to our RSS feed