{"id":28469574,"url":"https://github.com/patkoch/terraform-azure-vm-linux","last_synced_at":"2026-05-06T11:36:05.962Z","repository":{"id":297659163,"uuid":"997443194","full_name":"patkoch/terraform-azure-vm-linux","owner":"patkoch","description":"Terraform configuration for deploying a Linux virtual machine on Azure","archived":false,"fork":false,"pushed_at":"2025-06-10T04:53:02.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-01T15:48:19.243Z","etag":null,"topics":["azure","linux","terraform","ubuntu","ubuntu-22-04"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patkoch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-06-06T14:33:47.000Z","updated_at":"2025-06-19T14:13:28.000Z","dependencies_parsed_at":"2025-06-06T17:47:05.716Z","dependency_job_id":null,"html_url":"https://github.com/patkoch/terraform-azure-vm-linux","commit_stats":null,"previous_names":["patkoch/terraform-azure-vm-linux"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/patkoch/terraform-azure-vm-linux","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patkoch%2Fterraform-azure-vm-linux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patkoch%2Fterraform-azure-vm-linux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patkoch%2Fterraform-azure-vm-linux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patkoch%2Fterraform-azure-vm-linux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patkoch","download_url":"https://codeload.github.com/patkoch/terraform-azure-vm-linux/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patkoch%2Fterraform-azure-vm-linux/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32692278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["azure","linux","terraform","ubuntu","ubuntu-22-04"],"created_at":"2025-06-07T09:07:54.440Z","updated_at":"2026-05-06T11:36:05.956Z","avatar_url":"https://github.com/patkoch.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform configuration for deploying a Linux (Ubuntu) virtual machine on Azure\n\n## Prepare your terraform.tfvars file\n\nCreate a file named \"terraform.tfvars\" and save it in the working directory of the Terraform configuration, so side by side to the *.tf files.\n\n``` terraform\nsubscription_id                = \"\u003creplace that with your Azure Subscription ID\u003e\"\nresource_group_name            = \"rg-virtualmachinelinux-dev-001\"\nresource_group_location        = \"West Europe\"\nvnet_name                      = \"vnet-dev-westeurope-001\"\nsubnet_name                    = \"internal\"\npublic_ip_name                 = \"pip-ubuntudev-westeurope-001\"\nnetwork_interface_name         = \"nic-01-ubuntudev-dev-001\"\nvirtual_machine_name           = \"vm-ubuntudev-westeurope-001\"\nvirtual_machine_size           = \"Standard_B2s\"\nstorage_image_reference_offer = \"0001-com-ubuntu-server-jammy\"\nstorage_image_reference_publisher = \"Canonical\"\nstorage_image_reference_sku   = \"22_04-lts\"\nstorage_image_reference_version = \"latest\"\nvirtual_machine_admin_username = \"azureuser\"\nvirtual_machine_admin_password = \"P@ssw0rd1234!\"\nvirtual_machine_ssh_key_path   = \"id_rsa.pub\"\n```\n\nSet the values due to your needs.\n\n``` bash\naz vm image list-skus --location westeurope --publisher Canonical --offer 0001-com-ubuntu-server-jammy --output table\n```\n\nExample result:\n\n```\nLocation    Name\n----------  ---------------\nwesteurope  22_04-lts\nwesteurope  22_04-lts-arm64\nwesteurope  22_04-lts-gen2\n```\n\n## Create a public/private key pair\n\nIn the same directory as your .tf files are located, run\n\n``` terraform\n  ssh-keygen -f id_rsa\n```\n\nSkip the passphrase.\n\n## Deployment of the virtual machine using Terraform\n\nConduct the initialization with the following command:\n\n``` terraform\n  terraform init\n```\nMake sure your Terraform configuration files are in the desired format, by using:\n\n``` terraform\nterraform fmt\n```\n\nValidate your Terraform configuration\n\n``` terraform\nterraform validate\n```\n\nCreate a Terraform plan by running:\n\n``` terraform\nterraform plan -out tfplan\n```\n\nDeploy the Ubuntu VM on Azure executing:\n\n``` terraform\nterraform apply tfplan\n```\n\n## Access the virtual machine\n\nEnsure the proper permission for the private key:\n\n``` bash\nchmod 600 id_rsa\n```\n\nEstablish a connection to the virtual machine using:\n\n``` bash\nssh -i id_rsa azureuser@\u003cpublic ip address\u003e\n```\n\n## Destruction of the virtual machine using Terraform\n\nDestroy the Ubuntu VM on Azure executing:\n\n``` terraform\nterraform destroy\n```\n\nConfirm the destruction with entering \"yes\".\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatkoch%2Fterraform-azure-vm-linux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatkoch%2Fterraform-azure-vm-linux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatkoch%2Fterraform-azure-vm-linux/lists"}