Skip to content

Commit d288d3b

Browse files
authored
feat: Add Edit-LineEnding function and Invoke-EABillingSPNPermissionsSetup fucntions (#337)
# Pull Request ## Description Add Edit-LineEnding function and Invoke-EABillingSPNPermissionsSetup fucntions ## License By submitting this pull request, I confirm that my contribution is made under the terms of the projects associated license.
1 parent f2033d8 commit d288d3b

32 files changed

+409
-234
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
trim_trailing_whitespace = true
6+
insert_final_newline = true
7+
8+
[*.{ps1,psm1,psd1}]
9+
indent_style = space
10+
indent_size = 4
11+
12+

.github/workflows/PullRequest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
pwsh: ['7.1.3']
16+
pwsh: ['7.1.3', '7.5.0']
1717
steps:
1818
- name: Check out repository
1919
uses: actions/checkout@v3

.github/workflows/super-linter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
# VALIDATE_TERRAFORM_TERRASCAN: true # disabled for now as does not support TF 1.3 optional(type, default)
4343
VALIDATE_TERRAFORM_TFLINT: true
4444
VALIDATE_YAML: true
45+
VALIDATE_EDITORCONFIG: true
4546
# VALIDATE_GO: true # Disabled because it down not work :(
4647
# Additional settings:
4748
# If a shell script is not executable, the bash-exec

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ templates/.test_azuredevops
5454
templates/.test_github
5555
.vscode/settings.json
5656
/ALZ
57-
.tools
57+
.tools

actions_bootstrap.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{
2929
ModuleName = 'platyPS'
3030
ModuleVersion = '0.12.0'
3131
}))
32+
# Required for Invoke-EABillingSPNPermissionsSetup to work
33+
$null = $modulesToInstall.Add(([PSCustomObject]@{
34+
ModuleName = 'Az.Accounts'
35+
ModuleVersion = '2.10.4'
36+
}))
37+
$null = $modulesToInstall.Add(([PSCustomObject]@{
38+
ModuleName = 'Az.Resources'
39+
ModuleVersion = '6.5.0'
40+
}))
3241

