Microsoft. App managedEnvironments/privateEndpointConnections 2025-10-02-preview

Bicep 리소스 정의

managedEnvironments/privateEndpointConnections 리소스 종류는 다음을 대상으로 하는 작업으로 배포할 수 있습니다.

각 API 버전에서 변경된 속성 목록은 변경 로그참조하세요.

리소스 형식

Microsoft.App/managedEnvironments/privateEndpointConnections 리소스를 만들려면 템플릿에 다음 Bicep을 추가합니다.

resource symbolicname 'Microsoft.App/managedEnvironments/privateEndpointConnections@2025-10-02-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    privateEndpoint: {}
    privateLinkServiceConnectionState: {
      actionsRequired: 'string'
      description: 'string'
      status: 'string'
    }
  }
}

속성 값

Microsoft.App/managedEnvironments/privateEndpointConnections

이름 Description 가치
이름 리소스 이름 string(필수)
parent Bicep에서 자식 리소스에 대한 부모 리소스를 지정할 수 있습니다. 자식 리소스가 부모 리소스 외부에서 선언된 경우에만 이 속성을 추가해야 합니다.

자세한 내용은 부모 리소스외부의 자식 리소스 참조하세요.
형식 리소스의 기호 이름: managedEnvironments
properties 리소스 속성입니다. PrivateEndpointConnectionProperties

프라이빗엔드포인트

이름 Description 가치

PrivateEndpointConnectionProperties

이름 Description 가치
privateEndpoint 프라이빗 엔드포인트의 리소스입니다. 프라이빗엔드포인트
privateLinkServiceConnectionState 서비스 소비자와 공급자 간의 연결 상태에 대한 정보 컬렉션입니다. PrivateLinkServiceConnectionState(필수)

PrivateLinkServiceConnectionState

이름 Description 가치
actions필수 서비스 공급자의 변경 내용에 소비자에 대한 업데이트가 필요한지 여부를 나타내는 메시지입니다. 문자열
description 연결의 승인/거부 이유입니다. 문자열
status 서비스 소유자가 연결을 승인/거부/제거했는지 여부를 나타냅니다. '승인됨'
'연결 끊김'
'보류 중'
'거부됨'

ARM 템플릿 리소스 정의

managedEnvironments/privateEndpointConnections 리소스 종류는 다음을 대상으로 하는 작업으로 배포할 수 있습니다.

사용 예제

리소스 형식

Microsoft.App/managedEnvironments/privateEndpointConnections 리소스를 만들려면 템플릿에 다음 JSON을 추가합니다.

{
  "type": "Microsoft.App/managedEnvironments/privateEndpointConnections",
  "apiVersion": "2025-10-02-preview",
  "name": "string",
  "properties": {
    "privateEndpoint": {
    },
    "privateLinkServiceConnectionState": {
      "actionsRequired": "string",
      "description": "string",
      "status": "string"
    }
  }
}

속성 값

Microsoft.App/managedEnvironments/privateEndpointConnections

이름 Description 가치
API버전 api 버전 '2025-10-02-미리보기'
이름 리소스 이름 string(필수)
properties 리소스 속성입니다. PrivateEndpointConnectionProperties
type 리소스 종류 'Microsoft.App/managedEnvironments/privateEndpointConnections'

프라이빗엔드포인트

이름 Description 가치

PrivateEndpointConnectionProperties

이름 Description 가치
privateEndpoint 프라이빗 엔드포인트의 리소스입니다. 프라이빗엔드포인트
privateLinkServiceConnectionState 서비스 소비자와 공급자 간의 연결 상태에 대한 정보 컬렉션입니다. PrivateLinkServiceConnectionState(필수)

PrivateLinkServiceConnectionState

