Skip to content

Commit dd55093

Browse files
hsohail94Sohail-Haaris-bah
authored andcommitted
fix: Add encryption configuration to Image Builder Distribution Configuration resource
1 parent bea1a25 commit dd55093

File tree

5 files changed

+147
-179
lines changed

5 files changed

+147
-179
lines changed

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,7 @@ export class ImagePipeline extends Construct {
247247
Name: `${props.imageRecipe}-${distributionRegion}-{{imagebuilder:buildDate}}`,
248248
Description: `copy AMI ${props.imageRecipe} to ${distributionRegion}`,
249249
TargetAccountIds: props.distributionAccountIDs,
250-
LaunchPermissionConfiguration: {
251-
UserIds: props.distributionAccountIDs,
252-
},
250+
KmsKeyId: props.ebsVolumeConfiguration?.kmsKeyId ?? 'aws/ebs', //use default AWS-managed key if one isn't given
253251
},
254252
};
255253
distributionsList.push(distributionConfig);

test/imagepipeline.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,7 @@ test('Infrastructure Configuration is built with provided EBS volume properties'
169169
Name: 'TestImageRecipe-us-east-1-{{imagebuilder:buildDate}}',
170170
Description: 'copy AMI TestImageRecipe to us-east-1',
171171
TargetAccountIds: ['111222333444'],
172-
LaunchPermissionConfiguration: {
173-
UserIds: ['111222333444'],
174-
},
172+
KmsKeyId: 'alias/app1/key',
175173
},
176174
}],
177175
});

0 commit comments

Comments
 (0)