I encountered an issue with the CDK while attempting to create a CfnImageRecipe. The error message
error TS2322: Type 'string' is not assignable to type 'ComponentConfigurationProperty | IResolvable'
keeps popping up.
Below is the code snippet that triggered the error:
const imageRecipe = new imagebuilder.CfnImageRecipe(this, 'MediaRecipe', {
name: 'MediaRecipe',
components: ["arn:aws:imagebuilder:us-west-1:aws:component/amazon-cloudwatch-agent-linux/1.0.0"],
parentImage: 'centos:latest',
version: '1.0.0',
workingDirectory: '/tmp'
});
It seems like the issue lies in using a string where it's not supposed to be used. Unfortunately, reliable documentation regarding this matter is hard to come by.