https://pulumi.com logo
Title
b

best-dinner-57220

03/26/2023, 9:13 PM
Hi Everyone, I am glad to join this amazing pulumi community and I am new here šŸ™‚ , I am here to request some assistance on some pulumi related questions please, shown below šŸ‘‡ We are using pulumi typescript to automate our AWS related infrastructure/services, & have been using to automate AWS EFS (Elastic FileSystem) creation along with an EFS '*replica*' created on a given AWS region. Highly appreciate if somebody give me a hand to assist me on getting the following working please? ā€¢ EFS replica created isn't created with any "Name" and it doesn't have any AWS tags (Name is blank because the "Name" key value pair is empty), it appears to be having something like below. ā€¢ The reason is we noticed that https://github.com/pulumi/pulumi-aws/blob/master/sdk/nodejs/efs/replicationConfiguration.ts#L185-L194 typescript interface doesn't support adding tags ā€¢ Also EFSReplicationConfiguration doesn't seem to support adding LifeCyclePolicies for the EFSReplicationConfiguration object? (This means that I am able to add LifeCycle Management to the "primary" EFS but not to the "replica" EFS Looking forward to your advices...
export interface ReplicationConfigurationArgs {
    /**
     * A destination configuration block (documented below).
     */
    destination: pulumi.Input<inputs.efs.ReplicationConfigurationDestination>;
    /**
     * The ID of the file system that is to be replicated.
     */
    sourceFileSystemId: pulumi.Input<string>;
}
l

little-cartoon-10569

03/26/2023, 9:22 PM
This is all limited by AWS, not Pulumi. You can't do these things via the SDK or CLI, either.
The lifecycle configuration shouldn't be relevant. If something disappears from the source, then it disappears from the target, so a delete rule isn't important. And you wouldn't want to glaciate the same resource twice, so that's not important either.
The name is interesting. However, it is not something solvable via the AWS SDK, so there's nothing Pulumi could do to fix it, either.
b

best-dinner-57220

03/26/2023, 9:24 PM
Thank you Paul, oh alright then it makes sense to me now
Then about AWS EFS lifecycle management (https://docs.aws.amazon.com/efs/latest/ug/lifecycle-management-efs.html) , there's a huge cost difference keeping EFS data in "Frequent" accessed storage and "infrequent" accessed storage, so we have set lifecycle policies for "primary" EFS as follows (yes this was easily achieved and done using pulumi typescript), but however for the replica it doesn't support it though...
i guess it's probably because due to the limitation you mentioned, AWS SDK doesn't support it perhaps? https://docs.aws.amazon.com/cli/latest/reference/efs/create-replication-configuration.html
l

little-cartoon-10569

03/26/2023, 9:44 PM
I think so. EFS replication might not be the best tool for you. Are you using replication for backing up only or parallel (active-active) or redundant (active-passive) access?
Replication isn't really suited for backing up.
b

best-dinner-57220

03/26/2023, 9:47 PM
ah actually sorry i forgot to mention the context, so the EFS replica will be in the Disaster Recovery site/region (Canada) & therefore the EFS primary will be in the main site (eg: us-east-1) . The intention of having EFS replica is if some disaster happens (By us or AWS) then we failover to the DR region , therefore we will then start using the EFS replica. That's the main goal to achieve
so i would say it's an active/passive setup? šŸ™‚
l

little-cartoon-10569

03/26/2023, 9:49 PM
Yep. So the failover time is important. If you need seconds, this is your only managed option and you'll need to pay for it; your only other option afaik would be to set up two separate EFS volumes and mirror them using 3rd party software.
If you only need hours, then snapshots and restoring to a new EFS volume during recovery is much cheaper.
If you're in between, then you have a tough choice to make šŸ™‚
b

best-dinner-57220

03/26/2023, 9:53 PM
cool, yeah i suppose we go with the managed option as it seems to be the suitable one for our scenario (Few seconds/mins is something our application can cope). Thanks again for your advices Paul, much appreciated.
l

little-cartoon-10569

03/26/2023, 9:55 PM
Going more cloud native will help šŸ™‚ EFS and EBS are services I deal with much less often these days; cloud native services often render them surplus to requirements.
b

best-dinner-57220

03/26/2023, 9:56 PM
yeah absolutely, high time i guess šŸ™‚