3342
'Installing PowerShell Modules'
3443
foreach ($module in $modulesToInstall) {

docs/CHANGELOG.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/ALZ.Settings.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# specify the minimum required major PowerShell version that the build script should validate
2-
[version]$script:requiredPSVersion = '5.1.0'
2+
[version]$script:requiredPSVersion = '7.1.3'

src/ALZ/ALZ.psd1

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,33 @@
99
@{
1010

1111
# Script module or binary module file associated with this manifest.
12-
RootModule = 'ALZ.psm1'
12+
RootModule = 'ALZ.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.1.0'
15+
ModuleVersion = '0.1.0'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
1919

2020
# ID used to uniquely identify this module
21-
GUID = '74a4385f-281e-4776-bd7c-3b6a09d6ba63'
21+
GUID = '74a4385f-281e-4776-bd7c-3b6a09d6ba63'
2222

2323
# Author of this module
24-
Author = 'Microsoft Corporation'
24+
Author = 'Microsoft Corporation'
2525

2626
# Company or vendor of this module
27-
CompanyName = 'Microsoft Corporation'
27+
CompanyName = 'Microsoft Corporation'
2828

2929
# Copyright statement for this module
30-
Copyright = '(c) Microsoft Corporation. All rights reserved.'
30+
Copyright = '(c) Microsoft Corporation. All rights reserved.'
3131

3232
# Description of the functionality provided by this module
33-
Description = 'Azure Landing Zones Powershell Module'
33+
Description = 'Azure Landing Zones Powershell Module'
3434

3535
CompatiblePSEditions = 'Core'
3636

3737
# Minimum version of the PowerShell engine required by this module
38-
PowerShellVersion = '7.4'
38+
PowerShellVersion = '7.4'
3939

4040
# Name of the PowerShell host required by this module
4141
# PowerShellHostName = ''
@@ -53,7 +53,16 @@
5353
# ProcessorArchitecture = ''
5454

5555
# Modules that must be imported into the global environment prior to importing this module
56-
RequiredModules = @()
56+
RequiredModules = @(
57+
@{
58+
ModuleName = 'Az.Accounts'
59+
ModuleVersion = '2.10.4'
60+
},
61+
@{
62+
ModuleName = 'Az.Resources'
63+
ModuleVersion = '6.5.0'
64+
}
65+
)
5766

5867
# Assemblies that must be loaded prior to importing this module
5968
# RequiredAssemblies = @()
@@ -71,19 +80,20 @@
7180
# NestedModules = @()
7281

7382
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
74-
FunctionsToExport = @(
83+
FunctionsToExport = @(
7584
'Test-AcceleratorRequirement',
76-
'Deploy-Accelerator'
85+
'Deploy-Accelerator',
86+
'Invoke-EABillingSPNPermissionsSetup'
7787
)
7888

7989
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
80-
CmdletsToExport = @()
90+
CmdletsToExport = @()
8191

8292
# Variables to export from this module
83-
VariablesToExport = '*'
93+
VariablesToExport = '*'
8494

8595
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
86-
AliasesToExport = @()
96+
AliasesToExport = @()
8797

8898
# DSC resources to export from this module
8999
# DscResourcesToExport = @()
@@ -95,7 +105,7 @@
95105
# FileList = @()
96106

97107
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
98-
PrivateData = @{
108+
PrivateData = @{
99109

100110
PSData = @{
101111

@@ -112,7 +122,7 @@
112122
LicenseUri = 'https://github.com/Azure/ALZ-PowerShell-Module/blob/main/LICENSE'
113123

114124
# A URL to the main website for this project.
115-
ProjectUri = 'https://github.com/Azure/ALZ-Powershell-Module'
125+
ProjectUri = 'https://github.com/Azure/ALZ-PowerShell-Module'
116126

117127
# A URL to an icon representing this module.
118128
IconUri = 'https://raw.githubusercontent.com/Azure/ALZ-PowerShell-Module/main/docs/rsz_alzlogo.png'

src/ALZ/ALZ.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ foreach ($file in @($public + $private)) {
2828

2929

3030
# export all public functions
31-
Export-ModuleMember -Function $public.Basename -Alias *
31+
Export-ModuleMember -Function $public.Basename -Alias *

src/ALZ/Private/Config-Helpers/Convert-BicepConfigToInputConfig.ps1

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,52 +14,52 @@ function Convert-BicepConfigToInputConfig {
1414
if ($PSCmdlet.ShouldProcess("Parse Interface Variables into Config", "modify")) {
1515

1616
$configItems = [PSCustomObject]@{}
17-
if($appendToObject -ne $null) {
17+
if ($appendToObject -ne $null) {
1818
$configItems = $appendToObject
1919
}
2020

2121
Write-Verbose $validators
2222

23-
foreach($variable in $bicepConfig.inputs.PSObject.Properties) {
23+
foreach ($variable in $bicepConfig.inputs.PSObject.Properties) {
2424
Write-Verbose "Parsing variable $($variable.Name)"
2525
$description = $variable.Value.description
2626

2727
$configItem = [PSCustomObject]@{}
2828
$configItem | Add-Member -NotePropertyName "Source" -NotePropertyValue $variable.Value.source
2929
$configItem | Add-Member -NotePropertyName "Value" -NotePropertyValue ""
3030

31-
if($variable.Value.PSObject.Properties.Name -contains "sourceInput") {
31+
if ($variable.Value.PSObject.Properties.Name -contains "sourceInput") {
3232
$configItem | Add-Member -NotePropertyName "SourceInput" -NotePropertyValue $variable.Value.sourceInput
3333
}
3434

35-
if($variable.Value.PSObject.Properties.Name -contains "pattern") {
35+
if ($variable.Value.PSObject.Properties.Name -contains "pattern") {
3636
$configItem | Add-Member -NotePropertyName "Pattern" -NotePropertyValue $variable.Value.pattern
3737
}
3838

39-
if($variable.Value.PSObject.Properties.Name -contains "process") {
39+
if ($variable.Value.PSObject.Properties.Name -contains "process") {
4040
$configItem | Add-Member -NotePropertyName "Process" -NotePropertyValue $variable.Value.process
4141
}
4242

43-
if($variable.Value.PSObject.Properties.Name -contains "default") {
43+
if ($variable.Value.PSObject.Properties.Name -contains "default") {
4444
$defaultValue = $variable.Value.default
4545
$configItem | Add-Member -NotePropertyName "DefaultValue" -NotePropertyValue $defaultValue
4646
}
4747

48-
if($variable.Value.PSObject.Properties.Name -contains "validation") {
48+
if ($variable.Value.PSObject.Properties.Name -contains "validation") {
4949
$validationType = $variable.Value.validation
5050
$validator = $validators.PSObject.Properties[$validationType].Value
5151
$description = "$description ($($validator.Description))"
5252
Write-Verbose "Adding $($variable.Value.validation) validation for $($variable.Name). Validation type: $($validator.Type)"
53-
if($validator.Type -eq "AllowedValues"){
53+
if ($validator.Type -eq "AllowedValues") {
5454
$configItem | Add-Member -NotePropertyName "AllowedValues" -NotePropertyValue $validator.AllowedValues
5555
}
56-
if($validator.Type -eq "Valid"){
56+
if ($validator.Type -eq "Valid") {
5757
$configItem | Add-Member -NotePropertyName "Valid" -NotePropertyValue $validator.Valid
5858
}
5959
$configItem | Add-Member -NotePropertyName "Validator" -NotePropertyValue $validationType
6060
}
6161

62-
if($variable.Value.PSObject.Properties.Name -contains "targets") {
62+
if ($variable.Value.PSObject.Properties.Name -contains "targets") {
6363
$configItem | Add-Member -NotePropertyName "targets" -NotePropertyValue $variable.Value.targets
6464
}
6565

@@ -69,4 +69,4 @@ function Convert-BicepConfigToInputConfig {
6969
}
7070

7171
return $configItems
72-
}
72+
}

0 commit comments

Comments
 (0)