diff --git a/libs/wingsdk/src/simulator/simulator.ts b/libs/wingsdk/src/simulator/simulator.ts index 88c93aead12..bb63842446b 100644 --- a/libs/wingsdk/src/simulator/simulator.ts +++ b/libs/wingsdk/src/simulator/simulator.ts @@ -916,16 +916,13 @@ export class Simulator { case UpdatePlan.REPLACE: return true; - } - // the resource is already in "current", if it's different from "next", it means it was updated - const state = (r: BaseResourceSchema) => - JSON.stringify({ - props: r.props, - type: r.type, - }); + case UpdatePlan.AUTO: + const state = (r: BaseResourceSchema) => + JSON.stringify({ props: r.props, type: r.type }); - return state(oldConfig) !== state(newConfig); + return state(oldConfig) !== state(newConfig); + } } } @@ -1014,7 +1011,7 @@ export interface ISimulatorResourceInstance { * If this is not implemented, the default behavior is to automatically replace the resource if * the new configuration is different from the current configuration. * - * @param newConfig The new configuration to apply + * @param newConfig The new configuration to apply (this could include unresolved tokens) */ plan(newConfig: BaseResourceSchema): Promise; }