use data construct to reference existing resources

This commit is contained in:
Dennis Eikelenboom
2021-09-29 13:26:50 -07:00
parent 56b2b6deed
commit b63853c77b
4 changed files with 17 additions and 12 deletions

View File

@ -70,7 +70,7 @@ resource "azurerm_private_endpoint" "kv_ple" {
name = "ple-${var.name}-${var.environment}-kv"
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
subnet_id = "${data.azurerm_subnet.ml.id}"
subnet_id = data.azurerm_subnet.ml.id
private_dns_zone_group {
name = "private-dns-zone-group"
@ -89,7 +89,7 @@ resource "azurerm_private_endpoint" "st_ple_blob" {
name = "ple-${var.name}-${var.environment}-st-blob"
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
subnet_id = "${data.azurerm_subnet.ml.id}"
subnet_id = data.azurerm_subnet.ml.id
private_dns_zone_group {
name = "private-dns-zone-group"
@ -108,7 +108,7 @@ resource "azurerm_private_endpoint" "storage_ple_file" {
name = "ple-${var.name}-${var.environment}-st-file"
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
subnet_id = "${data.azurerm_subnet.ml.id}"
subnet_id = data.azurerm_subnet.ml.id
private_dns_zone_group {
name = "private-dns-zone-group"
@ -127,7 +127,7 @@ resource "azurerm_private_endpoint" "cr_ple" {
name = "ple-${var.name}-${var.environment}-cr"
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
subnet_id = "${data.azurerm_subnet.ml.id}"
subnet_id = data.azurerm_subnet.ml.id
private_dns_zone_group {
name = "private-dns-zone-group"
@ -146,7 +146,7 @@ resource "azurerm_private_endpoint" "mlw_ple" {
name = "ple-${var.name}-${var.environment}-mlw"
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
subnet_id = "${data.azurerm_subnet.ml.id}"
subnet_id = data.azurerm_subnet.ml.id
private_dns_zone_group {
name = "private-dns-zone-group"
@ -172,7 +172,7 @@ resource "azurerm_machine_learning_compute_cluster" "image-builder" {
vm_priority = "LowPriority"
vm_size = "Standard_DS2_v2"
machine_learning_workspace_id = azurerm_machine_learning_workspace.default.id
subnet_resource_id = "${data.azurerm_subnet.training.id}"
subnet_resource_id = data.azurerm_subnet.training.id
scale_settings {
min_node_count = 0