1. Packages
  2. AWS Classic
  3. API Docs
  4. efs
  5. ReplicationConfiguration

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.13.1 published on Tuesday, Dec 5, 2023 by Pulumi

aws.efs.ReplicationConfiguration

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.13.1 published on Tuesday, Dec 5, 2023 by Pulumi

    Creates a replica of an existing EFS file system in the same or another region. Creating this resource causes the source EFS file system to be replicated to a new read-only destination EFS file system. Deleting this resource will cause the replication from source to destination to stop and the destination file system will no longer be read only.

    NOTE: Deleting this resource does not delete the destination file system that was created.

    Example Usage

    Will create a replica using regional storage in us-west-2 that will be encrypted by the default EFS KMS key

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleFileSystem = new Aws.Efs.FileSystem("exampleFileSystem");
    
        var exampleReplicationConfiguration = new Aws.Efs.ReplicationConfiguration("exampleReplicationConfiguration", new()
        {
            SourceFileSystemId = exampleFileSystem.Id,
            Destination = new Aws.Efs.Inputs.ReplicationConfigurationDestinationArgs
            {
                Region = "us-west-2",
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/efs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleFileSystem, err := efs.NewFileSystem(ctx, "exampleFileSystem", nil)
    		if err != nil {
    			return err
    		}
    		_, err = efs.NewReplicationConfiguration(ctx, "exampleReplicationConfiguration", &efs.ReplicationConfigurationArgs{
    			SourceFileSystemId: exampleFileSystem.ID(),
    			Destination: &efs.ReplicationConfigurationDestinationArgs{
    				Region: pulumi.String("us-west-2"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.efs.FileSystem;
    import com.pulumi.aws.efs.ReplicationConfiguration;
    import com.pulumi.aws.efs.ReplicationConfigurationArgs;
    import com.pulumi.aws.efs.inputs.ReplicationConfigurationDestinationArgs;
    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 exampleFileSystem = new FileSystem("exampleFileSystem");
    
            var exampleReplicationConfiguration = new ReplicationConfiguration("exampleReplicationConfiguration", ReplicationConfigurationArgs.builder()        
                .sourceFileSystemId(exampleFileSystem.id())
                .destination(ReplicationConfigurationDestinationArgs.builder()
                    .region("us-west-2")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    example_file_system = aws.efs.FileSystem("exampleFileSystem")
    example_replication_configuration = aws.efs.ReplicationConfiguration("exampleReplicationConfiguration",
        source_file_system_id=example_file_system.id,
        destination=aws.efs.ReplicationConfigurationDestinationArgs(
            region="us-west-2",
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const exampleFileSystem = new aws.efs.FileSystem("exampleFileSystem", {});
    const exampleReplicationConfiguration = new aws.efs.ReplicationConfiguration("exampleReplicationConfiguration", {
        sourceFileSystemId: exampleFileSystem.id,
        destination: {
            region: "us-west-2",
        },
    });
    
    resources:
      exampleFileSystem:
        type: aws:efs:FileSystem
      exampleReplicationConfiguration:
        type: aws:efs:ReplicationConfiguration
        properties:
          sourceFileSystemId: ${exampleFileSystem.id}
          destination:
            region: us-west-2
    

    Replica will be created as One Zone storage in the us-west-2b Availability Zone and encrypted with the specified KMS key.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleFileSystem = new Aws.Efs.FileSystem("exampleFileSystem");
    
        var exampleReplicationConfiguration = new Aws.Efs.ReplicationConfiguration("exampleReplicationConfiguration", new()
        {
            SourceFileSystemId = exampleFileSystem.Id,
            Destination = new Aws.Efs.Inputs.ReplicationConfigurationDestinationArgs
            {
                AvailabilityZoneName = "us-west-2b",
                KmsKeyId = "1234abcd-12ab-34cd-56ef-1234567890ab",
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/efs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleFileSystem, err := efs.NewFileSystem(ctx, "exampleFileSystem", nil)
    		if err != nil {
    			return err
    		}
    		_, err = efs.NewReplicationConfiguration(ctx, "exampleReplicationConfiguration", &efs.ReplicationConfigurationArgs{
    			SourceFileSystemId: exampleFileSystem.ID(),
    			Destination: &efs.ReplicationConfigurationDestinationArgs{
    				AvailabilityZoneName: pulumi.String("us-west-2b"),
    				KmsKeyId:             pulumi.String("1234abcd-12ab-34cd-56ef-1234567890ab"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.efs.FileSystem;
    import com.pulumi.aws.efs.ReplicationConfiguration;
    import com.pulumi.aws.efs.ReplicationConfigurationArgs;
    import com.pulumi.aws.efs.inputs.ReplicationConfigurationDestinationArgs;
    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 exampleFileSystem = new FileSystem("exampleFileSystem");
    
            var exampleReplicationConfiguration = new ReplicationConfiguration("exampleReplicationConfiguration", ReplicationConfigurationArgs.builder()        
                .sourceFileSystemId(exampleFileSystem.id())
                .destination(ReplicationConfigurationDestinationArgs.builder()
                    .availabilityZoneName("us-west-2b")
                    .kmsKeyId("1234abcd-12ab-34cd-56ef-1234567890ab")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    example_file_system = aws.efs.FileSystem("exampleFileSystem")
    example_replication_configuration = aws.efs.ReplicationConfiguration("exampleReplicationConfiguration",
        source_file_system_id=example_file_system.id,
        destination=aws.efs.ReplicationConfigurationDestinationArgs(
            availability_zone_name="us-west-2b",
            kms_key_id="1234abcd-12ab-34cd-56ef-1234567890ab",
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const exampleFileSystem = new aws.efs.FileSystem("exampleFileSystem", {});
    const exampleReplicationConfiguration = new aws.efs.ReplicationConfiguration("exampleReplicationConfiguration", {
        sourceFileSystemId: exampleFileSystem.id,
        destination: {
            availabilityZoneName: "us-west-2b",
            kmsKeyId: "1234abcd-12ab-34cd-56ef-1234567890ab",
        },
    });
    
    resources:
      exampleFileSystem:
        type: aws:efs:FileSystem
      exampleReplicationConfiguration:
        type: aws:efs:ReplicationConfiguration
        properties:
          sourceFileSystemId: ${exampleFileSystem.id}
          destination:
            availabilityZoneName: us-west-2b
            kmsKeyId: 1234abcd-12ab-34cd-56ef-1234567890ab
    

    Create ReplicationConfiguration Resource

    new ReplicationConfiguration(name: string, args: ReplicationConfigurationArgs, opts?: CustomResourceOptions);
    @overload
    def ReplicationConfiguration(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 destination: Optional[ReplicationConfigurationDestinationArgs] = None,
                                 source_file_system_id: Optional[str] = None)
    @overload
    def ReplicationConfiguration(resource_name: str,
                                 args: ReplicationConfigurationArgs,
                                 opts: Optional[ResourceOptions] = None)
    func NewReplicationConfiguration(ctx *Context, name string, args ReplicationConfigurationArgs, opts ...ResourceOption) (*ReplicationConfiguration, error)
    public ReplicationConfiguration(string name, ReplicationConfigurationArgs args, CustomResourceOptions? opts = null)
    public ReplicationConfiguration(String name, ReplicationConfigurationArgs args)
    public ReplicationConfiguration(String name, ReplicationConfigurationArgs args, CustomResourceOptions options)
    
    type: aws:efs:ReplicationConfiguration
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ReplicationConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ReplicationConfigurationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ReplicationConfigurationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ReplicationConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ReplicationConfigurationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ReplicationConfiguration Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ReplicationConfiguration resource accepts the following input properties:

    Destination ReplicationConfigurationDestination

    A destination configuration block (documented below).

    SourceFileSystemId string

    The ID of the file system that is to be replicated.

    Destination ReplicationConfigurationDestinationArgs

    A destination configuration block (documented below).

    SourceFileSystemId string

    The ID of the file system that is to be replicated.

    destination ReplicationConfigurationDestination

    A destination configuration block (documented below).

    sourceFileSystemId String

    The ID of the file system that is to be replicated.

    destination ReplicationConfigurationDestination

    A destination configuration block (documented below).

    sourceFileSystemId string

    The ID of the file system that is to be replicated.

    destination ReplicationConfigurationDestinationArgs

    A destination configuration block (documented below).

    source_file_system_id str

    The ID of the file system that is to be replicated.

    destination Property Map

    A destination configuration block (documented below).

    sourceFileSystemId String

    The ID of the file system that is to be replicated.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ReplicationConfiguration resource produces the following output properties:

    CreationTime string

    When the replication configuration was created.

    Id string

    The provider-assigned unique ID for this managed resource.

    OriginalSourceFileSystemArn string

    The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.

    SourceFileSystemArn string

    The Amazon Resource Name (ARN) of the current source file system in the replication configuration.

    SourceFileSystemRegion string

    The AWS Region in which the source Amazon EFS file system is located.

    • destination[0].file_system_id - The fs ID of the replica.
    • destination[0].status - The status of the replication.
    CreationTime string

    When the replication configuration was created.

    Id string

    The provider-assigned unique ID for this managed resource.

    OriginalSourceFileSystemArn string

    The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.

    SourceFileSystemArn string

    The Amazon Resource Name (ARN) of the current source file system in the replication configuration.

    SourceFileSystemRegion string

    The AWS Region in which the source Amazon EFS file system is located.

    • destination[0].file_system_id - The fs ID of the replica.
    • destination[0].status - The status of the replication.
    creationTime String

    When the replication configuration was created.

    id String

    The provider-assigned unique ID for this managed resource.

    originalSourceFileSystemArn String

    The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.

    sourceFileSystemArn String

    The Amazon Resource Name (ARN) of the current source file system in the replication configuration.

    sourceFileSystemRegion String

    The AWS Region in which the source Amazon EFS file system is located.

    • destination[0].file_system_id - The fs ID of the replica.
    • destination[0].status - The status of the replication.
    creationTime string

    When the replication configuration was created.

    id string

    The provider-assigned unique ID for this managed resource.

    originalSourceFileSystemArn string

    The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.

    sourceFileSystemArn string

    The Amazon Resource Name (ARN) of the current source file system in the replication configuration.

    sourceFileSystemRegion string

    The AWS Region in which the source Amazon EFS file system is located.

    • destination[0].file_system_id - The fs ID of the replica.
    • destination[0].status - The status of the replication.
    creation_time str

    When the replication configuration was created.

    id str

    The provider-assigned unique ID for this managed resource.

    original_source_file_system_arn str

    The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.

    source_file_system_arn str

    The Amazon Resource Name (ARN) of the current source file system in the replication configuration.

    source_file_system_region str

    The AWS Region in which the source Amazon EFS file system is located.

    • destination[0].file_system_id - The fs ID of the replica.
    • destination[0].status - The status of the replication.
    creationTime String

    When the replication configuration was created.

    id String

    The provider-assigned unique ID for this managed resource.

    originalSourceFileSystemArn String

    The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.

    sourceFileSystemArn String

    The Amazon Resource Name (ARN) of the current source file system in the replication configuration.

    sourceFileSystemRegion String

    The AWS Region in which the source Amazon EFS file system is located.

    • destination[0].file_system_id - The fs ID of the replica.
    • destination[0].status - The status of the replication.

    Look up Existing ReplicationConfiguration Resource

    Get an existing ReplicationConfiguration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ReplicationConfigurationState, opts?: CustomResourceOptions): ReplicationConfiguration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            creation_time: Optional[str] = None,
            destination: Optional[ReplicationConfigurationDestinationArgs] = None,
            original_source_file_system_arn: Optional[str] = None,
            source_file_system_arn: Optional[str] = None,
            source_file_system_id: Optional[str] = None,
            source_file_system_region: Optional[str] = None) -> ReplicationConfiguration
    func GetReplicationConfiguration(ctx *Context, name string, id IDInput, state *ReplicationConfigurationState, opts ...ResourceOption) (*ReplicationConfiguration, error)
    public static ReplicationConfiguration Get(string name, Input<string> id, ReplicationConfigurationState? state, CustomResourceOptions? opts = null)
    public static ReplicationConfiguration get(String name, Output<String> id, ReplicationConfigurationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreationTime string

    When the replication configuration was created.

    Destination ReplicationConfigurationDestination

    A destination configuration block (documented below).

    OriginalSourceFileSystemArn string

    The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.

    SourceFileSystemArn string

    The Amazon Resource Name (ARN) of the current source file system in the replication configuration.

    SourceFileSystemId string

    The ID of the file system that is to be replicated.

    SourceFileSystemRegion string

    The AWS Region in which the source Amazon EFS file system is located.

    • destination[0].file_system_id - The fs ID of the replica.
    • destination[0].status - The status of the replication.
    CreationTime string

    When the replication configuration was created.

    Destination ReplicationConfigurationDestinationArgs

    A destination configuration block (documented below).

    OriginalSourceFileSystemArn string

    The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.

    SourceFileSystemArn string

    The Amazon Resource Name (ARN) of the current source file system in the replication configuration.

    SourceFileSystemId string

    The ID of the file system that is to be replicated.

    SourceFileSystemRegion string

    The AWS Region in which the source Amazon EFS file system is located.

    • destination[0].file_system_id - The fs ID of the replica.
    • destination[0].status - The status of the replication.
    creationTime String

    When the replication configuration was created.

    destination ReplicationConfigurationDestination

    A destination configuration block (documented below).

    originalSourceFileSystemArn String

    The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.

    sourceFileSystemArn String

    The Amazon Resource Name (ARN) of the current source file system in the replication configuration.

    sourceFileSystemId String

    The ID of the file system that is to be replicated.

    sourceFileSystemRegion String

    The AWS Region in which the source Amazon EFS file system is located.

    • destination[0].file_system_id - The fs ID of the replica.
    • destination[0].status - The status of the replication.
    creationTime string

    When the replication configuration was created.

    destination ReplicationConfigurationDestination

    A destination configuration block (documented below).

    originalSourceFileSystemArn string

    The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.

    sourceFileSystemArn string

    The Amazon Resource Name (ARN) of the current source file system in the replication configuration.

    sourceFileSystemId string

    The ID of the file system that is to be replicated.

    sourceFileSystemRegion string

    The AWS Region in which the source Amazon EFS file system is located.

    • destination[0].file_system_id - The fs ID of the replica.
    • destination[0].status - The status of the replication.
    creation_time str

    When the replication configuration was created.

    destination ReplicationConfigurationDestinationArgs

    A destination configuration block (documented below).

    original_source_file_system_arn str

    The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.

    source_file_system_arn str

    The Amazon Resource Name (ARN) of the current source file system in the replication configuration.

    source_file_system_id str

    The ID of the file system that is to be replicated.

    source_file_system_region str

    The AWS Region in which the source Amazon EFS file system is located.

    • destination[0].file_system_id - The fs ID of the replica.
    • destination[0].status - The status of the replication.
    creationTime String

    When the replication configuration was created.

    destination Property Map

    A destination configuration block (documented below).

    originalSourceFileSystemArn String

    The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.

    sourceFileSystemArn String

    The Amazon Resource Name (ARN) of the current source file system in the replication configuration.

    sourceFileSystemId String

    The ID of the file system that is to be replicated.

    sourceFileSystemRegion String

    The AWS Region in which the source Amazon EFS file system is located.

    • destination[0].file_system_id - The fs ID of the replica.
    • destination[0].status - The status of the replication.

    Supporting Types

    ReplicationConfigurationDestination, ReplicationConfigurationDestinationArgs

    AvailabilityZoneName string

    The availability zone in which the replica should be created. If specified, the replica will be created with One Zone storage. If omitted, regional storage will be used.

    FileSystemId string
    KmsKeyId string

    The Key ID, ARN, alias, or alias ARN of the KMS key that should be used to encrypt the replica file system. If omitted, the default KMS key for EFS /aws/elasticfilesystem will be used.

    Region string

    The region in which the replica should be created.

    Status string
    AvailabilityZoneName string

    The availability zone in which the replica should be created. If specified, the replica will be created with One Zone storage. If omitted, regional storage will be used.

    FileSystemId string
    KmsKeyId string

    The Key ID, ARN, alias, or alias ARN of the KMS key that should be used to encrypt the replica file system. If omitted, the default KMS key for EFS /aws/elasticfilesystem will be used.

    Region string

    The region in which the replica should be created.

    Status string
    availabilityZoneName String

    The availability zone in which the replica should be created. If specified, the replica will be created with One Zone storage. If omitted, regional storage will be used.

    fileSystemId String
    kmsKeyId String

    The Key ID, ARN, alias, or alias ARN of the KMS key that should be used to encrypt the replica file system. If omitted, the default KMS key for EFS /aws/elasticfilesystem will be used.

    region String

    The region in which the replica should be created.

    status String
    availabilityZoneName string

    The availability zone in which the replica should be created. If specified, the replica will be created with One Zone storage. If omitted, regional storage will be used.

    fileSystemId string
    kmsKeyId string

    The Key ID, ARN, alias, or alias ARN of the KMS key that should be used to encrypt the replica file system. If omitted, the default KMS key for EFS /aws/elasticfilesystem will be used.

    region string

    The region in which the replica should be created.

    status string
    availability_zone_name str

    The availability zone in which the replica should be created. If specified, the replica will be created with One Zone storage. If omitted, regional storage will be used.

    file_system_id str
    kms_key_id str

    The Key ID, ARN, alias, or alias ARN of the KMS key that should be used to encrypt the replica file system. If omitted, the default KMS key for EFS /aws/elasticfilesystem will be used.

    region str

    The region in which the replica should be created.

    status str
    availabilityZoneName String

    The availability zone in which the replica should be created. If specified, the replica will be created with One Zone storage. If omitted, regional storage will be used.

    fileSystemId String
    kmsKeyId String

    The Key ID, ARN, alias, or alias ARN of the KMS key that should be used to encrypt the replica file system. If omitted, the default KMS key for EFS /aws/elasticfilesystem will be used.

    region String

    The region in which the replica should be created.

    status String

    Import

    Using pulumi import, import EFS Replication Configurations using the file system ID of either the source or destination file system. When importing, the availability_zone_name and kms_key_id attributes must not be set in the configuration. The AWS API does not return these values when querying the replication configuration and their presence will therefore show as a diff in a subsequent plan. For example:

     $ pulumi import aws:efs/replicationConfiguration:ReplicationConfiguration example fs-id
    

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the aws Terraform Provider.

    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.13.1 published on Tuesday, Dec 5, 2023 by Pulumi