Skip to content

Commit

Permalink
Simplify config
Browse files Browse the repository at this point in the history
  • Loading branch information
cicharka committed Feb 7, 2022
1 parent d829926 commit 6eb2b85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 0 additions & 3 deletions schema/azure/defaults/infrastructure/virtual-machine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ specification:
managed_disk_type: Premium_LRS
additional_disks: []
# - storage_account_type: Premium_LRS
# create_option: Empty
# disk_size_gb: 32
# device_name: "/dev/sdb"
# mountpoint: /var/pvs
network_interface:
enable_accelerated_networking: false
private_ip:
Expand Down
7 changes: 2 additions & 5 deletions terraform/azure/infrastructure/virtual-machine.j2
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,16 @@ resource "azurerm_virtual_machine" "{{ specification.name }}" {
depends_on = [azurerm_network_interface_security_group_association.{{ specification.security_group_association_name }}]
{%- endif %}

#TODO:
# storage_data_disk
}

{%- if specification.additional_disks is defined %}
{%- for disk in specification.additional_disks %}
resource "azurerm_managed_disk" "{{ specification.name }}-data-disk-{{ loop.index }}" {
name = "{{ specification.name }}-pvs-disk-{{ loop.index }}"
name = "{{ specification.name }}-data-disk-{{ loop.index }}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
storage_account_type = "{{ disk.storage_account_type }}"
create_option = "{{ disk.create_option }}"
create_option = "Empty"
disk_size_gb = "{{ disk.disk_size_gb }}"
}

Expand All @@ -103,6 +101,5 @@ resource "azurerm_virtual_machine_data_disk_attachment" "{{ specification.name }
lun = "{{ loop.index * 10 }}"
caching = "ReadWrite"
}

{%- endfor %}
{%- endif %}

0 comments on commit 6eb2b85

Please sign in to comment.