azurerm_data_share

Manages a Data Share.

Example Usage

provider "azurerm" {
  features {}
}

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

resource "azurerm_data_share_account" "example" {
  name                = "example-dsa"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name

  identity {
    type = "SystemAssigned"
  }

  tags = {
    foo = "bar"
  }
}

resource "azurerm_data_share" "example" {
  name        = "example_dss"
  account_id  = azurerm_data_share_account.example.id
  kind        = "CopyBased"
  description = "example desc"
  terms       = "example terms"

  snapshot_schedule {
    name       = "example-ss"
    recurrence = "Day"
    start_time = "2020-04-17T04:47:52.9614956Z"
  }
}

Arguments Reference

The following arguments are supported:


A snapshot_schedule block supports the following:

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

Data Shares can be imported using the resource id, e.g.

terraform import azurerm_data_share.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1