You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should be able to call addDepenedency(bucketDeployment) on L1 resources that depend on a bucket deployment, but it does not currently work.
Use Case
Right now, e.g. cases where an L1 resource depends on an S3 objects (such as Greengrassv2 ComponentVersions) are unsupported, as the BucketDeployment is some kind of special resource that does not implement the interfaces of the CfnResource, including also on it's node.defaultChild property. This makes it impossible to use the BucketDeployment with such resources, as they require the S3 object to already exist before they can be created.
Proposed Solution
I think node.defaultChild property of the BucketDeployment should implement CfnResource interface because its just a custom resource and those can be used as dependencies in Cloudformation, right?
Other Information
I was able to use this hack as a workaround:
constrecipie=this.generateGGv2Recipie();constdepl=newBucketDeployment(this,"GGv2RunScript",{sources: [Source.asset(path.join(__dirname,"..","..","..","src"),{ignoreMode: cdk.IgnoreMode.GIT,exclude: ["*","!ggv2-run.sh"],assetHash: recipie,})],destinationBucket: Bucket.fromBucketName(this,"ComponentsBucket",cfg.componentsBucketName),// its required to make sure the path to file is predictable because greengrass needs full path to the file in the recipie and the file to exist at the given location before the componentversion can be createddestinationKeyPrefix: "/my/prefix/",extract: true});constcomponentVersion=newggv2.CfnComponentVersion(this,"MyComponent",{inlineRecipe: recipie,});Dependable.implement(depl,{dependencyRoots: [depl]})componentVersion.node.addDependency(depl)
Acknowledgements
I may be able to implement this feature request
This feature might incur a breaking change
CDK version used
2.147.0
Environment details (OS name and version, etc.)
Ubuntu 22.04, AMD64
The text was updated successfully, but these errors were encountered:
The second one is the bucket deployment and the first is some kind of layer with aws cli command I guess? Idk... But I think its used by the bucket deployment lambda.
Describe the feature
We should be able to call
addDepenedency(bucketDeployment)
on L1 resources that depend on a bucket deployment, but it does not currently work.Use Case
Right now, e.g. cases where an L1 resource depends on an S3 objects (such as Greengrassv2 ComponentVersions) are unsupported, as the BucketDeployment is some kind of special resource that does not implement the interfaces of the
CfnResource
, including also on it'snode.defaultChild
property. This makes it impossible to use the BucketDeployment with such resources, as they require the S3 object to already exist before they can be created.Proposed Solution
I think
node.defaultChild
property of the BucketDeployment should implement CfnResource interface because its just a custom resource and those can be used as dependencies in Cloudformation, right?Other Information
I was able to use this hack as a workaround:
Acknowledgements
CDK version used
2.147.0
Environment details (OS name and version, etc.)
Ubuntu 22.04, AMD64
The text was updated successfully, but these errors were encountered: