Skip to content

Commit 901de9d

Browse files
authored
Add Azure PS modules (#33)
1 parent e4eb6e0 commit 901de9d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

windows.ltsc2019/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ ARG Aws_Cli_Version=2.0.60
77
ARG Aws_Iam_Authenticator_Version=0.5.3
88
ARG Aws_Powershell_Version=4.1.2
99
ARG Azure_Cli_Version=2.14.0
10+
ARG Azure_Powershell_Version=4.5.0
1011
ARG Eks_Cli_Version=0.25.0
1112
ARG Google_Cloud_Cli_Version=339.0.0
1213
ARG Helm_Version=3.3.0
@@ -45,11 +46,16 @@ RUN choco install awscli -y --version $Env:Aws_Cli_Version --no-progress
4546
# Install the AWS IAM Authenticator
4647
RUN choco install aws-iam-authenticator -y --version $Env:Aws_Iam_Authenticator_Version --no-progress
4748

48-
# # Install AWS PowerShell module
49+
# # Install AWS PowerShell modules
4950
# # https://docs.aws.amazon.com/powershell/latest/userguide/pstools-getting-set-up-windows.html#ps-installing-awspowershellnetcore
5051
RUN Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force; `
5152
Install-Module -name AWSPowerShell.NetCore -RequiredVersion $Env:Aws_Powershell_Version -Force
5253

54+
#Install Azure PowerShell modules
55+
# https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.6.1
56+
RUN Install-Module -Force -Name Az -AllowClobber -Scope AllUsers -MaximumVersion $Env:Azure_Powershell_Version; `
57+
Enable-AzureRmAlias -Scope LocalMachine
58+
5359
# # Install NodeJS
5460
RUN choco install nodejs-lts -y --version $Env:Node_Version --no-progress
5561

windows.ltsc2019/spec/windows.ltsc2019.tests.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ Describe 'installed dependencies' {
3131
$output.'azure-cli' | Should -Be '2.14.0'
3232
$LASTEXITCODE | Should -be 0
3333
}
34+
35+
It 'has az powershell module installed' {
36+
(Get-Module Az -ListAvailable).Version.ToString() | should -be '4.5.0'
37+
}
3438

3539
It 'has aws cli installed' {
3640
aws --version 2>&1 | Should -Match '2.0.60'

0 commit comments

Comments
 (0)