Skip to content

Commit

Permalink
configure public domain name for Azure hosts
Browse files Browse the repository at this point in the history
Signed-off-by: karim mdmirajul <karim.mdmirajul@unikie.com>
  • Loading branch information
karim20230 committed Nov 9, 2023
1 parent 3e61c6e commit 5949ee5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions terraform/azure-ghaf-infra.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,24 @@ resource "azurerm_network_security_group" "ghaf_infra_tf_nsg" {
destination_address_prefix = "*"
}
}


# DNS ZOne

resource "azurerm_dns_zone" "ghaf_infra_tf_zone" {
name = "ghaf-infra-tf-dev.swedencentral.cloudapp.azure.com"
resource_group_name = azurerm_resource_group.ghaf_infra_tf_dev.name
}

# DNS Record
resource "azurerm_dns_a_record" "ghaf-infra-tf-record" {
name = "ghaf-infra-tf-dev.swedencentral.cloudapp.azure.com"
resource_group_name = azurerm_resource_group.ghaf_infra_tf_dev.name
zone_name = azurerm_dns_zone.ghaf_infra_tf_zone.name
ttl = 300
records = [azurerm_public_ip.ghaf_infra_tf_public_ip.ip_address]
}

# Example Linux Virtual Machine
resource "azurerm_linux_virtual_machine" "ghafinfra_tf" {
name = "ghafinfratf"
Expand Down

0 comments on commit 5949ee5

Please sign in to comment.