pulumi_wasm_providers_azure_mini::storage

Module sync_server_endpoint

source
Expand description

Manages a Storage Sync Server Endpoint.

NOTE: The parent azure.storage.SyncGroup must have an azure.storage.SyncCloudEndpoint available before an azure.storage.SyncServerEndpoint resource can be created.

§Example Usage

use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
    let example = resource_group::create(
        "example",
        ResourceGroupArgs::builder()
            .location("West Europe")
            .name("example-resources")
            .build_struct(),
    );
    let exampleAccount = account::create(
        "exampleAccount",
        AccountArgs::builder()
            .account_replication_type("LRS")
            .account_tier("Standard")
            .location("${example.location}")
            .name("example-storage-account")
            .resource_group_name("${example.name}")
            .build_struct(),
    );
    let exampleShare = share::create(
        "exampleShare",
        ShareArgs::builder()
            .acls(
                vec![
                    ShareAcl::builder()
                    .accessPolicies(vec![ShareAclAccessPolicy::builder().permissions("r")
                    .build_struct(),]).id("GhostedRecall").build_struct(),
                ],
            )
            .name("example-storage-share")
            .quota(1)
            .storage_account_name("${exampleAccount.name}")
            .build_struct(),
    );
    let exampleSync = sync::create(
        "exampleSync",
        SyncArgs::builder()
            .location("${example.location}")
            .name("example-storage-sync")
            .resource_group_name("${example.name}")
            .build_struct(),
    );
    let exampleSyncCloudEndpoint = sync_cloud_endpoint::create(
        "exampleSyncCloudEndpoint",
        SyncCloudEndpointArgs::builder()
            .file_share_name("${exampleShare.name}")
            .name("example-ss-ce")
            .storage_account_id("${exampleAccount.id}")
            .storage_sync_group_id("${exampleSyncGroup.id}")
            .build_struct(),
    );
    let exampleSyncGroup = sync_group::create(
        "exampleSyncGroup",
        SyncGroupArgs::builder()
            .name("example-storage-sync-group")
            .storage_sync_id("${exampleSync.id}")
            .build_struct(),
    );
    let exampleSyncServerEndpoint = sync_server_endpoint::create(
        "exampleSyncServerEndpoint",
        SyncServerEndpointArgs::builder()
            .name("example-storage-sync-server-endpoint")
            .registered_server_id("${exampleSync.registeredServers[0]}")
            .storage_sync_group_id("${exampleSyncGroup.id}")
            .build_struct(),
    );
}

§Import

Storage Sync Server Endpoints can be imported using the resource id, e.g.

$ pulumi import azure:storage/syncServerEndpoint:SyncServerEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageSync/storageSyncServices/sync1/syncGroups/syncGroup1/serverEndpoints/endpoint1

Structs§

Functions§

  • Registers a new resource with the given unique name and arguments