What is the specified terraform subresource_name for Azure SQL Managed Instance private endpoint?

Brian E Zupanc 20 Reputation points
2023-08-03T19:25:00.78+00:00

What is the specified terraform subresource_names for Azure SQL Managed Instance private endpoint?

We were told Azure SQL Managed Instance will be coming out of preview this quarter. Error & Code snippets below...

CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="PrivateEndpointCreationNotAllowedAsSubnetIsDelegated" Message="Private endpoint .... -subnet is delegated." Details=[]

(not really in powershell)

resource "azurerm_private_endpoint" "......" {

  provider                     = azurerm....subscription  

  name                = "${var..."

  location            = var.location

  resource_group_name = var.resourcegrp

  subnet_id           = azurerm_subnet.....id

  private_service_connection {

    name                           = "......"

    private_connection_resource_id = azurerm_mssql_managed_instance.mi.id

    subresource_names              = ["managedInstance"]

    is_manual_connection           = false

  }

  lifecycle {

    ignore_changes = [tags]

  }

}
Community Center Not monitored
0 comments No comments
{count} votes

Accepted answer
  1. Luis Arias 8,621 Reputation points Volunteer Moderator
    2023-08-04T15:27:48.6966667+00:00

    Hi @Brian E Zupanc ,

    Looks like your subnet it's already delegated to another azure service, you can create a new subnet in this vnet and point to that subnet in your terraform code. It will work.

    Cheers,

    Luis


    If the response helped, do "Accept Answer" and up-vote it


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.