Manages a Storage Sync.
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}
resource "azurerm_storage_sync" "example" {
name = "example-storage-sync"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
tags = {
foo = "bar"
}
}
The following arguments are supported:
name
- (Required) The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
resource_group_name
- (Required) The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
location
- (Required) The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
incoming_traffic_policy
- (Optional) Incoming traffic policy. Possible values are AllowAllTraffic
and AllowVirtualNetworksOnly
. Defaults to AllowAllTraffic
.
tags
- (Optional) A mapping of tags which should be assigned to the Storage Sync.
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the Storage Sync.
registered_servers
- A list of registered servers owned by this Storage Sync.
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Storage Sync.read
- (Defaults to 5 minutes) Used when retrieving the Storage Sync.update
- (Defaults to 30 minutes) Used when updating the Storage Sync.delete
- (Defaults to 30 minutes) Used when deleting the Storage Sync.Storage Syncs can be imported using the resource id
, e.g.
terraform import azurerm_storage_sync.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageSync/storageSyncServices/sync1