{"id":15090863,"url":"https://github.com/azure/vagrant-azure","last_synced_at":"2025-10-06T08:31:36.360Z","repository":{"id":14748461,"uuid":"17469588","full_name":"Azure/vagrant-azure","owner":"Azure","description":"Enable Vagrant to manage virtual machines in Microsoft Azure","archived":true,"fork":false,"pushed_at":"2021-01-30T02:33:01.000Z","size":320,"stargazers_count":316,"open_issues_count":51,"forks_count":112,"subscribers_count":58,"default_branch":"v2.0","last_synced_at":"2024-12-22T18:05:57.276Z","etag":null,"topics":["azure","ruby","vagrant","vagrant-azure-plugin","vagrant-plugin"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/Azure.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-06T07:24:13.000Z","updated_at":"2024-12-15T18:08:40.000Z","dependencies_parsed_at":"2022-09-03T14:21:33.675Z","dependency_job_id":null,"html_url":"https://github.com/Azure/vagrant-azure","commit_stats":null,"previous_names":["msopentech/vagrant-azure"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fvagrant-azure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fvagrant-azure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fvagrant-azure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fvagrant-azure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azure","download_url":"https://codeload.github.com/Azure/vagrant-azure/tar.gz/refs/heads/v2.0","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235515424,"owners_count":19002481,"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","ruby","vagrant","vagrant-azure-plugin","vagrant-plugin"],"created_at":"2024-09-25T10:34:24.502Z","updated_at":"2025-10-06T08:31:35.883Z","avatar_url":"https://github.com/Azure.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"**PSA:** Hi vagrant-azure plugin users, we are unable to continue supporting this project, so it is now archived. Even though this project is archived, the existing plugin will still work as it currently does. This should not affect any workflows currently using vagrat-azure.\n\nWe know there are many folks who are actively using this plugin but have long suffered from a lack of support in this project. We would like to encourage the community to fork this project and work together to advance and support Vagrant on Azure.\n\nWe thank everyone for their support through usage, issues and contributions.\n\n\n# Vagrant Azure Provider\n\n[![Gem Version](https://badge.fury.io/rb/vagrant-azure.png)](https://rubygems.org/gems/vagrant-azure)\n\nThis is a [Vagrant](http://www.vagrantup.com) 1.7.3+ plugin that adds [Microsoft Azure](https://azure.microsoft.com)\nprovider to Vagrant, allowing Vagrant to control and provision machines in Microsoft Azure.\n\n## Getting Started\n\n[Install Vagrant](https://www.vagrantup.com/docs/installation/)\n\n### Create an Azure Active Directory (AAD) Application\nAAD encourages the use of Applications / Service Principals for authenticating applications. An \napplication / service principal combination provides a service identity for Vagrant to manage your Azure Subscription.\n[Click here to learn about AAD applications and service principals.](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects)\n- [Install the Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)\n- run `az login` to log into Azure\n- run `az ad sp create-for-rbac` to create an Azure Active Directory Application with access to Azure Resource Manager \nfor the current Azure Subscription\n  - If you want to run this for a different Azure Subscription, run `az account set --subscription 'your subscription name'`\n- run `az account list --query \"[?isDefault].id\" -o tsv` to get your Azure Subscription Id.\n  \nThe output of `az ad sp create-for-rbac` should look like the following:\n```json\n{\n  \"appId\": \"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\",\n  \"displayName\": \"some-display-name\",\n  \"name\": \"http://azure-cli-2017-04-03-15-30-52\",\n  \"password\": \"XXXXXXXXXXXXXXXXXXXX\",\n  \"tenant\": \"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\"\n}\n```\nThe values `tenant`, `appId` and `password` map to the configuration values \n`azure.tenant_id`, `azure.client_id` and `azure.client_secret` in your Vagrant file or environment variables.\n\nFor ***nix**, edit your `Vagrantfile` as shown below and provide all the values as explained.\n\n### Create a Vagrantfile\n\nCreate a directory and add the Linux or Windows Vagrantfile content below to a file named `Vagrantfile`.\n\n#### Linux Vagrantfile\n```ruby\nVagrant.configure('2') do |config|\n  config.vm.box = 'azure'\n\n  # use local ssh key to connect to remote vagrant box\n  config.ssh.private_key_path = '~/.ssh/id_rsa'\n  config.vm.provider :azure do |azure, override|\n\n    # each of the below values will default to use the env vars named as below if not specified explicitly\n    azure.tenant_id = ENV['AZURE_TENANT_ID']\n    azure.client_id = ENV['AZURE_CLIENT_ID']\n    azure.client_secret = ENV['AZURE_CLIENT_SECRET']\n    azure.subscription_id = ENV['AZURE_SUBSCRIPTION_ID']\n  end\n\nend\n```\n\n#### Windows Vagrantfile\n```ruby\nVagrant.configure('2') do |config|\n  config.vm.box = 'azure'\n\n  config.vm.provider :azure do |azure, override|\n\n    # each of the below values will default to use the env vars named as below if not specified explicitly\n    azure.tenant_id = ENV['AZURE_TENANT_ID']\n    azure.client_id = ENV['AZURE_CLIENT_ID']\n    azure.client_secret = ENV['AZURE_CLIENT_SECRET']\n    azure.subscription_id = ENV['AZURE_SUBSCRIPTION_ID']\n\n    azure.vm_image_urn = 'MicrosoftSQLServer:SQL2016-WS2012R2:Express:latest'\n    azure.instance_ready_timeout = 600\n    azure.vm_password = 'TopSecretPassw0rd'\n    azure.admin_username = \"OctoAdmin\"\n    override.winrm.transport = :ssl\n    override.winrm.port = 5986\n    override.winrm.ssl_peer_verification = false # must be false if using a self signed cert\n  end\n\nend\n```\n\n### Spin Up a Box in Azure\n\nInstall the vagrant-azure plugin using the standard Vagrant 1.1+ installation methods. After installing the plugin, \nyou can ```vagrant up``` and use ```azure``` provider. For example:\n\n```sh\n$ vagrant box add azure https://github.com/azure/vagrant-azure/raw/v2.0/dummy.box --provider azure\n$ vagrant plugin install vagrant-azure\n$ vagrant up --provider=azure\n```\n\nThis will bring up an Azure VM as per the configuration options set above.\n\nYou can now either SSH (if its a *Nix VM) using ```vagrant ssh```, RDP (if its a Windows VM) using ```vagrant rdp``` \nor PowerShell ```vagrant powershell```.\n\nNormally, a lot of the options, e.g., ```vm_image_urn```, will be embedded in a box file and you just have to provide \nminimal options in the ```Vagrantfile```. Since, we're using a dummy box, there are no pre-configured defaults.\n\n## Configuration\n\nThe vagrant-azure provide exposes Azure specific configuration options:\n\n### Mandatory Parameters\n* `tenant_id`: Your Azure Active Directory Tenant Id.\n* `client_id`: Your Azure Active Directory application client id.\n* `client_secret`: Your Azure Active Directory application client secret.\n* `subscription_id`: The Azure subscription Id you'd like to use.\n*Note: to procure these values see: [Create an Azure Active Directory Application](#create-an-azure-active-directory-aad-application)*\n\n### Optional VM Parameters\n* `vm_name`: Name of the virtual machine\n* `vm_password`: (Optional for *nix) Password for the VM -- This is not recommended for *nix deployments\n* `vm_size`: VM size to be used -- defaults to 'Standard_DS2_v2'. See sizes for [*nix](https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-sizes/), [Windows](https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes/).\n* `admin_username`: The root/administrator username for the VM\n\n### Optional VM Image Parameters\n`vm_image_urn`, `vm_vhd_uri`, and `vm_managed_image_id` are mutually exclusive. They should not be used in combination.\n* `vm_image_urn`: Name of the virtual machine image urn to use -- defaults to 'canonical:ubuntuserver:16.04-LTS:latest'. See documentation for [*nix](https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-cli-ps-findimage/), [Windows](https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-cli-ps-findimage).\n* `vm_vhd_uri`: URI to the custom VHD. If the VHD is not publicly accessible, provide a SAS token in the URI.\n    * `vm_operating_system`: (Mandatory) Must provide the OS if using a custom image (\"Linux\" or \"Windows\")\n    * `vm_vhd_storage_account_id`: (Manditory) The Storage Account Azure Resource Manager Id where the OS Image is stored\n        (like: /subscriptions/{subscription id}/resourceGroups/{resource group}/providers/Microsoft.Storage/storageAccounts/{account name}).\n* `vm_managed_image_id`: Create a VM from a generalized VM that is stored as either a managed or unmanaged disk. See: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource\n\n### Optional VM Data Disk Parameters (Preview)\nThe data disk functionality is preview and may change before the 2.0 release.\n* `data_disks`: (Optional) Array of Data Disks to attach to the VM. For information on attaching the drive, See: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk.\n```ruby\noverride.data_disks = [\n    # sample of creating empty data disk\n    {\n      name: \"mydatadisk1\", \n      size_gb: 30\n    }\n]\n```\n\n### Optional Networking Parameters\n* `virtual_network_name`: (Optional) Name of the virtual network resource\n* `dns_name`: (Optional) DNS Label Prefix \n* `nsg_name`: (Optional) Network Security Group Label Prefix \n* `subnet_name`: (Optional) Name of the virtual network subnet resource\n* `tcp_endpoints`: (Optional) The custom inbound security rules part of network security group (a.k.a. opened tcp endpoints). Allows specifying one or more intervals in the form of:\n  * an array `['8000-9000', '9100-9200']`, \n  * a single interval as `'8000-9000'`,\n  * a single port as `8000`.\n\n### Optional Windows Parameters\n* `winrm_install_self_signed_cert`: (Optional, Windows only) Whether to install a self-signed cert automatically to enable WinRM to communicate over HTTPS (5986). Only available when a custom `deployment_template` is not supplied. Default 'true'.\n\n### Optional Provisioning Parameters\n* `instance_ready_timeout`: (Optional) The timeout to wait for an instance to become ready -- default 120 seconds.\n* `instance_check_interval`: (Optional) The interval to wait for checking an instance's state -- default 2 seconds.\n* `wait_for_destroy`: (Optional) Wait for all resources to be deleted prior to completing Vagrant destroy -- default false.\n\n### Optional Azure Parameters\n* `endpoint`: (Optional) The Azure Management API endpoint -- default `ENV['AZURE_MANAGEMENT_ENDPOINT']` if exists, falls back to \u003chttps://management.azure.com\u003e.\n* `resource_group_name`: (Optional) Name of the resource group to use.\n* `location`: (Optional) Azure location to build the VM -- defaults to `westus`\n\n## [Extended Documentation](./docs/)\nFor more information on common scenarios and other features visit the [extended documentation](./docs/).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fvagrant-azure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazure%2Fvagrant-azure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fvagrant-azure/lists"}