Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.siterecovery.kotlin
import com.pulumi.azure.siterecovery.FabricArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages a Azure Site Recovery Replication Fabric within a Recovery Services vault. Only Azure fabrics are supported at this time. Replication Fabrics serve as a container within an Azure region for other Site Recovery resources such as protection containers, protected items, network mappings.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const primary = new azure.core.ResourceGroup("primary", {
* name: "tfex-network-mapping-primary",
* location: "West US",
* });
* const secondary = new azure.core.ResourceGroup("secondary", {
* name: "tfex-network-mapping-secondary",
* location: "East US",
* });
* const vault = new azure.recoveryservices.Vault("vault", {
* name: "example-recovery-vault",
* location: secondary.location,
* resourceGroupName: secondary.name,
* sku: "Standard",
* });
* const fabric = new azure.siterecovery.Fabric("fabric", {
* name: "primary-fabric",
* resourceGroupName: secondary.name,
* recoveryVaultName: vault.name,
* location: primary.location,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* primary = azure.core.ResourceGroup("primary",
* name="tfex-network-mapping-primary",
* location="West US")
* secondary = azure.core.ResourceGroup("secondary",
* name="tfex-network-mapping-secondary",
* location="East US")
* vault = azure.recoveryservices.Vault("vault",
* name="example-recovery-vault",
* location=secondary.location,
* resource_group_name=secondary.name,
* sku="Standard")
* fabric = azure.siterecovery.Fabric("fabric",
* name="primary-fabric",
* resource_group_name=secondary.name,
* recovery_vault_name=vault.name,
* location=primary.location)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var primary = new Azure.Core.ResourceGroup("primary", new()
* {
* Name = "tfex-network-mapping-primary",
* Location = "West US",
* });
* var secondary = new Azure.Core.ResourceGroup("secondary", new()
* {
* Name = "tfex-network-mapping-secondary",
* Location = "East US",
* });
* var vault = new Azure.RecoveryServices.Vault("vault", new()
* {
* Name = "example-recovery-vault",
* Location = secondary.Location,
* ResourceGroupName = secondary.Name,
* Sku = "Standard",
* });
* var fabric = new Azure.SiteRecovery.Fabric("fabric", new()
* {
* Name = "primary-fabric",
* ResourceGroupName = secondary.Name,
* RecoveryVaultName = vault.Name,
* Location = primary.Location,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/recoveryservices"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/siterecovery"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* primary, err := core.NewResourceGroup(ctx, "primary", &core.ResourceGroupArgs{
* Name: pulumi.String("tfex-network-mapping-primary"),
* Location: pulumi.String("West US"),
* })
* if err != nil {
* return err
* }
* secondary, err := core.NewResourceGroup(ctx, "secondary", &core.ResourceGroupArgs{
* Name: pulumi.String("tfex-network-mapping-secondary"),
* Location: pulumi.String("East US"),
* })
* if err != nil {
* return err
* }
* vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{
* Name: pulumi.String("example-recovery-vault"),
* Location: secondary.Location,
* ResourceGroupName: secondary.Name,
* Sku: pulumi.String("Standard"),
* })
* if err != nil {
* return err
* }
* _, err = siterecovery.NewFabric(ctx, "fabric", &siterecovery.FabricArgs{
* Name: pulumi.String("primary-fabric"),
* ResourceGroupName: secondary.Name,
* RecoveryVaultName: vault.Name,
* Location: primary.Location,
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.recoveryservices.Vault;
* import com.pulumi.azure.recoveryservices.VaultArgs;
* import com.pulumi.azure.siterecovery.Fabric;
* import com.pulumi.azure.siterecovery.FabricArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var primary = new ResourceGroup("primary", ResourceGroupArgs.builder()
* .name("tfex-network-mapping-primary")
* .location("West US")
* .build());
* var secondary = new ResourceGroup("secondary", ResourceGroupArgs.builder()
* .name("tfex-network-mapping-secondary")
* .location("East US")
* .build());
* var vault = new Vault("vault", VaultArgs.builder()
* .name("example-recovery-vault")
* .location(secondary.location())
* .resourceGroupName(secondary.name())
* .sku("Standard")
* .build());
* var fabric = new Fabric("fabric", FabricArgs.builder()
* .name("primary-fabric")
* .resourceGroupName(secondary.name())
* .recoveryVaultName(vault.name())
* .location(primary.location())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* primary:
* type: azure:core:ResourceGroup
* properties:
* name: tfex-network-mapping-primary
* location: West US
* secondary:
* type: azure:core:ResourceGroup
* properties:
* name: tfex-network-mapping-secondary
* location: East US
* vault:
* type: azure:recoveryservices:Vault
* properties:
* name: example-recovery-vault
* location: ${secondary.location}
* resourceGroupName: ${secondary.name}
* sku: Standard
* fabric:
* type: azure:siterecovery:Fabric
* properties:
* name: primary-fabric
* resourceGroupName: ${secondary.name}
* recoveryVaultName: ${vault.name}
* location: ${primary.location}
* ```
*
* ## Import
* Site Recovery Fabric can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:siterecovery/fabric:Fabric myfabric /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/fabric-name
* ```
* @property location In what region should the fabric be located. Changing this forces a new resource to be created.
* @property name The name of the network mapping. Changing this forces a new resource to be created.
* @property recoveryVaultName The name of the vault that should be updated. Changing this forces a new resource to be created.
* @property resourceGroupName Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created.
*/
public data class FabricArgs(
public val location: Output? = null,
public val name: Output? = null,
public val recoveryVaultName: Output? = null,
public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.siterecovery.FabricArgs =
com.pulumi.azure.siterecovery.FabricArgs.builder()
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.recoveryVaultName(recoveryVaultName?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [FabricArgs].
*/
@PulumiTagMarker
public class FabricArgsBuilder internal constructor() {
private var location: Output? = null
private var name: Output? = null
private var recoveryVaultName: Output? = null
private var resourceGroupName: Output? = null
/**
* @param value In what region should the fabric be located. Changing this forces a new resource to be created.
*/
@JvmName("ppqcibgjcnfugunr")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the network mapping. Changing this forces a new resource to be created.
*/
@JvmName("xpdehsgfbyyesgyr")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name of the vault that should be updated. Changing this forces a new resource to be created.
*/
@JvmName("sxfxjquhksentbvh")
public suspend fun recoveryVaultName(`value`: Output) {
this.recoveryVaultName = value
}
/**
* @param value Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created.
*/
@JvmName("xgaowjgrptngghrx")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value In what region should the fabric be located. Changing this forces a new resource to be created.
*/
@JvmName("duobwwgeqenwfcbm")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The name of the network mapping. Changing this forces a new resource to be created.
*/
@JvmName("oxthwwfojcjbutfb")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The name of the vault that should be updated. Changing this forces a new resource to be created.
*/
@JvmName("jtdkbtuubmwhovcc")
public suspend fun recoveryVaultName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.recoveryVaultName = mapped
}
/**
* @param value Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created.
*/
@JvmName("vjcntgqnupoaaadb")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
internal fun build(): FabricArgs = FabricArgs(
location = location,
name = name,
recoveryVaultName = recoveryVaultName,
resourceGroupName = resourceGroupName,
)
}