-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated the DNS module not to use data sources
Added additional variables Added script, which creates DNS records based on the attached disk Changed disk naming to "Disk-$${RESOURCE_GROUP}-$${ZONE_ID}-$${DISK_ORDER}" Fixed an issue where the attach disk script was failing
- Loading branch information
1 parent
7764ce9
commit 39b5cab
Showing
5 changed files
with
71 additions
and
75 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,19 @@ | ||
data "azurerm_resource_group" "graphdb" { | ||
name = var.resource_name_prefix | ||
} | ||
|
||
data "azurerm_user_assigned_identity" "graphdb-instances" { | ||
name = var.identity_name | ||
resource_group_name = var.resource_name_prefix | ||
} | ||
|
||
data "azurerm_virtual_network" "graphdb" { | ||
name = var.resource_name_prefix | ||
resource_group_name = data.azurerm_resource_group.graphdb.name | ||
} | ||
|
||
resource "azurerm_private_dns_zone" "zone" { | ||
name = "${var.resource_name_prefix}.dns.zone" | ||
resource_group_name = data.azurerm_resource_group.graphdb.name | ||
resource_group_name = var.resource_group_name | ||
tags = var.tags | ||
} | ||
|
||
resource "azurerm_private_dns_zone_virtual_network_link" "zone_link" { | ||
name = "${var.resource_name_prefix}-dns-link" | ||
resource_group_name = data.azurerm_resource_group.graphdb.name | ||
resource_group_name = var.resource_group_name | ||
private_dns_zone_name = azurerm_private_dns_zone.zone.name | ||
virtual_network_id = data.azurerm_virtual_network.graphdb.id | ||
registration_enabled = true | ||
virtual_network_id = var.virtual_network_id | ||
tags = var.tags | ||
} | ||
|
||
resource "azurerm_role_assignment" "dns_zone_role_assignment" { | ||
principal_id = data.azurerm_user_assigned_identity.graphdb-instances.principal_id | ||
role_definition_name = "DNS Zone Contributor" | ||
scope = azurerm_private_dns_zone_virtual_network_link.zone_link.id | ||
principal_id = var.identity_principal_id | ||
role_definition_name = "Private DNS Zone Contributor" | ||
scope = azurerm_private_dns_zone.zone.id | ||
} |
This file contains 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
This file contains 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
This file contains 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