Replication Configuration
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 /aws/elasticfilesystem
.
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
EFS Replication Configurations can be imported 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.
$ pulumi import aws:efs/replicationConfiguration:ReplicationConfiguration example fs-id
Properties
When the replication configuration was created.
A destination configuration block (documented below).
The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.
The Amazon Resource Name (ARN) of the current source file system in the replication configuration.
The ID of the file system that is to be replicated.
The AWS Region in which the source Amazon EFS file system is located.