From 8f9d7f20275b15982623835bf1ac7a683b865808 Mon Sep 17 00:00:00 2001
From: David Constenla <1520001+daconstenla@users.noreply.github.com>
Date: Mon, 7 Aug 2023 09:22:13 +0200
Subject: [PATCH] Add support for static IP outputs (#16)
so when using private vnet private DNS can be configured
---
README.md | 17 +++++++++--------
outputs.tf | 5 +++++
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index 3267d3d..67ef78b 100644
--- a/README.md
+++ b/README.md
@@ -8,20 +8,20 @@ A Terraform module to deploy a container app in Azure with the following charact
- `name` - (Required) The name of the container.
- `image` - (Required) The container image.
- `resources` - (Optional) The resource requirements for the container.
- - `ports` - (Optional) The ports exposed by the container.
- - `environment_variables` - (Optional) The environment variables for the container.
+ - `ports` - (Optional) The ports exposed by the container.
+ - `environment_variables` - (Optional) The environment variables for the container.
- `command` - (Optional) The command to run within the container in exec form.
- `args` - (Optional) The arguments to the command in `command` field.
- `liveness_probe` - (Optional) The liveness probe for the container.
- `readiness_probe` - (Optional) The readiness probe for the container.
- `volume_mounts` - (Optional) The volume mounts for the container.
- `volumes` - (Optional) The volumes for the container.
- - `secrets` - (Optional) The secrets for the container.
- - `image_pull_secrets` - (Optional) The image pull secrets for the container.
- - `security_context` - (Optional) The security context for the container.
- - `resources` - (Optional) The resource requirements for the container.
- - `ports` - (Optional) The ports exposed by the container.
- - `environment_variables` - (Optional) The environment variables for the container.
+ - `secrets` - (Optional) The secrets for the container.
+ - `image_pull_secrets` - (Optional) The image pull secrets for the container.
+ - `security_context` - (Optional) The security context for the container.
+ - `resources` - (Optional) The resource requirements for the container.
+ - `ports` - (Optional) The ports exposed by the container.
+ - `environment_variables` - (Optional) The environment variables for the container.
- `command` - (Optional) The command to run within the container in exec form.
- `args` - (Optional) The arguments to the command in `command` field.
- `liveness_probe` - (Optional) The liveness probe for the container.
@@ -173,4 +173,5 @@ No modules.
|--------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|
| [container\_app\_environment\_id](#output\_container\_app\_environment\_id) | The ID of the Container App Environment within which this Container App should exist. |
| [container\_app\_fqdn](#output\_container\_app\_fqdn) | The FQDN of the Latest Revision of the Container App. |
+| [container\_app\_ips](#output\_container\_app\_ips) | The IPs of the Latest Revision of the Container App. |
diff --git a/outputs.tf b/outputs.tf
index e386a49..a046cc0 100644
--- a/outputs.tf
+++ b/outputs.tf
@@ -7,3 +7,8 @@ output "container_app_fqdn" {
description = "The FQDN of the Latest Revision of the Container App."
value = { for name, container in azurerm_container_app.container_app : name => "https://${container.latest_revision_fqdn}" }
}
+
+output "container_app_ips" {
+ description = "The IPs of the Latest Revision of the Container App."
+ value = azurerm_container_app_environment.container_env.static_ip_address
+}