[英]How to use Terraform to approve a Managed Private Endpoint on a Blob Storage ADLS Gen2?
I have created several managed private endpoints on a Synapse Analytics workspace using Terraform. Now I do not know how to "Approve" them since I cannot seem to find the right resource to perform this action.我使用 Terraform 在 Synapse Analytics 工作区上创建了几个托管私有端点。现在我不知道如何“批准”它们,因为我似乎找不到合适的资源来执行此操作。
To do it manually I need to go to the Storage account -> Networks -> Private Endpoints, selected the ones to be "Approved" and press Approve.要手动执行此操作,我需要将 go 转到存储帐户 -> 网络 -> 专用端点,选择要“批准”的那些,然后按批准。
If you're still interested, I've done this in Terraform like so:如果您仍然感兴趣,我已经在 Terraform 中这样做了:
resource "null_resource" "endpoint_approval" {
depends_on = [module.sql_managed_endpoint, module.storage_managed_endpoint]
provisioner "local-exec" {
command = <<-EOT
$sql_id = $(az network private-endpoint-connection list --id ${module.mssql_server.id} --query "[?contains(properties.privateEndpoint.id, 'vnet')].id" -o json) | ConvertFrom-Json
$storage_id = $(az network private-endpoint-connection list --id ${module.storage_account.storage_account_id} --query "[?contains(properties.privateEndpoint.id, 'vnet')].id" -o json) | ConvertFrom-Json
az network private-endpoint-connection approve --id $sql_id --description "Approved in Terraform"
az network private-endpoint-connection approve --id $storage_id --description "Approved in Terraform"
EOT
interpreter = ["pwsh", "-Command"]
}
}
As of today, you can't approve a Managed Private Endpoint using Terraform.
从今天开始,您无法使用 Terraform 批准托管专用端点。
You may checkout the Synapse Managed Private Endpoint - auto_approval option which has already asked in the hashicorp.您可以查看已在 hashicorp 中询问的Synapse Managed Private Endpoint - auto_approval 选项。
Note: Azure PowerShell
and Azure CLI
are the preferred methods for managing Private Endpoint connections on Microsoft Partner Services or customer owned services.注意:
Azure PowerShell
和Azure CLI
是管理 Microsoft 合作伙伴服务或客户拥有的服务上的专用终结点连接的首选方法。
For more details, refer to Manage Private Endpoint connections on a customer/partner owned Private Link service .有关详细信息,请参阅管理客户/合作伙伴拥有的专用链接服务上的专用终结点连接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.