Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issues-53] Fix - availibility naming format changed #19

Merged
merged 1 commit into from
May 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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