azurerm_storage_mover_job_definition

Manages a Storage Mover Job Definition.

Example Usage

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_storage_mover" "example" {
  name                = "example-ssm"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
}

resource "azurerm_storage_mover_agent" "example" {
  name                     = "example-agent"
  storage_mover_id         = azurerm_storage_mover.example.id
  arc_virtual_machine_id   = "${azurerm_resource_group.example.id}/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName"
  arc_virtual_machine_uuid = "3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9"
}

resource "azurerm_storage_account" "example" {
  name                            = "examplesa"
  resource_group_name             = azurerm_resource_group.example.name
  location                        = azurerm_resource_group.example.location
  account_tier                    = "Standard"
  account_replication_type        = "LRS"
  allow_nested_items_to_be_public = true
}

resource "azurerm_storage_container" "example" {
  name                  = "acccontainer"
  storage_account_name  = azurerm_storage_account.example.name
  container_access_type = "blob"
}

resource "azurerm_storage_mover_target_endpoint" "example" {
  name                   = "example-smte"
  storage_mover_id       = azurerm_storage_mover.example.id
  storage_account_id     = azurerm_storage_account.example.id
  storage_container_name = azurerm_storage_container.example.name
}

resource "azurerm_storage_mover_source_endpoint" "example" {
  name             = "example-smse"
  storage_mover_id = azurerm_storage_mover.example.id
  host             = "192.168.0.1"
}

resource "azurerm_storage_mover_project" "example" {
  name             = "example-sp"
  storage_mover_id = azurerm_storage_mover.example.id
}

resource "azurerm_storage_mover_job_definition" "example" {
  name                     = "example-sjd"
  storage_mover_project_id = azurerm_storage_mover_project.example.id
  agent_name               = azurerm_storage_mover_agent.example.name
  copy_mode                = "Additive"
  source_name              = azurerm_storage_mover_source_endpoint.example.name
  source_sub_path          = "/"
  target_name              = azurerm_storage_mover_target_endpoint.example.name
  target_sub_path          = "/"
  description              = "Example Job Definition Description"
}

Arguments Reference

The following arguments are supported:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

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

Import

Storage Mover Job Definition can be imported using the resource id, e.g.

terraform import azurerm_storage_mover_job_definition.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.StorageMover/storageMovers/storageMover1/projects/project1/jobDefinitions/jobDefinition1