< Back

Set-AzureArmTemplateFile

Sat Jan 11, 2020 10:09 am

NAME Set-AzureArmTemplateFile



SYNOPSIS

Upload the ARM template files on local filesystem to blob storage of Azure storage.





SYNTAX

Set-AzureArmTemplateFile -LocalBasePath <String> -StorageAccountName <String> -ResourceGroupName <String>

[-ContainerName <String>] [-Force] [<CommonParameters>]



Set-AzureArmTemplateFile -LocalBasePath <String> -StorageAccountName <String> -StorageAccountKey <String>

[-ContainerName <String>] [-Force] [<CommonParameters>]





DESCRIPTION

This cmdlet helping to ARM template making by upload the ARM template files on local filesystem to blob storage of

Azure storage. When you making linked ARM template, this cmdlet is especially helpful.





PARAMETERS

-LocalBasePath <String>

The path of the folder on local filesystem that contains the ARM templates.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-StorageAccountName <String>

The storage account name to upload the ARM templates.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ResourceGroupName <String>

The resource group name that it contains the storage account of StorageAccountName parameter.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-StorageAccountKey <String>

The storage account key for storage account of StorageAccountName parameter.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ContainerName <String>

The container name to upload the ARM templates. This parameter is optional. Default container name is

'armtemplate'.



Required? false

Position? named

Default value armtemplate

Accept pipeline input? false

Accept wildcard characters? false



-Force [<SwitchParameter>]

This switch parameter is optional. If you use this switch, overwrite the existing ARM templates in the

container.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.Management.Automation.PSObject[]





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Set-AzureArmTemplateFile -LocalBasePath 'C:\\TemplateWork' -StorageAccountName 'abcd1234' -ResourceGroupName

'ArmTemplateDev-RG' -Force



This example is upload the ARM template files from under 'C:\\TemplateWork' folder with recursive. You need execute

Login-AzureRmAccount cmdlet before execute this cmdlet because this example use ResourceGroupName parameter.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Set-AzureArmTemplateFile -LocalBasePath 'C:\\TemplateWork' -StorageAccountName 'abcd1234' -StorageAccountKey

'dWLe7OT3P0HevzLeKzRlk4j4eRws7jHStp0C4XJtQJhuH4p5EOP+vLcK1w8sZ3QscGLy50DnOzQoiUbpzXD9Jg==' -Force



This example is upload the ARM template files from under 'C:\\TemplateWork' folder with recursive.











RELATED LINKS

PowerShell Gallery: https://www.powershellgallery.com/packa ... ateHelper/

GitHub: https://github.com/tksh164/AzureArmTemp ... hellModule

Get-AzureArmTemplateDeployUri