From e7018d9f89e5e2c51674e63fd57a66714fad8c77 Mon Sep 17 00:00:00 2001 From: teowa <104055472+teowa@users.noreply.github.com> Date: Tue, 17 Oct 2023 03:29:33 +0000 Subject: [PATCH] fix --- ...gement_private_link_association_resource.go | 2 +- ...t_private_link_association_resource_test.go | 18 ++++-------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/internal/services/resource/resource_management_private_link_association_resource.go b/internal/services/resource/resource_management_private_link_association_resource.go index 7fc3997b9fa4..d0f71a589ba6 100644 --- a/internal/services/resource/resource_management_private_link_association_resource.go +++ b/internal/services/resource/resource_management_private_link_association_resource.go @@ -100,7 +100,7 @@ func (r ResourceManagementPrivateLinkAssociationResource) Create() sdk.ResourceF managementGroupId, err := commonids.ParseManagementGroupID(config.ManagementGroupId) if err != nil { - return fmt.Errorf("parse management group id: %+v", err) + return err } id := privatelinkassociation.NewPrivateLinkAssociationID(managementGroupId.GroupId, name) diff --git a/internal/services/resource/resource_management_private_link_association_resource_test.go b/internal/services/resource/resource_management_private_link_association_resource_test.go index 54c1f61dd4ba..ab5ce7cf83f9 100644 --- a/internal/services/resource/resource_management_private_link_association_resource_test.go +++ b/internal/services/resource/resource_management_private_link_association_resource_test.go @@ -122,16 +122,6 @@ resource "azurerm_resource_management_private_link_association" "import" { func (r ResourceManagementPrivateLinkAssociationTestResource) template(data acceptance.TestData) string { return fmt.Sprintf(` -variable "primary_location" { - default = %q -} -variable "random_string" { - default = %q -} -variable "random_integer" { - default = %d -} - data "azurerm_client_config" "test" {} data "azurerm_management_group" "test" { @@ -139,14 +129,14 @@ data "azurerm_management_group" "test" { } resource "azurerm_resource_group" "test" { - name = "acctestrg-${var.random_integer}" - location = var.primary_location + name = "acctestrg-%d" + location = "%s" } resource "azurerm_resource_management_private_link" "test" { location = azurerm_resource_group.test.location - name = "acctestrmpl-${var.random_string}" + name = "acctestrmpl-%[1]d" resource_group_name = azurerm_resource_group.test.name } -`, data.Locations.Primary, data.RandomString, data.RandomInteger) +`, data.RandomInteger, data.Locations.Primary) }