Skip to content

Commit

Permalink
Fix/count (#52)
Browse files Browse the repository at this point in the history
* fix/condition issue
* fix:private_dns_name condition with & operator
  • Loading branch information
Rupalgw authored Feb 27, 2024
1 parent 58c0750 commit 1c329a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ locals {
resource_group_name = var.resource_group_name
location = var.location
valid_rg_name = var.existing_private_dns_zone == null ? local.resource_group_name : (var.existing_private_dns_zone_resource_group_name == "" ? local.resource_group_name : var.existing_private_dns_zone_resource_group_name)
private_dns_zone_name = var.existing_private_dns_zone == null ? azurerm_private_dns_zone.dnszone[0].name : var.existing_private_dns_zone
private_dns_zone_name = var.enable_private_endpoint && var.enabled ? var.existing_private_dns_zone == null ? azurerm_private_dns_zone.dnszone[0].name : var.existing_private_dns_zone : null
}

##-----------------------------------------------------------------------------
Expand Down
16 changes: 8 additions & 8 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
output "storage_account_id" {
value = azurerm_storage_account.storage[0].id
value = try(azurerm_storage_account.storage[0].id, null)
description = "The ID of the storage account."
}

output "storage_account_name" {
value = azurerm_storage_account.storage[0].name
value = try(azurerm_storage_account.storage[0].name, null)
description = "The name of the storage account."
}

output "storage_account_primary_location" {
value = azurerm_storage_account.storage[0].primary_location
value = try(azurerm_storage_account.storage[0].primary_location, null)
description = "The primary location of the storage account"
}

output "storage_account_primary_web_endpoint" {
value = azurerm_storage_account.storage[0].primary_web_endpoint
value = try(azurerm_storage_account.storage[0].primary_web_endpoint, null)
description = "The endpoint URL for web storage in the primary location."
}

output "storage_account_primary_blob_endpoint" {
value = azurerm_storage_account.storage[0].primary_blob_endpoint
value = try(azurerm_storage_account.storage[0].primary_blob_endpoint, null)
description = "The endpoint URL for blob storage in the primary location."
}

output "storage_account_primary_web_host" {
value = azurerm_storage_account.storage[0].primary_web_host
value = try(azurerm_storage_account.storage[0].primary_web_host, null)
description = "The hostname with port if applicable for web storage in the primary location."
}

output "storage_primary_connection_string" {
value = azurerm_storage_account.storage[0].primary_connection_string
value = try(azurerm_storage_account.storage[0].primary_connection_string, null)
sensitive = true
description = "The primary connection string for the storage account"
}

output "storage_primary_access_key" {
value = azurerm_storage_account.storage[0].primary_access_key
value = try(azurerm_storage_account.storage[0].primary_access_key, null)
sensitive = true
description = "The primary access key for the storage account"
}
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ variable "subnet_id" {

variable "enable_private_endpoint" {
type = bool
default = false
default = true
description = "enable or disable private endpoint to storage account"
}

Expand Down

0 comments on commit 1c329a4

Please sign in to comment.