aws-codebuild: Project secondaryArtifacts not removed from resource when property is removed #33300
Labels
@aws-cdk/aws-codebuild
Related to AWS CodeBuild
bug
This issue is a bug.
closing-soon
This issue will automatically close in 4 days unless further comments are made.
effort/medium
Medium work item – several days of effort
p3
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
In CodeBuild Project , if secondary artifacts are removed from CDK code, secondary artifacts are not removed from the resource. This issue is occurring because CDK removes the secondary artifact from the CFN template from the template when this is commented in cdk code.
There seems to be limitation with CFN resource 'AWS::CodeBuild::Project' where to unset or remove a project value via CFN, explicitly provide the attribute with value as empty input : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html
So CDK should synthsize the template such that, if the secondary artifact is removed from code during update, then the synthesised template should have SecondaryArtifacts as []. This would unset the property.
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
Secondary artifacts must be removed from the project.
Current Behavior
Secondary artifacts are not getting removed.
Reproduction Steps
Code to replicate:
After the stack is created from above code. Comment or remove secondaryArtifacts from the code and update the stack.
Possible Solution
CDK should synthsize the template such that, if the secondary artifact is removed from code during update, then the synthesised template should have SecondaryArtifacts as []. This would unset the property.
Additional Information/Context
No response
CDK CLI Version
2.175.1
Framework Version
No response
Node.js Version
v23.1.0
OS
MacOs
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: