Skip to content

Commit f9fd00c

Browse files
authored
docs(ecs): describe default tag value for fromEcrRepository method (#30926)
### Description of changes If we don't specify the tag parameter for fromEcrRepository method, `latest` is used as default value. https://github.com/aws/aws-cdk/blob/c8e5924bbc83b91b929838518f4955dd3bbb884f/packages/aws-cdk-lib/aws-ecs/lib/container-image.ts#L19-L24 However, currently this behavior is not described in document. https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ContainerImage.html#static-fromwbrecrwbrrepositoryrepository-tag I'm adding the description regarding this default value. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 5f3337f commit f9fd00c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: packages/aws-cdk-lib/aws-ecs/lib/container-image.ts

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export abstract class ContainerImage {
1818

1919
/**
2020
* Reference an image in an ECR repository
21+
*
22+
* @param tag If you don't specify this parameter, `latest` is used as default.
2123
*/
2224
public static fromEcrRepository(repository: ecr.IRepository, tag: string = 'latest') {
2325
return new EcrImage(repository, tag);

0 commit comments

Comments
 (0)