Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
teowa committed Oct 17, 2023
1 parent f067dd0 commit e7018d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,31 +122,21 @@ 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" {
name = data.azurerm_client_config.test.tenant_id
}
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)
}

0 comments on commit e7018d9

Please sign in to comment.