Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageBuilder: missing 'parameters' on ImageBuilder::ContainerRecipe::ComponentConfiguration #20831

Open
FlorianVenturini opened this issue Jun 22, 2022 · 2 comments
Labels
@aws-cdk/aws-imagebuilder Related to EC2 Image Builder feature-request A feature should be added or improved. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p3

Comments

@FlorianVenturini
Copy link

Describe the bug

Hello !

We're trying to use the CDK to create a ContainerRecipe, but when we want to add parameters to the components, the property does not exist.

const cfnContainerRecipe = new imagebuilder.CfnContainerRecipe(this, 'ContainerRecipe', {
  components: [
    {
      componentArn: component1.attrArn,
      // parameters: [], // --> Missing here!
    },
    // ...
  ],
  containerType: 'DOCKER',
  name: `myContainerRecipe`,
  parentImage: `${accountID}.dkr.ecr.${awsRegion}.amazonaws.com/custom-parent-image`,
  targetRepository: {
    repositoryName: targetRepositoryName,
  },
  version: '1.0.0',
});

Also, it looks like it does exist

  • In the ImageRecipe
  • When using the cli (according to aws imagebuilder create-container-recipe help)
  • When using the web console (as you can see below, this is what AWS sends when calling PUT https://imagebuilder.eu-west-1.amazonaws.com/CreateContainerRecipe)
{
  "components": [
    {
      "componentArn": "arn:aws:imagebuilder:eu-west-1:ACCOUNT_ID:component/component1/1.0.0/1",
      "parameters": [
        {
          "name": "Parameter1",
          "value": [
            "data"
          ]
        }
      ]
    },
  ],
  "parentImage": "ACCOUNT_ID.dkr.ecr.eu-west-1.amazonaws.com/custom-parent-image:latest",
  "name": "myContainerRecipe",
  "semanticVersion": "1.2.3",
  "containerType": "DOCKER",
  // ...
}

Expected Behavior

I am expecting to be able to send parameters to my homemade components when creating a ContainerRecipe.

Current Behavior

The CDK does not allow parameters to be sent when calling CfnContainerRecipe

Reproduction Steps

(see above)

Possible Solution

From what I understand, the L1 construct code for the ContainerRecipe is automatically generated from CloudFormation, and the fact that parameters is also missing in the cloudformation docs makes me think that it's the root of this issue.

Additional Information/Context

No response

CDK CLI Version

1.160.0

Framework Version

No response

Node.js Version

14

OS

MacOS

Language

Typescript

Language Version

latest

Other information

No response

@FlorianVenturini FlorianVenturini added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 22, 2022
@github-actions github-actions bot added the @aws-cdk/aws-imagebuilder Related to EC2 Image Builder label Jun 22, 2022
@mrgrain mrgrain added needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. feature-request A feature should be added or improved. p2 and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 11, 2022
@mrgrain
Copy link
Contributor

mrgrain commented Aug 11, 2022

From what I understand, the L1 construct code for the ContainerRecipe is automatically generated from CloudFormation, and the fact that parameters is also missing in the cloudformation docs makes me think that it's the root of this issue.

This is correct. The feature appears to be missing in Cloudformation.

@driverpt
Copy link

driverpt commented Sep 9, 2022

I've created this bug in Cloudformation

@Naumel Naumel removed their assignment Jun 28, 2023
@pahud pahud added p3 and removed p2 labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-imagebuilder Related to EC2 Image Builder feature-request A feature should be added or improved. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p3
Projects
None yet
Development

No branches or pull requests

5 participants