Skip to content

Commit

Permalink
Merge pull request #19 from clouddrove/Issues-53
Browse files Browse the repository at this point in the history
[Issues-53] Fix - availibility naming format changed
  • Loading branch information
d4kverma committed May 1, 2023
2 parents 1df5d14 + 1ca5cbc commit b1ac5ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ resource "azurerm_network_interface" "default" {
#Description : Terraform resource to create a availability set for virtual machine.
resource "azurerm_availability_set" "default" {
count = var.enabled && var.availability_set_enabled ? 1 : 0
name = format("%s-availability-set", module.labels.id)
name = var.vm_addon_name == null ? format("%s-availability-set", module.labels.id) : format("%s-availability-set-%s", module.labels.id, var.vm_addon_name)
resource_group_name = var.resource_group_name
location = var.location
platform_update_domain_count = var.platform_update_domain_count
Expand Down Expand Up @@ -178,7 +178,7 @@ resource "azurerm_linux_virtual_machine" "default" {


os_disk {
name = format("%s-storage-os-disk", module.labels.id)
name = var.vm_addon_name == null ? format("%s-storage-os-disk", module.labels.id) : format("%s-storage-os-disk-%s", module.labels.id, var.vm_addon_name)
storage_account_type = var.os_disk_storage_account_type
caching = var.caching
disk_encryption_set_id = var.enable_disk_encryption_set ? azurerm_disk_encryption_set.example[0].id : null
Expand Down

0 comments on commit b1ac5ac

Please sign in to comment.