azure - Azurerm 中导入 Az WebApp KeyVault 证书的替代方案

标签 azure powershell

计划将 SSL 证书从 Key Vault 导入到 Web 应用程序。

在 Az.websites 中发现 Import-AzWebAppKeyVaultCertificate 执行上述任务,但上述任务在 azure 管道中失败,我正在寻找 AzureRm 中的任何替代方案至于我的研究,我在文档中找不到任何内容。

Az 文档 - https://learn.microsoft.com/en-us/powershell/module/az.websites/import-azwebappkeyvaultcertificate?view=azps-6.0.0&viewFallbackFrom=azps-4.8.0

我想知道使用 AzureRm 命令将 ssl 证书从 keyvault 导入到 Web 应用程序的任何特定命令

最佳答案

你尝试过Azure CLI吗?命令?

az login

# upload certificate to Azure key vault
az keyvault certificate import --file "E:\Cert\P2SChildCert.pfx" --password "" --name "test1234" --vault-name "testkey08"

# download certificate as pfx file
az keyvault secret download --file "test2.pfx" --vault-name "testkey08" --name "test1234" --encoding base64

# upload the pfx file to Azue web app
az webapp config ssl upload --certificate-file "test2.pfx"  --name "andywebsite" --resource-group "andywebbot"  --certificate-password "" --query thumbprint --output tsv

关于azure - Azurerm 中导入 Az WebApp KeyVault 证书的替代方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67897949/

相关文章:

azure - 创建与 azure 存储的连接时资源名称无效

powershell - 如何快速更改 shell 文件夹以匹配当前打开的文件

powershell - 什么是 PowerShell 中的可扩展字符串

asp.net - 尝试将图像上传到 Azure 但收到 404

azure - 如何从 Web 应用程序 (AZURE) 按需启动 AKS 中的 Linux 脚本

c# - ThreadPool SetMinThreads - 设置它的影响

powershell - 如何在PowerShell中定义子例程

windows - 批处理脚本条件下的 PowerShell 命令

xml - Powershell - 将复杂的 XML 转换为 CSV

azure - 在 COSMOS 中投影表并将其与 "Not In"子句一起使用