이름 Description 가치
actions필수 서비스 공급자의 변경 내용에 소비자에 대한 업데이트가 필요한지 여부를 나타내는 메시지입니다. 문자열
description 연결의 승인/거부 이유입니다. 문자열
status 서비스 소유자가 연결을 승인/거부/제거했는지 여부를 나타냅니다. '승인됨'
'연결 끊김'
'보류 중'
'거부됨'

Terraform(AzAPI 공급자) 리소스 정의

managedEnvironments/privateEndpointConnections 리소스 종류는 다음을 대상으로 하는 작업으로 배포할 수 있습니다.

  • 자원 그룹 각 API 버전에서 변경된 속성 목록은 변경 로그를 참조하세요.

사용 예제

Terraform 샘플

Container App Environment 프라이빗 엔드포인트 연결을 배포하는 기본 예제입니다.

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
  skip_provider_registration = false
}

variable "resource_name" {
  type    = string
  default = "acctest5925"
}

variable "location" {
  type    = string
  default = "westeurope"
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "workspace" {
  type      = "Microsoft.OperationalInsights/workspaces@2022-10-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      features = {
        disableLocalAuth                            = false
        enableLogAccessUsingOnlyResourcePermissions = true
      }
      publicNetworkAccessForIngestion = "Enabled"
      publicNetworkAccessForQuery     = "Enabled"
      retentionInDays                 = 30
      sku = {
        name = "PerGB2018"
      }
      workspaceCapping = {
        dailyQuotaGb = -1
      }
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

data "azapi_resource_action" "sharedKeys" {
  type                   = "Microsoft.OperationalInsights/workspaces@2020-08-01"
  resource_id            = azapi_resource.workspace.id
  action                 = "sharedKeys"
  response_export_values = ["*"]
}

# Create Virtual Network for private endpoint
resource "azapi_resource" "virtualNetwork" {
  type      = "Microsoft.Network/virtualNetworks@2023-05-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = "${var.resource_name}-vnet"
  location  = var.location
  body = {
    properties = {
      addressSpace = {
        addressPrefixes = ["10.0.0.0/16"]
      }
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

# Create Subnet for private endpoint (minimum /27 required for workload profiles)
resource "azapi_resource" "subnet" {
  type      = "Microsoft.Network/virtualNetworks/subnets@2023-05-01"
  parent_id = azapi_resource.virtualNetwork.id
  name      = "${var.resource_name}-subnet"
  body = {
    properties = {
      addressPrefix                  = "10.0.0.0/21"
      privateEndpointNetworkPolicies = "Disabled"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

# Create Container Apps Environment with workload profiles (required for private endpoints)
resource "azapi_resource" "managedEnvironment" {
  type      = "Microsoft.App/managedEnvironments@2024-10-02-preview"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      appLogsConfiguration = {
        destination = "log-analytics"
        logAnalyticsConfiguration = {
          customerId = azapi_resource.workspace.output.properties.customerId
          sharedKey  = data.azapi_resource_action.sharedKeys.output.primarySharedKey
        }
      }
      # Enable workload profiles (default for new environments, but explicitly set)
      workloadProfiles = [
        {
          name                = "Consumption"
          workloadProfileType = "Consumption"
        }
      ]
      # Disable public network access to enable private endpoints
      publicNetworkAccess = "Disabled"
      vnetConfiguration = {
        # Note: For private endpoints, we don't inject into VNet but create separate private endpoint
      }
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

# Create Private Endpoint for the Container Apps Environment
resource "azapi_resource" "privateEndpoint" {
  type      = "Microsoft.Network/privateEndpoints@2023-05-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = "${var.resource_name}-pe"
  location  = var.location
  body = {
    properties = {
      subnet = {
        id = azapi_resource.subnet.id
      }
      privateLinkServiceConnections = [
        {
          name = "${var.resource_name}-connection"
          properties = {
            privateLinkServiceId = azapi_resource.managedEnvironment.id
            groupIds             = ["managedEnvironments"]
          }
        }
      ]
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

# Create Private DNS Zone for Container Apps
resource "azapi_resource" "privateDnsZone" {
  type      = "Microsoft.Network/privateDnsZones@2020-06-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = "acctestzone.azurecontainerapps.dev"
  location  = "global"
  body = {
    properties = {}
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

# Link VNet to Private DNS Zone
resource "azapi_resource" "vnetLink" {
  type      = "Microsoft.Network/privateDnsZones/virtualNetworkLinks@2020-06-01"
  parent_id = azapi_resource.privateDnsZone.id
  name      = "${var.resource_name}-vnet-link"
  location  = "global"
  body = {
    properties = {
      virtualNetwork = {
        id = azapi_resource.virtualNetwork.id
      }
      registrationEnabled = false
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

# Create DNS Zone Group for automatic DNS record management
resource "azapi_resource" "privateDnsZoneGroup" {
  type      = "Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2023-05-01"
  parent_id = azapi_resource.privateEndpoint.id
  name      = "default"
  body = {
    properties = {
      privateDnsZoneConfigs = [
        {
          name = "config"
          properties = {
            privateDnsZoneId = azapi_resource.privateDnsZone.id
          }
        }
      ]
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

data "azapi_resource_list" "privateEndpointConnections" {
  type                   = "Microsoft.App/managedEnvironments/privateEndpointConnections@2024-10-02-preview"
  parent_id              = azapi_resource.managedEnvironment.id
  response_export_values = ["*"]
}

output "privateEndpointConnections" {
  value = data.azapi_resource_list.privateEndpointConnections.output
}

locals {
  privateEndpointConnectionIds = [
    for pe in data.azapi_resource_list.privateEndpointConnections.output.value : pe.id
  ]
}

# Note: The private endpoint connection is automatically created when the private endpoint is created
# This resource manages the approval state of the connection
resource "azapi_update_resource" "privateEndpointConnection" {
  for_each    = toset(local.privateEndpointConnectionIds)
  type        = "Microsoft.App/managedEnvironments/privateEndpointConnections@2024-10-02-preview"
  resource_id = each.value
  body = {
    properties = {
      privateLinkServiceConnectionState = {
        status          = "Approved"
        description     = "Auto-approved"
        actionsRequired = "None"
      }
    }
  }
}

리소스 형식

Microsoft.App/managedEnvironments/privateEndpointConnections 리소스를 만들려면 템플릿에 다음 Terraform을 추가합니다.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.App/managedEnvironments/privateEndpointConnections@2025-10-02-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      privateEndpoint = {
      }
      privateLinkServiceConnectionState = {
        actionsRequired = "string"
        description = "string"
        status = "string"
      }
    }
  }
}

속성 값

Microsoft.App/managedEnvironments/privateEndpointConnections

이름 Description 가치
이름 리소스 이름 string(필수)
parent_id 이 리소스의 부모인 리소스의 ID입니다. 형식 리소스의 ID: managedEnvironments
properties 리소스 속성입니다. PrivateEndpointConnectionProperties
type 리소스 종류 "Microsoft.App/managedEnvironments/privateEndpointConnections@2025-10-02-preview"

프라이빗엔드포인트

이름 Description 가치

PrivateEndpointConnectionProperties

이름 Description 가치
privateEndpoint 프라이빗 엔드포인트의 리소스입니다. 프라이빗엔드포인트
privateLinkServiceConnectionState 서비스 소비자와 공급자 간의 연결 상태에 대한 정보 컬렉션입니다. PrivateLinkServiceConnectionState(필수)

PrivateLinkServiceConnectionState

이름 Description 가치
actions필수 서비스 공급자의 변경 내용에 소비자에 대한 업데이트가 필요한지 여부를 나타내는 메시지입니다. 문자열
description 연결의 승인/거부 이유입니다. 문자열
status 서비스 소유자가 연결을 승인/거부/제거했는지 여부를 나타냅니다. '승인됨'
'연결 끊김'
'보류 중'
'거부됨'