{"id":18578955,"url":"https://github.com/libre-devops/terraform-azurerm-linux-vm-scale-sets","last_synced_at":"2025-05-16T02:12:39.509Z","repository":{"id":118714516,"uuid":"496693874","full_name":"libre-devops/terraform-azurerm-linux-vm-scale-sets","owner":"libre-devops","description":"A module which will build Linux Virtual Machine Scale Sets","archived":false,"fork":false,"pushed_at":"2022-05-27T21:59:22.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-30T15:44:33.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libre-devops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-26T16:30:12.000Z","updated_at":"2022-05-26T16:30:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"0afff71a-021b-4dd6-9e20-e835b781def4","html_url":"https://github.com/libre-devops/terraform-azurerm-linux-vm-scale-sets","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":"libre-devops/terraform-module-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libre-devops%2Fterraform-azurerm-linux-vm-scale-sets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libre-devops%2Fterraform-azurerm-linux-vm-scale-sets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libre-devops%2Fterraform-azurerm-linux-vm-scale-sets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libre-devops%2Fterraform-azurerm-linux-vm-scale-sets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libre-devops","download_url":"https://codeload.github.com/libre-devops/terraform-azurerm-linux-vm-scale-sets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453625,"owners_count":22073618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T23:38:24.467Z","updated_at":"2025-05-16T02:12:39.491Z","avatar_url":"https://github.com/libre-devops.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"```hcl\r\nmodule \"rg\" {\r\n  source = \"registry.terraform.io/libre-devops/rg/azurerm\"\r\n\r\n  rg_name  = \"rg-${var.short}-${var.loc}-${terraform.workspace}-build\" // rg-ldo-euw-dev-build\r\n  location = local.location                                            // compares var.loc with the var.regions var to match a long-hand name, in this case, \"euw\", so \"westeurope\"\r\n  tags     = local.tags\r\n\r\n  #  lock_level = \"CanNotDelete\" // Do not set this value to skip lock\r\n}\r\n\r\nmodule \"network\" {\r\n  source = \"registry.terraform.io/libre-devops/network/azurerm\"\r\n\r\n  rg_name  = module.rg.rg_name // rg-ldo-euw-dev-build\r\n  location = module.rg.rg_location\r\n  tags     = local.tags\r\n\r\n  vnet_name     = \"vnet-${var.short}-${var.loc}-${terraform.workspace}-01\" // vnet-ldo-euw-dev-01\r\n  vnet_location = module.network.vnet_location\r\n\r\n  address_space   = [\"10.0.0.0/16\"]\r\n  subnet_prefixes = [\"10.0.1.0/24\", \"10.0.2.0/24\", \"10.0.3.0/24\"]\r\n  subnet_names    = [\"sn1-${module.network.vnet_name}\", \"sn2-${module.network.vnet_name}\", \"sn3-${module.network.vnet_name}\"] //sn1-vnet-ldo-euw-dev-01\r\n  subnet_service_endpoints = {\r\n    \"sn1-${module.network.vnet_name}\" = [\"Microsoft.Storage\"]                   // Adds extra subnet endpoints to sn1-vnet-ldo-euw-dev-01\r\n    \"sn2-${module.network.vnet_name}\" = [\"Microsoft.Storage\", \"Microsoft.Sql\"], // Adds extra subnet endpoints to sn2-vnet-ldo-euw-dev-01\r\n    \"sn3-${module.network.vnet_name}\" = [\"Microsoft.AzureActiveDirectory\"]      // Adds extra subnet endpoints to sn3-vnet-ldo-euw-dev-01\r\n  }\r\n}\r\n\r\nmodule \"nsg\" {\r\n  source = \"registry.terraform.io/libre-devops/nsg/azurerm\"\r\n\r\n  rg_name  = module.rg.rg_name\r\n  location = module.rg.rg_location\r\n  tags     = module.rg.rg_tags\r\n\r\n  nsg_name  = \"nsg-${var.short}-${var.loc}-${terraform.workspace}-01\"\r\n  subnet_id = element(values(module.network.subnets_ids), 0)\r\n\r\n}\r\n\r\nmodule \"linux_scale_set\" {\r\n  source = \"registry.terraform.io/libre-devops/linux-vm-scale-sets/azurerm\"\r\n\r\n  rg_name  = module.rg.rg_name\r\n  location = module.rg.rg_location\r\n  tags     = module.rg.rg_tags\r\n\r\n  ssh_public_key   = data.azurerm_ssh_public_key.mgmt_ssh_key.public_key\r\n  use_simple_image = true\r\n  vm_os_simple     = \"Ubuntu20.04\"\r\n  identity_type    = \"SystemAssigned\"\r\n  asg_name         = \"asg-vmss${var.short}${var.loc}${terraform.workspace}-${var.short}-${var.loc}-${terraform.workspace}-01\"\r\n  admin_username   = \"LibreDevOpsAdmin\"\r\n\r\n  settings = {\r\n    \"vmss${var.short}${var.loc}${terraform.workspace}01\" = {\r\n\r\n      sku                             = \"Standard_B4ms\"\r\n      disable_password_authentication = true\r\n      instances                       = 2\r\n      overprovision                   = false\r\n      zones                           = [\"1\"]\r\n      provision_vm_agent              = true\r\n\r\n      os_disk = {\r\n        storage_account_type = \"Standard_LRS\"\r\n        disk_size_gb         = \"127\"\r\n      }\r\n\r\n      network_interface = {\r\n        network_security_group_id = module.nsg.nsg_id\r\n\r\n        ip_configuration = {\r\n          subnet_id = element(values(module.network.subnets_ids), 0)\r\n        }\r\n      }\r\n\r\n      admin_ssh_key = {\r\n        public_key = data.azurerm_ssh_public_key.mgmt_ssh_key.public_key\r\n      }\r\n    }\r\n  }\r\n}\r\n\r\n```\r\n## Requirements\r\n\r\nNo requirements.\r\n\r\n## Providers\r\n\r\n| Name | Version |\r\n|------|---------|\r\n| \u003ca name=\"provider_azurerm\"\u003e\u003c/a\u003e [azurerm](#provider\\_azurerm) | n/a |\r\n\r\n## Modules\r\n\r\n| Name | Source | Version |\r\n|------|--------|---------|\r\n| \u003ca name=\"module_os_calculator\"\u003e\u003c/a\u003e [os\\_calculator](#module\\_os\\_calculator) | registry.terraform.io/libre-devops/linux-os-sku-calculator/azurerm | n/a |\r\n| \u003ca name=\"module_os_calculator_with_plan\"\u003e\u003c/a\u003e [os\\_calculator\\_with\\_plan](#module\\_os\\_calculator\\_with\\_plan) | registry.terraform.io/libre-devops/linux-os-sku-with-plan-calculator/azurerm | n/a |\r\n\r\n## Resources\r\n\r\n| Name | Type |\r\n|------|------|\r\n| [azurerm_application_security_group.asg](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/application_security_group) | resource |\r\n| [azurerm_linux_virtual_machine_scale_set.linux_vm_scale_set](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine_scale_set) | resource |\r\n| [azurerm_marketplace_agreement.plan_acceptance_custom](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/marketplace_agreement) | resource |\r\n| [azurerm_marketplace_agreement.plan_acceptance_simple](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/marketplace_agreement) | resource |\r\n\r\n## Inputs\r\n\r\n| Name | Description | Type | Default | Required |\r\n|------|-------------|------|---------|:--------:|\r\n| \u003ca name=\"input_admin_password\"\u003e\u003c/a\u003e [admin\\_password](#input\\_admin\\_password) | The admin password to be used on the VMSS that will be deployed. The password must meet the complexity requirements of Azure. | `string` | `\"\"` | no |\r\n| \u003ca name=\"input_admin_username\"\u003e\u003c/a\u003e [admin\\_username](#input\\_admin\\_username) | The admin username of the VM that will be deployed. | `string` | `\"LibreDevOpsAdmin\"` | no |\r\n| \u003ca name=\"input_asg_name\"\u003e\u003c/a\u003e [asg\\_name](#input\\_asg\\_name) | Name of the application security group | `string` | n/a | yes |\r\n| \u003ca name=\"input_identity_ids\"\u003e\u003c/a\u003e [identity\\_ids](#input\\_identity\\_ids) | Specifies a list of user managed identity ids to be assigned to the VM. | `list(string)` | `[]` | no |\r\n| \u003ca name=\"input_identity_type\"\u003e\u003c/a\u003e [identity\\_type](#input\\_identity\\_type) | The Managed Service Identity Type of this Virtual Machine. | `string` | `\"\"` | no |\r\n| \u003ca name=\"input_location\"\u003e\u003c/a\u003e [location](#input\\_location) | The location for this resource to be put in | `string` | n/a | yes |\r\n| \u003ca name=\"input_plan\"\u003e\u003c/a\u003e [plan](#input\\_plan) | When a plan VM is used with a image not in the calculator, this will contain the variables used | `map(any)` | `{}` | no |\r\n| \u003ca name=\"input_rg_name\"\u003e\u003c/a\u003e [rg\\_name](#input\\_rg\\_name) | The name of the resource group, this module does not create a resource group, it is expecting the value of a resource group already exists | `string` | n/a | yes |\r\n| \u003ca name=\"input_settings\"\u003e\u003c/a\u003e [settings](#input\\_settings) | Used for the settings block | `any` | n/a | yes |\r\n| \u003ca name=\"input_source_image_reference\"\u003e\u003c/a\u003e [source\\_image\\_reference](#input\\_source\\_image\\_reference) | Whether the module should use the a custom image | `map(any)` | `{}` | no |\r\n| \u003ca name=\"input_ssh_public_key\"\u003e\u003c/a\u003e [ssh\\_public\\_key](#input\\_ssh\\_public\\_key) | The public key to be added to the admin username | `string` | n/a | yes |\r\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | A map of the tags to use on the resources that are deployed with this module. | `map(string)` | \u003cpre\u003e{\u003cbr\u003e  \"source\": \"terraform\"\u003cbr\u003e}\u003c/pre\u003e | no |\r\n| \u003ca name=\"input_use_simple_image\"\u003e\u003c/a\u003e [use\\_simple\\_image](#input\\_use\\_simple\\_image) | Whether the module should use the simple OS calculator module, default is true | `bool` | `true` | no |\r\n| \u003ca name=\"input_use_simple_image_with_plan\"\u003e\u003c/a\u003e [use\\_simple\\_image\\_with\\_plan](#input\\_use\\_simple\\_image\\_with\\_plan) | If you are using the Windows OS Sku Calculator with plan, set this to true. Default is false | `bool` | `false` | no |\r\n| \u003ca name=\"input_vm_os_id\"\u003e\u003c/a\u003e [vm\\_os\\_id](#input\\_vm\\_os\\_id) | The resource ID of the image that you want to deploy if you are using a custom image.Note, need to provide is\\_windows\\_image = true for windows custom images. | `string` | `\"\"` | no |\r\n| \u003ca name=\"input_vm_os_offer\"\u003e\u003c/a\u003e [vm\\_os\\_offer](#input\\_vm\\_os\\_offer) | The name of the offer of the image that you want to deploy. This is ignored when vm\\_os\\_id or vm\\_os\\_simple are provided. | `string` | `\"\"` | no |\r\n| \u003ca name=\"input_vm_os_publisher\"\u003e\u003c/a\u003e [vm\\_os\\_publisher](#input\\_vm\\_os\\_publisher) | The name of the publisher of the image that you want to deploy. This is ignored when vm\\_os\\_id or vm\\_os\\_simple are provided. | `string` | `\"\"` | no |\r\n| \u003ca name=\"input_vm_os_simple\"\u003e\u003c/a\u003e [vm\\_os\\_simple](#input\\_vm\\_os\\_simple) | Specify WindowsServer, to get the latest image version of the specified os.  Do not provide this value if a custom value is used for vm\\_os\\_publisher, vm\\_os\\_offer, and vm\\_os\\_sku. | `string` | `\"\"` | no |\r\n| \u003ca name=\"input_vm_os_sku\"\u003e\u003c/a\u003e [vm\\_os\\_sku](#input\\_vm\\_os\\_sku) | The sku of the image that you want to deploy. This is ignored when vm\\_os\\_id or vm\\_os\\_simple are provided. | `string` | `\"\"` | no |\r\n| \u003ca name=\"input_vm_os_version\"\u003e\u003c/a\u003e [vm\\_os\\_version](#input\\_vm\\_os\\_version) | The version of the image that you want to deploy. This is ignored when vm\\_os\\_id or vm\\_os\\_simple are provided. | `string` | `\"latest\"` | no |\r\n| \u003ca name=\"input_vm_plan\"\u003e\u003c/a\u003e [vm\\_plan](#input\\_vm\\_plan) | Used for VMs which requires a plan | `set(string)` | `null` | no |\r\n| \u003ca name=\"input_vm_size\"\u003e\u003c/a\u003e [vm\\_size](#input\\_vm\\_size) | Specifies the size of the virtual machine. | `string` | `\"Standard_B2ms\"` | no |\r\n\r\n## Outputs\r\n\r\n| Name | Description |\r\n|------|-------------|\r\n| \u003ca name=\"output_ss_id\"\u003e\u003c/a\u003e [ss\\_id](#output\\_ss\\_id) | The name of the scale set |\r\n| \u003ca name=\"output_ss_name\"\u003e\u003c/a\u003e [ss\\_name](#output\\_ss\\_name) | The name of the scale set |\r\n| \u003ca name=\"output_ss_principal_id\"\u003e\u003c/a\u003e [ss\\_principal\\_id](#output\\_ss\\_principal\\_id) | Client ID of system assigned managed identity if created |\r\n| \u003ca name=\"output_unique_ss_id\"\u003e\u003c/a\u003e [unique\\_ss\\_id](#output\\_unique\\_ss\\_id) | The id of the scale set |\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibre-devops%2Fterraform-azurerm-linux-vm-scale-sets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibre-devops%2Fterraform-azurerm-linux-vm-scale-sets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibre-devops%2Fterraform-azurerm-linux-vm-scale-sets/lists"}