Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(efs): LifecyclePolicy of AFTER_7_DAYS is not applied #9475

Merged
merged 2 commits into from
Aug 10, 2020

Conversation

robertd
Copy link
Contributor

@robertd robertd commented Aug 5, 2020

Closes #9474 (see for details).

const fileSystem = new efs.FileSystem(this, "EFS", { 
      removalPolicy: cdk.RemovalPolicy.DESTROY,
      lifecyclePolicy: efs.LifecyclePolicy.AFTER_7_DAYS,
      vpc,
});

Old behavior:

npm run build; cdk synth | grep -r -n1 "AFTER_"; cdk diff

> demo@0.1.0 build /Users/robertd/code/demo
> tsc

Stack EFSDemoTest
Resources
[~] AWS::EFS::FileSystem EFS EFSBAA8953A
 └─ [-] LifecyclePolicies
     └─ [{"TransitionToIA":"AFTER_14_DAYS"}]

New (expected) behavior: 🎆 🥳 🍾

npm run build; cdk synth | grep -r -n1 "AFTER_"; cdk diff

> demo@0.1.0 build /Users/robertd/demo
> tsc

(standard input)-327-      LifecyclePolicies:
(standard input):328:        - TransitionToIA: AFTER_7_DAYS
(standard input)-329-    UpdateReplacePolicy: Delete

Stack EFSDemoTest
Resources
[~] AWS::EFS::FileSystem EFS EFSBAA8953A
 └─ [~] LifecyclePolicies
     └─ @@ -1,5 +1,5 @@
        [ ] [
        [ ]   {
        [-]     "TransitionToIA": "AFTER_14_DAYS"
        [+]     "TransitionToIA": "AFTER_7_DAYS"
        [ ]   }
        [ ] ]

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@rix0rrr rix0rrr changed the title fix(aws-efs): Fix the issue where LifecyclePolicy is not being correctly applied fix(efs): LifecyclePolicy of AFTER_7_DAYS is not applied Aug 10, 2020
@mergify
Copy link
Contributor

mergify bot commented Aug 10, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 53eaadd
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Aug 10, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit f78c346 into aws:master Aug 10, 2020
@robertd robertd deleted the robertd/fix-efs-lifecycle-policies branch August 12, 2020 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[aws-efs] Lifecycle policy for AFTER_7_DAYS is not being applied properly
3 participants