Skip to content

Commit

Permalink
fix(efs): enableAutomaticBackups property of FileSystem is always tre…
Browse files Browse the repository at this point in the history
…ated as if it is true (#29881)

Always set the backupPolicy property of CfnFileSystem instead of leaving
it unset when enabledAutomaticBackups is false, because backups default
to being enabled when not explicitly disabled in CloudFormation.
  • Loading branch information
mallenLF committed Apr 20, 2024
1 parent 1d16304 commit 36dbe4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-efs/lib/efs-file-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ export class FileSystem extends FileSystemBase {
performanceMode: props.performanceMode,
throughputMode: props.throughputMode,
provisionedThroughputInMibps: props.provisionedThroughputPerSecond?.toMebibytes(),
backupPolicy: props.enableAutomaticBackups ? { status: 'ENABLED' } : undefined,
backupPolicy: { status: props.enableAutomaticBackups ? 'ENABLED' : 'DISABLED' },
fileSystemPolicy: Lazy.any({
produce: () => {
const denyAnonymousAccessFlag = FeatureFlags.of(this).isEnabled(cxapi.EFS_DENY_ANONYMOUS_ACCESS) ?? false;
Expand Down

0 comments on commit 36dbe4e

Please sign in to comment.