Skip to content

Commit 8d12fe6

Browse files
committed
Updated script to use certificate name
1 parent a76b381 commit 8d12fe6

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

Deployment/Deploy-Resources.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ function Set-GMMResources {
404404

405405
$parameterObject = Get-TemplateAsHashtable -TemplateFilePath $ParameterFilePath
406406
$setRBACPermissions = $parameterObject.parameters["setRBACPermissions"].value ?? $false;
407+
$certificateName = $parameterObject.parameters["certificateName"].value ?? "not-set";
407408

408409
# deploy resource groups
409410
Write-Host "`nCreating resource groups"
@@ -438,7 +439,8 @@ function Set-GMMResources {
438439
-SolutionAbbreviation $SolutionAbbreviation `
439440
-EnvironmentAbbreviation $EnvironmentAbbreviation `
440441
-ScriptsDirectory "$scriptsDirectory\Scripts" `
441-
-SecondaryTenantId $SecondaryTenantId
442+
-SecondaryTenantId $SecondaryTenantId `
443+
-CertificateName $certificateName
442444

443445
# add app registrations to common parameters
444446
$commonParametersObject.parameters["apiAppClientId"] = @{ "value" = $appRegistrations.APIApplicationId }
@@ -799,7 +801,9 @@ function Set-GMMAppRegistrations {
799801
[Parameter(Mandatory = $false)]
800802
[System.Nullable[Guid]]$SecondaryTenantId,
801803
[Parameter(Mandatory = $False)]
802-
[boolean] $SkipIfApplicationExists = $True
804+
[boolean] $SkipIfApplicationExists = $True,
805+
[Parameter(Mandatory = $False)]
806+
[string] $CertificateName
803807
)
804808

805809
Write-Host "`nSetting GMM App Registrations"
@@ -842,6 +846,7 @@ function Set-GMMAppRegistrations {
842846
-SaveToKeyVault $true `
843847
-SkipPrompts $true `
844848
-SkipIfApplicationExists $true `
849+
-CertificateName $CertificateName `
845850
-Clean $false
846851

847852
$null = Set-AzContext -Tenant $mainTenantId

Deployment/localTemplate.bicep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ param setRBACPermissions bool = true
1818
param authenticationType string
1919
param skipMailNotifications bool = false
2020
param isMailApplicationPermissionGranted bool = false
21+
param certificateName string = 'not-set'
2122

2223
// prereqs parameters
2324
// parameters for prereqs key vault

Deployment/parameters.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@
190190
"description": "The type of authentication to use for the App Configuration. UserAssignedManagedIdentity is recommended and will use <solution>-identity-<environment>-Graph. ClientSecret and Certificate will use <solution>-Graph-<environment>."
191191
}
192192
},
193+
"certificateName": {
194+
"value": "not-set",
195+
"metadata": {
196+
"description": "The name of the certificate in the Key Vault. This is required if the authenticationType is Certificate. This is only used by application <solutionAbbreviation>-Graph-<EnvironmentAbbreviation>. See https://learn.microsoft.com/en-us/azure/key-vault/certificates/quick-create-portal for more information on certificates."
197+
}
198+
},
193199
"pipeline": {
194200
"value": "PopulateDestinationPipeline"
195201
},

0 commit comments

Comments
 (0)