Manages a Resource Management Private Link Association.
data "azurerm_client_config" "example" {}
data "azurerm_management_group" "example" {
name = data.azurerm_client_config.example.tenant_id
}
resource "azurerm_resource_group" "example" {
name = "example"
location = "West Europe"
}
resource "azurerm_resource_management_private_link" "example" {
name = "example"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
}
resource "random_uuid" "example" {
}
resource "azurerm_resource_management_private_link_association" "example" {
name = random_uuid.example.result
management_group_id = azurerm_management_group.example.id
resource_management_private_link_id = azurerm_resource_management_private_link.example.id
public_network_access_enabled = true
}
The following arguments are supported:
management_group_id
- (Required) Specifies the Management Group ID within which this Private Link Association should exist. Changing this forces a new Private Link Association to be created.resource_management_private_link_id
- (Required) The Resource ID of Resource Management Private Link. Changing this forces a new Private Link Association to be created.
public_network_access_enabled
- (Required) Whether public network access is allowed. Changing this forces a new Private Link Association to be created.
name
- (Optional) Specifies the name of this Private Link Association, which should be a UUID. If name
is not provided, a UUID will be generated, you should use the ignore_changes
attribute to ignore changes to this field. Changing this forces a new Private Link Association to be created.
resource "azurerm_resource_management_private_link_association" "example" {
management_group_id = azurerm_management_group.example.id
resource_management_private_link_id = azurerm_resource_management_private_link.example.id
public_network_access_enabled = true
lifecycle {
ignore_changes = [name]
}
}
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the Private Link Association.
tenant_id
- The Tenant ID.
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating this Private Link Association.delete
- (Defaults to 30 minutes) Used when deleting this Private Link Association.read
- (Defaults to 5 minutes) Used when retrieving this Private Link Association.An existing Private Link Association can be imported into Terraform using the resource id
, e.g.
terraform import azurerm_resource_management_private_link_association.example /providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/privateLinkAssociations/00000000-0000-0000-0000-000000000000