ResourceModules icon indicating copy to clipboard operation
ResourceModules copied to clipboard

document and command samples for Mac/Linux users

Open ozbillwang opened this issue 2 years ago • 5 comments

Description

ref : https://github.com/Azure/ResourceModules/blob/main/docs/wiki/The%20library%20-%20Module%20usage.md

Currently both sample for PowerUser and Azure CLI are for Windows Users

I'd like to change the sample part of Azure CLI to pure Mac/Linux usage:

From

az group create --name 'ExampleGroup' --location "Central US"
$inputObject = @(
    '--name',           'ExampleDeployment',
    '--resource-group', 'ExampleGroup',
    '--template-file',  "$home\ResourceModules\arm\Microsoft.KeyVault\vault\deploy.bicep",
    '--parameters',     'storageAccountType=Standard_GRS',
)
az deployment group create @inputObject

to

az group create --name 'ExampleGroup' --location "Central US"
inputObject=(
    '--name'           'ExampleDeployment'
    '--resource-group' 'ExampleGroup'
    '--template-file'  "$home/ResourceModules/arm/Microsoft.KeyVault/vault/deploy.bicep"
    '--parameters'     'storageAccountType=Standard_GRS'
)
az deployment group create ${inputObject[@]}

if you agree this idea, I can raise PR to update it

ozbillwang avatar Apr 08 '22 21:04 ozbillwang

Ok, raised the PR, let's see

https://github.com/Azure/ResourceModules/pull/1236

ozbillwang avatar Apr 08 '22 22:04 ozbillwang

I also start a dicussion for Mac/Linux users on how to use these modules in this repo

https://github.com/Azure/ResourceModules/discussions/1237

join the dicussion, if you have similar requirement

ozbillwang avatar Apr 08 '22 22:04 ozbillwang

@ozbillwang will you create a new PR regarding the new WIKI page?

rahalan avatar May 17 '22 16:05 rahalan

snippets will be tested on Mac/Linux with PS core to check if the current code works

eriqua avatar May 26 '22 15:05 eriqua

Happy to support and test snippets on MacOS under pwsh if needed.

segraef avatar Jul 27 '22 07:07 segraef