linux-vm

claranet/linux-vm/azurerm

Terraform Module HCL AZURERM

Terraform module composition (feature) for ARM Linux Virtual Machine (VM)

Install
module "linux-vm" {
source = "claranet/linux-vm/azurerm"
version = "8.7.1"
}
plain text: /constructs/tfmod-claranet-linux-vm-azurerm/install.txt
⭐ Source on GitHub 📦 Registry page
README

Azure Linux Virtual Machine ![Changelog](CHANGELOG.md) ![Notice](NOTICE) ![Apache V2 License](LICENSE) ![OpenTofu Registry](https://search.opentofu.org/module/claranet/linux-vm/azurerm/) This module creates a Linux Virtual Machine. Following tags are automatically set with default values: env, stack, os_family, os_distribution, os_version. This module will also enforce some standard by default: - Azure Monitor agent extension is deployed - A backup policy attached to the VM - Patch management in place with Update Center Requirements EncryptionAtHost feature must be enabled for disk security. ``bash $ az feature register --namespace Microsoft.Compute --name EncryptionAtHost ` Global versioning rule for Claranet Azure modules | Module version | Terraform version | OpenTofu version | AzureRM

Inputs (50)
NameTypeDescriptionDefault
stackstringProject stack name. required
admin_usernamestringUsername for Virtual Machine administrator account. required
resource_group_namestringResource group name. required
vm_sizestringSize (SKU) of the Virtual Machine to create. required
environmentstringProject environment. required
diagnostics_storage_account_namestringName of the Storage Account in which store boot diagnostics. required
azure_monitor_data_collection_ruleobject({ id = string })Data Collection Rule ID from Azure Monitor for metrics and logs collection. Used required
subnetobject({ id = string })ID of the Subnet where the Virtual Machine is created. required
vm_image_idstringThe ID of the image which this Virtual Machine should be created from. This varinull
custom_dns_labelstringThe DNS label to use for public access. Virtual Machine name if not set. DNS wil""
vtpm_enabledboolSpecifies if vTPM (virtual Trusted Platform Module) and Trusted Launch is enabletrue
patch_modestringSpecifies the mode of in-guest patching to this Linux Virtual Machine. Possible "AutomaticByPlatform"
maintenance_configurations_idslist(string)List of maintenance configurations to attach to this VM.[]
public_ip_custom_namestringCustom name for Public IP. Generated if not set.null
entra_ssh_login_extension_versionstringVirtual Machine extension version for Entra ID (aka AAD) SSH Login extension."1.0"
public_ip_extra_tagsmap(string)Extra tags to set on the public IP resource.{}
os_disk_extra_tagsmap(string)Extra tags to set on the OS disk.{}
entra_ssh_login_user_objects_idslist(string)Entra ID (aka AAD) objects IDs allowed to connect as standard user on the Virtua[]
dcr_custom_namestringCustom name for Data collection rule association.null
availability_setobject({ id = string })ID of the availability set in which host the Virtual Machine.null
public_ip_enabledboolShould a Public IP be attached to the Virtual Machine?false
admin_passwordstringPassword for the administrator account of the Virtual Machine.null
nic_ip_forwarding_enabledboolWhether IP Forwarding is enabled on the Network Interface.false
vm_imageobject({ publisher = strinVirtual Machine source image information. See https://www.terraform.io/docs/prov{ "offer": "Ubuntu", "publisher": "C
load_balancer_attachmentobject({ id = string })ID of the Load Balancer Backend Pool to attach the Virtual Machine to.null
monitoring_agent_enabledbool`true` to use and deploy the Azure Monitor Agent.true
encryption_at_host_enabledboolShould all disks (including the temporary disk) attached to the Virtual Machine true
computer_namestringCustom name for the Virtual Machine Hostname. `vm_name` if not set.""
… and 10 more inputs
Outputs (20)
identity_principal_id — Linux Virtual Machine system identity principal ID.
resource — Linux Virtual Machine resource object.
hostname — Hostname of the Virtual Machine.
ip_address_id — Public IP ID of the Virtual Machine.
admin_password — Virtual Machine admin password.
terraform_module — Information about this Terraform module
name — Name of the Virtual Machine.
resource_public_ip — VM Public IP resource object.
admin_ssh_public_key — Virtual Machine admin SSH public key.
resource_os_disk — Virtual Machine OS disk resource object.
id — ID of the Virtual Machine.
public_domain_name_label — Public DNS of the Virtual Machine.
private_ip_address — Private IP address of the Virtual Machine.
nic_name — Name of the Network Interface Configuration attached to the Virtual Machine.
nic_ip_configuration_name — Name of the IP Configuration for the Network Interface Configuration attached to the Virtual Machine
resource_maintenance_configuration_assignment — Maintenance configuration assignment resource object.
public_ip_address — Public IP address of the Virtual Machine.
nic_id — ID of the Network Interface Configuration attached to the Virtual Machine.
admin_username — Virtual Machine admin username.
admin_ssh_private_key — Virtual Machine admin SSH private key.
Resources (13)
azapi_resource_actionazurerm_backup_protected_vmazurerm_linux_virtual_machineazurerm_maintenance_assignment_virtual_machineazurerm_managed_diskazurerm_monitor_data_collection_rule_associationazurerm_network_interfaceazurerm_network_interface_application_gateway_backend_address_pool_associationazurerm_network_interface_backend_address_pool_associationazurerm_public_ipazurerm_role_assignmentazurerm_virtual_machine_data_disk_attachmentazurerm_virtual_machine_extension
Details
FrameworkTerraform Module
LanguageHCL
Version8.7.1
Cloud AZURERM
★ Stars20
Forks15
Total downloads85.7k
Inputs50
Outputs20
Resources13
Examples2
LicenseApache-2.0
Namespaceclaranet
Updated