Skip to content

Commit

Permalink
Tidy up terraform + workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
benchiverton committed Jul 1, 2024
1 parent afd518f commit 28f4b13
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 46 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/instance-deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ jobs:
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
# - name: Setup azure CLI
# run:
# - name: Setup dnsutils (dig) CLI
# run: sudo apt-get install -y dnsutils
- name: Terraform Format
id: fmt
run: terraform -chdir=instance fmt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ jobs:
TF_VAR_acr_username: "not-used"
TF_VAR_acr_password: "not-used"
TF_VAR_website_dns_subdomain: "not-used"
TF_VAR_api_dns_subdomain: "not-used"
TF_VAR_monitoring_dns_subdomain: "not-used"
42 changes: 0 additions & 42 deletions terraform/instance/dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,6 @@ resource "azurerm_dns_txt_record" "api" {
}
}

# resource "azurerm_container_app_custom_domain" "api" {
# name = trimsuffix(azurerm_dns_cname_record.api.fqdn, ".")
# container_app_id = azurerm_container_app.api.id

# depends_on = [
# azurerm_dns_txt_record.api,
# ]

# lifecycle {
# // When using an Azure created Managed Certificate these values must be added to ignore_changes to prevent resource recreation.
# ignore_changes = [certificate_binding_type, container_app_environment_certificate_id]
# }
# }

resource "azurerm_dns_cname_record" "website" {
name = var.website_dns_subdomain
zone_name = data.azurerm_dns_zone.rockpal-co-uk.name
Expand All @@ -53,20 +39,6 @@ resource "azurerm_dns_txt_record" "website" {
}
}

# resource "azurerm_container_app_custom_domain" "website" {
# name = trimsuffix(azurerm_dns_cname_record.website.fqdn, ".")
# container_app_id = azurerm_container_app.website.id

# depends_on = [
# azurerm_dns_txt_record.website,
# ]

# lifecycle {
# // When using an Azure created Managed Certificate these values must be added to ignore_changes to prevent resource recreation.
# ignore_changes = [certificate_binding_type, container_app_environment_certificate_id]
# }
# }

resource "azurerm_dns_cname_record" "monitoring" {
name = var.monitoring_dns_subdomain
zone_name = data.azurerm_dns_zone.rockpal-co-uk.name
Expand All @@ -85,20 +57,6 @@ resource "azurerm_dns_txt_record" "monitoring" {
}
}

# resource "azurerm_container_app_custom_domain" "monitoring" {
# name = trimsuffix(azurerm_dns_cname_record.monitoring.fqdn, ".")
# container_app_id = azurerm_container_app.monitoring.id

# depends_on = [
# azurerm_dns_txt_record.monitoring,
# ]

# lifecycle {
# // When using an Azure created Managed Certificate these values must be added to ignore_changes to prevent resource recreation.
# ignore_changes = [certificate_binding_type, container_app_environment_certificate_id]
# }
# }

module "container_apps_bind_dns" {
source = "./container_apps_bind_dns"
container_app_resource_group_name = azurerm_resource_group.instance.name
Expand Down

0 comments on commit 28f4b13

Please sign in to comment.