Skip to content

Commit

Permalink
fix: update output.tf, main.tf, variable.tf according tflints
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhavcloud committed Sep 17, 2024
1 parent 9671951 commit bc75b7a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
##-----------------------------------------------------------------------------
module "labels" {
source = "clouddrove/labels/azure"
version = "1.0.0"
name = var.name
environment = var.environment
managedby = var.managedby
Expand Down Expand Up @@ -225,7 +226,7 @@ resource "azurerm_firewall_policy_rule_collection_group" "network_policy_rule_co
resource "azurerm_firewall_policy_rule_collection_group" "nat_policy_rule_collection_group" {
count = var.enabled && var.dnat-destination_ip && var.policy_rule_enabled ? 1 : 0
name = var.nat_policy_collection_group
firewall_policy_id = var.firewall_policy_id == null ? join("", azurerm_firewall_policy.policy.*.id) : var.firewall_policy_id
firewall_policy_id = var.firewall_policy_id == null ? join("", azurerm_firewall_policy.policy[*].id) : var.firewall_policy_id
priority = 100

dynamic "nat_rule_collection" {
Expand Down
13 changes: 8 additions & 5 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,31 @@ output "firewall_id" {
}

output "firewall_name" {
value = join("", azurerm_firewall.firewall.*.name)
value = join("", azurerm_firewall.firewall[*].name)
description = "Firewall name"

}


output "private_ip_address" {
value = azurerm_firewall.firewall[*].ip_configuration[0].private_ip_address
description = "Firewall private IP"
}

output "public_ip_id" {
value = azurerm_public_ip.public_ip.*.id
value = azurerm_public_ip.public_ip[*].id
}


output "public_ip_address" {
value = azurerm_public_ip.public_ip.*.ip_address
value = azurerm_public_ip.public_ip[*].ip_address
}


output "firewall_policy_id" {
value = azurerm_firewall_policy.policy[0].id
value = join("", azurerm_firewall_policy.policy[*].id)
}


output "prefix_public_ip_id" {
value = azurerm_public_ip.prefix_public_ip[*].id
}
Expand Down
2 changes: 2 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ variable "enabled" {
}

variable "resource_group_name" {
type = string
description = "A container that holds related resources for an Azure solution"
default = ""
}


variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
Expand Down

0 comments on commit bc75b7a

Please sign in to comment.