generated from qbeyond/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from qbeyond/feature/init_code
Feature/init code
- Loading branch information
Showing
16 changed files
with
809 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Changelog | ||
All notable changes to this module will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), | ||
and this module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
## [1.0.0] - 2024-01-11 | ||
|
||
### Added | ||
- Initial code that creates a VM | ||
### Changed | ||
|
||
### Removed | ||
|
||
### Fixed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
resource "azurerm_managed_disk" "data_disk" { | ||
for_each = var.data_disks | ||
name = lookup(var.name_overrides.data_disks, each.key, "disk-${var.virtual_machine_config.hostname}-${each.key}") | ||
location = var.virtual_machine_config.location | ||
resource_group_name = var.resource_group_name | ||
zone = var.virtual_machine_config.zone | ||
storage_account_type = each.value["storage_account_type"] | ||
create_option = each.value["create_option"] | ||
disk_size_gb = each.value["disk_size_gb"] | ||
on_demand_bursting_enabled = each.value["on_demand_bursting_enabled"] | ||
tags = var.tags | ||
|
||
lifecycle { | ||
prevent_destroy = true | ||
} | ||
} | ||
|
||
resource "azurerm_virtual_machine_data_disk_attachment" "data_disk" { | ||
for_each = var.data_disks | ||
managed_disk_id = azurerm_managed_disk.data_disk[each.key].id | ||
virtual_machine_id = azurerm_linux_virtual_machine.this.id | ||
lun = each.value["lun"] | ||
caching = each.value["caching"] | ||
write_accelerator_enabled = each.value["write_accelerator_enabled"] | ||
|
||
lifecycle { | ||
prevent_destroy = true | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDeA/WEEO04H3b9quI2otmtXZ+sJepU4I+WulTSmakwchv0Nt0ebC0uiFRjHtMgtEM2MzrdkeBDuXkTumexcJ5SaauCbdrHKr0gkprSowe/hkTnJL+SZw3cGA6lPXKxdOIvSW2lFzX1z8QlcODdsfEiO/fLfqDNXW5sUBsQbmrBnGsiqVgXtKu53RWEcALQNvKn0qgPF2+nyCQ2yxwa2iCv1w7SgxMN+plf3Wts7zNn8sEzDwT5uWKi5P+9JKPpLRLS0Q8t2f68vaHkgS0LchPc7MhBG7iWQUDi8piY5Y47CBYW3kK59WOtWmRRMjvUecbQTKt+hQXpAv0n5tPYwBJfrqmfaG4X3l1HVdcpDuFls5ooZaIFPwHGNB7gYMqY1+8smoV4PtaEeOTFtfxe6ABP+Q90LmQNBPQHOtuWwkgDOQiPzNjNDffD7Tx/8g4eLaBUuKOVDUgcg6QDasE0pxSFVUO0BU/8/+rJgZ8cUV0wRX3rbqWbIy1VpOrLEeb46aM= |
Oops, something went wrong.