https://pulumi.com logo
m

magnificent-smartphone-40853

05/21/2022, 12:12 AM
How do you ignore all changes to a property inside of a nested array? something like:
ignoreChanges: ['taskDefinitionArgs.containers[*].image']
where
containers
is an array.
I ended up using a transformation instead. Seems the EBNF notation doesn't support wildcarding
Copy code
transformations: [args => {
                    if (args.type === "aws:ecs/TaskDefinition:ContainerDefinition") {
                        return {
                            props: args.props,
                            opts: pulumi.mergeOptions(args.opts, {
                                ignoreChanges: ['image']
                            })
                        };
                    }

                    return undefined;
                }],
🎉 1
l

little-cartoon-10569

05/22/2022, 9:14 PM
Great solution!
55 Views