Skip to content

Commit

Permalink
Merge pull request #106 from Ensono/feat/expose-public-ip-name
Browse files Browse the repository at this point in the history
feat: Expose the App Gateway's IP Address name
  • Loading branch information
ElvenSpellmaker authored Nov 23, 2023
2 parents d562797 + a4bff8b commit 74ccefe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
5 changes: 5 additions & 0 deletions azurerm/modules/azurerm-app-gateway/data.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
data "azurerm_public_ip" "default" {
name = azurerm_public_ip.app_gateway.name
resource_group_name = var.resource_group_name
depends_on = [azurerm_public_ip.app_gateway]
}
13 changes: 6 additions & 7 deletions azurerm/modules/azurerm-app-gateway/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
data "azurerm_public_ip" "default" {
name = azurerm_public_ip.app_gateway.name
resource_group_name = var.resource_group_name
depends_on = [azurerm_public_ip.app_gateway]
}

output "app_gateway_resource_group_name" {
description = "Resource group of the application gateway"
value = azurerm_public_ip.app_gateway.resource_group_name
Expand All @@ -15,10 +9,15 @@ output "app_gateway_name" {
}

output "app_gateway_ip" {
description = "Application Gateway public IP. Should be used with DNS provider at a top level. Can have multiple subs pointing to it - e.g. app.sub.domain.com, app-uat.sub.domain.com. App Gateway will perform SSL termination for all "
description = "Application Gateway public IP. Should be used with DNS provider at a top level. Can have multiple subs pointing to it - e.g. app.sub.domain.com, app-uat.sub.domain.com. App Gateway will perform SSL termination for all"
value = data.azurerm_public_ip.default.ip_address
}

output "app_gateway_ip_name" {
description = "Application Gateway public IP name"
value = azurerm_public_ip.app_gateway.name
}

output "certificate_pem" {
description = "PEM key of certificate, can be used internally"
value = var.create_valid_cert ? acme_certificate.default.0.certificate_pem : tls_self_signed_cert.self_cert.0.cert_pem
Expand Down

0 comments on commit 74ccefe

Please sign in to comment.