azurestack_image

Manages a custom virtual machine image that can be used to create virtual machines.

Example Usage Creating from VHD

resource "azurestack_resource_group" "example" {
  name     = "example-resources"
  location = "local"
}

resource "azurestack_image" "example" {
  name                = "acctest"
  location            = "local"
  resource_group_name = azurestack_resource_group.example.name

  os_disk {
    os_type  = "Linux"
    os_state = "Generalized"
    blob_uri = "{blob_uri}"
    size_gb  = 30
    caching  = "None"
  }
}

Argument Reference

The following arguments are supported:

os_disk supports the following:

data_disk supports the following:

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Images can be imported using the resource id, e.g.

terraform import azurestack_image.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/microsoft.compute/images/image1