{"id":15780040,"url":"https://github.com/rgl/azure-ubuntu-vm","last_synced_at":"2026-01-27T09:16:29.363Z","repository":{"id":139750247,"uuid":"162892502","full_name":"rgl/azure-ubuntu-vm","owner":"rgl","description":"an example azure ubuntu virtual machine","archived":false,"fork":false,"pushed_at":"2024-09-21T14:16:53.000Z","size":95,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-31T11:05:56.958Z","etag":null,"topics":["azure","example","terraform","ubuntu"],"latest_commit_sha":null,"homepage":null,"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/rgl.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}},"created_at":"2018-12-23T13:20:11.000Z","updated_at":"2024-09-21T14:16:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"d162b87f-8825-40f0-95c6-9e785d99e397","html_url":"https://github.com/rgl/azure-ubuntu-vm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fazure-ubuntu-vm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fazure-ubuntu-vm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fazure-ubuntu-vm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fazure-ubuntu-vm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rgl","download_url":"https://codeload.github.com/rgl/azure-ubuntu-vm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243547627,"owners_count":20308743,"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":["azure","example","terraform","ubuntu"],"created_at":"2024-10-04T18:40:25.078Z","updated_at":"2026-01-27T09:16:29.319Z","avatar_url":"https://github.com/rgl.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"an example azure ubuntu virtual machine\n\n![](architecture.png)\n\n# Usage (on a Ubuntu Desktop)\n\nInstall the tools:\n\n```bash\n./provision-tools.sh\n```\n\nLogin into azure:\n\n```bash\naz login\n```\n\nList the subscriptions:\n\n```bash\naz account list --all\naz account show\n```\n\nSet the subscription:\n\n```bash\nexport ARM_SUBSCRIPTION_ID=\"\u003cYOUR-SUBSCRIPTION-ID\u003e\"\naz account set --subscription \"$ARM_SUBSCRIPTION_ID\"\n```\n\nReview `main.tf` and maybe change the `location` variable.\n\nInitialize terraform:\n\n```bash\nmake terraform-init\n```\n\nLaunch the example:\n\n```bash\nmake terraform-apply\n```\n\nAt VM initialization time [cloud-init](https://cloudinit.readthedocs.io/en/latest/index.html) will run the `provision-app.sh` script to launch the example application.\n\nAfter VM initialization is done (check the boot diagnostics serial log for cloud-init entries), test the `app` endpoint:\n\n```bash\nwhile ! wget -qO- \"http://$(terraform output --raw app_ip_address)/test\"; do sleep 3; done\nwhile ! wget -qO- \"http://[$(terraform output --raw app_ipv6_ip_address)]/test\"; do sleep 3; done\n```\n\nOpen a shell inside the VM, and poke it:\n\n```bash\nssh \"$(terraform output --raw app_ip_address)\"\nsudo cat /etc/netplan/50-cloud-init.yaml\nip addr\nip -4 route\nip -6 route\nping -6 -n -c 3 2606:4700:4700::1111    # cloudflare dns.\nping -6 -n -c 3 2606:4700:4700::1001    # cloudflare dns.\nping -6 -n -c 3 ff02::1                 # all nodes.   # NB does not work in azure.\nping -6 -n -c 3 ff02::2                 # all routers. # NB does not work in azure.\nping -4 -n -c 3 ip6.me\nping -6 -n -c 3 ip6.me\ndig -4 aaaa ip6.me\ndig -6 aaaa ip6.me @2606:4700:4700::1111\ncurl -4 https://ip6.me/api/ # get the vm public ipv4 address.\ncurl -6 https://ip6.me/api/ # get the vm public ipv6 address.\ncurl http://ip6only.me/api/ # get the vm public ipv6 address.\ncurl http://10.1.1.4/test   # try the app private ipv4 endpoint.\ncurl http://[fd00::4]/test  # try the app private ipv6 endpoint.\nipv6_public_test_url=\"http://[$(curl -6 -s https://ip6.me/api/ | awk -F, '{print $2}')]/test\"\ncurl \"$ipv6_public_test_url\" # try the app public ipv6 endpoint.\necho \"go to https://dnschecker.org/server-headers-check.php and test the app ipv6 url:\n$ipv6_public_test_url\"\nexit\n```\n\nDestroy the example:\n\n```bash\nmake terraform-destroy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Fazure-ubuntu-vm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frgl%2Fazure-ubuntu-vm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Fazure-ubuntu-vm/lists"}