Try AWS Native preview for resources not in the classic version.
aws.efs.ReplicationConfiguration
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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
Replication
Configuration Destination A destination configuration block (documented below).
- Source
File stringSystem Id The ID of the file system that is to be replicated.
- Destination
Replication
Configuration Destination Args A destination configuration block (documented below).
- Source
File stringSystem Id The ID of the file system that is to be replicated.
- destination
Replication
Configuration Destination A destination configuration block (documented below).
- source
File StringSystem Id The ID of the file system that is to be replicated.
- destination
Replication
Configuration Destination A destination configuration block (documented below).
- source
File stringSystem Id The ID of the file system that is to be replicated.
- destination
Replication
Configuration Destination Args A destination configuration block (documented below).
- source_
file_ strsystem_ id The ID of the file system that is to be replicated.
- destination Property Map
A destination configuration block (documented below).
- source
File StringSystem Id 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:
- Creation
Time string When the replication configuration was created.
- Id string
The provider-assigned unique ID for this managed resource.
- Original
Source stringFile System Arn The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.
- Source
File stringSystem Arn The Amazon Resource Name (ARN) of the current source file system in the replication configuration.
- Source
File stringSystem Region 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 string When the replication configuration was created.
- Id string
The provider-assigned unique ID for this managed resource.
- Original
Source stringFile System Arn The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.
- Source
File stringSystem Arn The Amazon Resource Name (ARN) of the current source file system in the replication configuration.
- Source
File stringSystem Region 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 String When the replication configuration was created.
- id String
The provider-assigned unique ID for this managed resource.
- original
Source StringFile System Arn The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.
- source
File StringSystem Arn The Amazon Resource Name (ARN) of the current source file system in the replication configuration.
- source
File StringSystem Region 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 string When the replication configuration was created.
- id string
The provider-assigned unique ID for this managed resource.
- original
Source stringFile System Arn The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.
- source
File stringSystem Arn The Amazon Resource Name (ARN) of the current source file system in the replication configuration.
- source
File stringSystem Region 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_ strfile_ system_ arn The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.
- source_
file_ strsystem_ arn The Amazon Resource Name (ARN) of the current source file system in the replication configuration.
- source_
file_ strsystem_ region 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 String When the replication configuration was created.
- id String
The provider-assigned unique ID for this managed resource.
- original
Source StringFile System Arn The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.
- source
File StringSystem Arn The Amazon Resource Name (ARN) of the current source file system in the replication configuration.
- source
File StringSystem Region 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.
- Creation
Time string When the replication configuration was created.
- Destination
Replication
Configuration Destination A destination configuration block (documented below).
- Original
Source stringFile System Arn The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.
- Source
File stringSystem Arn The Amazon Resource Name (ARN) of the current source file system in the replication configuration.
- Source
File stringSystem Id The ID of the file system that is to be replicated.
- Source
File stringSystem Region 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 string When the replication configuration was created.
- Destination
Replication
Configuration Destination Args A destination configuration block (documented below).
- Original
Source stringFile System Arn The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.
- Source
File stringSystem Arn The Amazon Resource Name (ARN) of the current source file system in the replication configuration.
- Source
File stringSystem Id The ID of the file system that is to be replicated.
- Source
File stringSystem Region 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 String When the replication configuration was created.
- destination
Replication
Configuration Destination A destination configuration block (documented below).
- original
Source StringFile System Arn The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.
- source
File StringSystem Arn The Amazon Resource Name (ARN) of the current source file system in the replication configuration.
- source
File StringSystem Id The ID of the file system that is to be replicated.
- source
File StringSystem Region 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 string When the replication configuration was created.
- destination
Replication
Configuration Destination A destination configuration block (documented below).
- original
Source stringFile System Arn The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.
- source
File stringSystem Arn The Amazon Resource Name (ARN) of the current source file system in the replication configuration.
- source
File stringSystem Id The ID of the file system that is to be replicated.
- source
File stringSystem Region 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
Replication
Configuration Destination Args A destination configuration block (documented below).
- original_
source_ strfile_ system_ arn The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.
- source_
file_ strsystem_ arn The Amazon Resource Name (ARN) of the current source file system in the replication configuration.
- source_
file_ strsystem_ id The ID of the file system that is to be replicated.
- source_
file_ strsystem_ region 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 String When the replication configuration was created.
- destination Property Map
A destination configuration block (documented below).
- original
Source StringFile System Arn The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.
- source
File StringSystem Arn The Amazon Resource Name (ARN) of the current source file system in the replication configuration.
- source
File StringSystem Id The ID of the file system that is to be replicated.
- source
File StringSystem Region 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
- Availability
Zone stringName 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 stringId - Kms
Key stringId 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 stringName 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 stringId - Kms
Key stringId 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 StringName 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 StringId - kms
Key StringId 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 stringName 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 stringId - kms
Key stringId 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_ strname 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_ strid - kms_
key_ strid 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
- availability
Zone StringName 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 StringId - kms
Key StringId 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.
Try AWS Native preview for resources not in the classic version.