generated from arcus-azure/arcus.github.template
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upload private certificats to Azure API Management certificate …
…store (#153) * feat: upload private certificats to Azure API Management certificate store * Update docs/preview/features/powershell/azure-api-management.md Co-authored-by: Maxim Braekman <[email protected]> * Update docs/preview/features/powershell/azure-api-management.md Co-authored-by: Maxim Braekman <[email protected]> * Update docs/preview/features/powershell/azure-api-management.md Co-authored-by: Maxim Braekman <[email protected]> * Update src/Arcus.Scripting.ApiManagement/Arcus.Scripting.ApiManagement.psm1 Co-authored-by: Maxim Braekman <[email protected]> * Update Arcus.Scripting.ApiManagement.psm1 * Update Upload-AzApiManagementCertificate.ps1 * Update src/Arcus.Scripting.ApiManagement/Arcus.Scripting.ApiManagement.psm1 Co-authored-by: Maxim Braekman <[email protected]> * Update Upload-AzApiManagementCertificate.ps1 Co-authored-by: Maxim Braekman <[email protected]>
- Loading branch information
1 parent
9187132
commit f98cb54
Showing
6 changed files
with
91 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/Arcus.Scripting.ApiManagement/Scripts/Upload-AzApiManagementCertificate.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
param( | ||
[Parameter(Mandatory = $true)][string] $ResourceGroupName = $(throw "Resource group name is required"), | ||
[Parameter(Mandatory = $true)][string] $ServiceName = $(throw "API management service name is required"), | ||
[Parameter(Mandatory = $true)][string] $CertificateFilePath = $(throw "Full file path to certificate is required"), | ||
[Parameter(Mandatory = $true)][string] $CertificatePassword = $(throw "Password for certificate is required") | ||
) | ||
|
||
$context = New-AzApiManagementContext -ResourceGroupName $ResourceGroupName -ServiceName $ServiceName | ||
Write-Host "Using API Management instance '$ServiceName' in resource group '$ResourceGroupName'" | ||
|
||
Write-Verbose "Uploading private certificate at '$CertificateFilePath'..." | ||
New-AzApiManagementCertificate -Context $context -PfxFilePath $CertificateFilePath -PfxPassword $CertificatePassword | ||
Write-Host "Uploaded private certificate at '$CertificateFilePath'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters