From 734cfd174823cfd4cc436320106b60a1640f39de Mon Sep 17 00:00:00 2001 From: neil-yechenwei Date: Wed, 12 Feb 2025 13:04:30 +0800 Subject: [PATCH] Add example for Microsoft.Storage_storageAccounts@2021-09-01 --- .../with_private_endpoint/main.tf | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/examples/Microsoft.Storage_storageAccounts@2021-09-01/with_private_endpoint/main.tf b/examples/Microsoft.Storage_storageAccounts@2021-09-01/with_private_endpoint/main.tf index 5c3e2bd97..05690be8e 100644 --- a/examples/Microsoft.Storage_storageAccounts@2021-09-01/with_private_endpoint/main.tf +++ b/examples/Microsoft.Storage_storageAccounts@2021-09-01/with_private_endpoint/main.tf @@ -240,7 +240,8 @@ resource "azurerm_private_endpoint" "blob" { name = "${var.resource_name}-private-endpoint-connection" private_connection_resource_id = azapi_resource.storageAccount.id subresource_names = ["blob"] - is_manual_connection = false + is_manual_connection = true + request_message = "test" } private_dns_zone_group { @@ -287,3 +288,19 @@ resource "azurerm_private_endpoint" "web" { } } +resource "azapi_update_resource" "approveBlobPrivateEndpointConnection" { + type = "Microsoft.Storage/storageAccounts/privateEndpointConnections@2021-09-01" + name = azapi_resource.storageAccount.output.properties.privateEndpointConnections[0].name + parent_id = azapi_resource.storageAccount.id + + body = { + properties = { + privateLinkServiceConnectionState = { + description = "Approved via Terraform" + status = "Approved" + } + } + } + + depends_on = [azurerm_private_endpoint.blob, azurerm_private_endpoint.queue, azurerm_private_endpoint.web] +}