Skip to content

Commit c40374a

Browse files
author
Tarun Belani
committed
Addressed review comments
1 parent 8e437dc commit c40374a

File tree

11 files changed

+35
-34
lines changed

11 files changed

+35
-34
lines changed

packages/@aws-cdk/aws-imagebuilder-alpha/lib/image-recipe.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ import { ComponentConfiguration, IRecipeBase } from './recipe-base';
99

1010
const IMAGE_RECIPE_SYMBOL = Symbol.for('@aws-cdk/aws-imagebuilder-alpha.ImageRecipe');
1111

12+
/**
13+
* Represents the latest version of an image recipe. When using the recipe in a pipeline, the pipeline will use the
14+
* latest recipe at the time of execution.
15+
*
16+
* @see https://docs.aws.amazon.com/imagebuilder/latest/userguide/ibhow-semantic-versioning.html
17+
*/
1218
const LATEST_VERSION = 'x.x.x';
1319

1420
/**
@@ -56,7 +62,7 @@ export interface ImageRecipeProps {
5662
/**
5763
* The version of the image recipe.
5864
*
59-
* @default 1.0.0
65+
* @default 1.0.x
6066
*/
6167
readonly imageRecipeVersion?: string;
6268

@@ -127,24 +133,22 @@ export interface ImageRecipeAttributes {
127133
/**
128134
* The ARN of the image recipe
129135
*
130-
* @default - the ARN is automatically constructed if an imageRecipeName is provided, otherwise an
131-
* imageRecipeName is required
136+
* @default - derived from the imageRecipeName
132137
*/
133138
readonly imageRecipeArn?: string;
134139

135140
/**
136141
* The name of the image recipe
137142
*
138-
* @default - the name is automatically constructed if an imageRecipeArn is provided, otherwise an imageRecipeName is
139-
* required
143+
* @default - derived from the imageRecipeArn
140144
*/
141145
readonly imageRecipeName?: string;
142146

143147
/**
144148
* The version of the image recipe
145149
*
146-
* @default - the version is automatically constructed if an imageRecipeArn is provided, otherwise the latest version
147-
* is used.
150+
* @default - derived from containerRecipeArn. if a containerRecipeName is provided, the latest version, x.x.x, will
151+
* be used
148152
*/
149153
readonly imageRecipeVersion?: string;
150154
}
@@ -330,7 +334,7 @@ export class ImageRecipe extends ImageRecipeBase {
330334
}),
331335
);
332336

333-
const imageRecipeVersion = props.imageRecipeVersion ?? '1.0.0';
337+
const imageRecipeVersion = props.imageRecipeVersion ?? '1.0.x';
334338
const imageRecipe = new CfnImageRecipe(this, 'Resource', {
335339
name: this.physicalName,
336340
version: imageRecipeVersion,

packages/@aws-cdk/aws-imagebuilder-alpha/test/image-recipe.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ describe('Image Recipe', () => {
308308
Type: 'AWS::ImageBuilder::ImageRecipe',
309309
Properties: {
310310
Name: 'stack-imagerecipe-1e832b66',
311-
Version: '1.0.0',
311+
Version: '1.0.x',
312312
ParentImage: 'ssm:/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64',
313313
},
314314
}),

packages/@aws-cdk/aws-imagebuilder-alpha/test/integ.all-parameters.image-recipe.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ const parameterizedComponent = new imagebuilder.Component(stack, 'ParameterizedC
3333
{
3434
name: 'step1',
3535
action: imagebuilder.ComponentAction.EXECUTE_BASH,
36-
inputs: {
36+
inputs: imagebuilder.ComponentStepInputs.fromObject({
3737
commands: ['echo ${{ parameter1 }}', 'echo ${{ parameter2 }}'],
38-
},
38+
}),
3939
},
4040
],
4141
},

packages/@aws-cdk/aws-imagebuilder-alpha/test/integ.default-parameters.image-recipe.js.snapshot/aws-cdk-imagebuilder-image-recipe-default-parameters.assets.json

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

packages/@aws-cdk/aws-imagebuilder-alpha/test/integ.default-parameters.image-recipe.js.snapshot/aws-cdk-imagebuilder-image-recipe-default-parameters.template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"Properties": {
66
"Name": "aws-cdk-imagebuilder-image-recipe-default-parameters-imagerecipe-81fda979",
77
"ParentImage": "ssm:/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64",
8-
"Version": "1.0.0"
8+
"Version": "1.0.x"
99
}
1010
}
1111
},

packages/@aws-cdk/aws-imagebuilder-alpha/test/integ.default-parameters.image-recipe.js.snapshot/manifest.json

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

packages/@aws-cdk/aws-imagebuilder-alpha/test/integ.default-parameters.image-recipe.js.snapshot/tree.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/aws-imagebuilder-alpha/test/integ.marketplace-base-image.image-recipe.js.snapshot/aws-cdk-imagebuilder-image-recipe-marketplace-base-image.assets.json

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

packages/@aws-cdk/aws-imagebuilder-alpha/test/integ.marketplace-base-image.image-recipe.js.snapshot/aws-cdk-imagebuilder-image-recipe-marketplace-base-image.template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"Properties": {
66
"Name": "aws-cdk-imagebuilder-image-recipe-marketplace-base-image-imagerecipe-b40d66c5",
77
"ParentImage": "abcfcbaf-134e-4639-a7b4-fd285b9fcf0a",
8-
"Version": "1.0.0"
8+
"Version": "1.0.x"
99
}
1010
}
1111
},

packages/@aws-cdk/aws-imagebuilder-alpha/test/integ.marketplace-base-image.image-recipe.js.snapshot/manifest.json

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

0 commit comments

Comments
 (0)