dataworkaround: add workaround for resources 29885#4691
Open
teowa wants to merge 2 commits into
Open
Conversation
sreallymatt
reviewed
Mar 27, 2026
sreallymatt
left a comment
Contributor
There was a problem hiding this comment.
Hi @teowa - this is a fairly old data workaround that was seemingly missed. Is this still required?
Contributor
Author
|
Hi @sreallymatt , by my test the issue still exists, so we still needs the patch. reproduce stepscreate resources with below config: terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=4.66.0"
}
}
}
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "management_privatelink" {
name = "management_privatelink"
location = "eastus"
}
resource "azurerm_resource_management_private_link" "management_privatelink" {
name = "management_privatelink"
resource_group_name = azurerm_resource_group.management_privatelink.name
location = azurerm_resource_group.management_privatelink.location
}
resource "random_uuid" "management_privatelink" {
}
data "azurerm_subscription" "current" {
}
resource "azurerm_management_group" "example_parent" {
display_name = "ParentGroup"
subscription_ids = []
}
resource "azurerm_resource_management_private_link_association" "management_privatelink" {
name = random_uuid.management_privatelink.result
management_group_id = azurerm_management_group.example_parent.id
resource_management_private_link_id = azurerm_resource_management_private_link.management_privatelink.id
public_network_access_enabled = true # Presumably we will eventually want to change this to false
}
resource "azurerm_virtual_network" "management_privatelink" {
name = "management_privatelink-network"
address_space = ["10.0.0.0/16"]
location = azurerm_resource_group.management_privatelink.location
resource_group_name = azurerm_resource_group.management_privatelink.name
}
resource "azurerm_subnet" "endpoint" {
name = "endpoint"
resource_group_name = azurerm_resource_group.management_privatelink.name
virtual_network_name = azurerm_virtual_network.management_privatelink.name
address_prefixes = ["10.0.2.0/24"]
}
resource "azurerm_private_endpoint" "management_privatelink" {
name = "management_privatelink"
location = azurerm_resource_group.management_privatelink.location
resource_group_name = azurerm_resource_group.management_privatelink.name
subnet_id = azurerm_subnet.endpoint.id
private_service_connection {
name = "management_privatelink"
private_connection_resource_id = azurerm_resource_management_private_link.management_privatelink.id
is_manual_connection = false
subresource_names = [
"ResourceManagement",
]
}
}
run terraform apply, then after the resources are provisioned, run terraform plan, it will show error: retrieve the actual resource, the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
related to:
workaround to covert the
stringtype tointerfacepandora/api-definitions/resource-manager/Resources/2020-05-01/ResourceManagementPrivateLink/Model-ResourceManagementPrivateLinkEndpointConnections.json
Lines 13 to 17 in db7e0f8
hashicorp/terraform-provider-azurerm#26670
Azure/azure-rest-api-specs#29885