aphexlog
aphexlog

Reputation: 1775

Is there any CDK or CloudFormation support for Container Recipes in AWS Image Builder?

I don't see any resource for Container Recipes for AWS Image Builder in the CDK or CloudFormation documentation.

The closest thing I can find is support for Image Recipes, with is not used for creating container images, only AMIs. I am really needing to add this resource to my CF stack to create a image(as in a container image) pipeline that pushes the resulting image into ECR... which I CAN do manually, only.. so far.

I'm using the TS CDK lib, not that it matters atm.

Upvotes: 4

Views: 541

Answers (1)

Marcin
Marcin

Reputation: 238687

In cloudformation there is AWS::ImageBuilder::ContainerRecipe:

Creates a new container recipe. Container recipes define how images are configured, tested, and assessed.

The docs also provide example how to create a container recipe. Thus its not clear from you question, if you expect different type of container recopies to be created in CloudFormation?

Example from docs:

Resources:
   ContainerRecipeAllParameters:
      Type: 'AWS::ImageBuilder::ContainerRecipe'
      Properties:
         Name: 'container-recipe-name'
         Version: '1.0.0'
         ParentImage: !Ref ParentImage
         Description: 'description'
         ContainerType: 'DOCKER'
         Components:
            - ComponentArn: !Ref ComponentArn
            - ComponentArn: !Ref AnotherComponentArn
         TargetRepository:
            Service: 'ECR'
            RepositoryName: !Ref RepositoryName
         DockerfileTemplateData: |
           FROM {{{ imagebuilder:parentImage }}}
           {{{ imagebuilder:environments }}}
           {{{ imagebuilder:components }}}
         WorkingDirectory: "dummy-working-directory"
         KmsKeyId: !Ref KmsKeyId
         Tags:
            Usage: 'Documentation'

Upvotes: 5

Related Questions