lifecycle feature to prevent it from recipe update failures
Terraform Core Version 1.9.8
AWS Provider Version 5.74.0
Affected Resource(s) aws_imagebuilder_image_recipe, aws_imagebuilder_image_pipeline
Expected Behavior Image recipe is expected to be deleted and recreated to facilitate component change.
Actual Behavior Image recipe can't be deleted because of an update in 5.74.0 which allows the image pipeline to be updated in place: https://github.com/hashicorp/terraform-provider-aws/pull/39117 producing a dependency error. Previously the image pipeline would have been deleted and recreated, followed by the same for recipe and component, as per the order here: https://docs.aws.amazon.com/imagebuilder/latest/userguide/delete-resources.html. However now the pipeline is being updated in place it means that it's dependent on the recipe so the recipe can't be recreated.
Relevant Error/Panic Output Snippet Error: deleting Image Builder Image Recipe (arn:aws:imagebuilder:xxx): operation error imagebuilder: DeleteImageRecipe, https response error StatusCode: 400, ResourceDependencyException: Resource dependency error: The resource ARN 'arn:aws:imagebuilder:xxx' has other resources depended on it. Terraform Configuration Files N/A
Steps to Reproduce Create an image pipeline with attached recipe and component. Change component to cause a recreation of the recipe.
Debug Output No response
Panic Output No response
Important Factoids No response
References No response
Would you like to implement a fix? Introduce a lifecycle block in the image pipeline resource would fix the issue