Azure Storage Sync Cloud Endpoint
This page shows how to write Terraform and Azure Resource Manager for Storage Sync Cloud Endpoint and write them securely.
azurerm_storage_sync_cloud_endpoint (Terraform)
The Sync Cloud Endpoint in Storage can be configured in Terraform with the resource name azurerm_storage_sync_cloud_endpoint
. The following sections describe 1 example of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_storage_sync_cloud_endpoint" "sync_cloud_endpoint" {
name = local.resource_storage_sync_cloud_endpoint_name
storage_sync_group_id = azurerm_storage_sync_group.sync_group.id
file_share_name = azurerm_storage_share.share.name
storage_account_id = azurerm_storage_account.account.id
}
Parameters
-
file_share_name
required - string -
id
optional computed - string -
name
required - string -
storage_account_id
required - string -
storage_account_tenant_id
optional computed - string -
storage_sync_group_id
required - string -
timeouts
single block
Explanation in Terraform Registry
Manages a Storage Sync Cloud Endpoint. -> NOTE: Please ensure Azure File Sync has access to the storage account in your subscription, which indicates that
Microsoft.StorageSync
is assigned roleReader and Data Access
( refer to details here).
Tips: Best Practices for The Other Azure Storage Resources
In addition to the azurerm_storage_account, Azure Storage has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.
azurerm_storage_account
Ensure to use HTTPS connections
It is better to use HTTPS instead of HTTP, which could be vulnerable to person-in-the-middle attacks.
azurerm_storage_account_network_rules
Ensure to allow Trusted Microsoft Services to bypass
It is better to allow Trusted Microsoft Services to bypass. They are not able to access storage account unless rules are set to allow them explicitly.
Microsoft.StorageSync/storageSyncServices/syncGroups/cloudEndpoints (Azure Resource Manager)
The storageSyncServices/syncGroups/cloudEndpoints in Microsoft.StorageSync can be configured in Azure Resource Manager with the resource name Microsoft.StorageSync/storageSyncServices/syncGroups/cloudEndpoints
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
apiVersion
required - stringname
required - stringName of Cloud Endpoint object.
properties
requiredazureFileShareName
optional - stringAzure file share name
friendlyName
optional - stringFriendly Name
storageAccountResourceId
optional - stringStorage Account Resource Id
storageAccountTenantId
optional - stringStorage Account Tenant Id
type
required - string
Frequently asked questions
What is Azure Storage Sync Cloud Endpoint?
Azure Storage Sync Cloud Endpoint is a resource for Storage of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Storage Sync Cloud Endpoint?
For Terraform, the wesley-trust/Terraform source code example is useful. See the Terraform Example section for further details.