codify-plugin-lib 1.0.119 → 1.0.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/plugin/plugin.js +3 -2
- package/package.json +1 -1
- package/src/plugin/plugin.ts +3 -2
package/dist/plugin/plugin.js
CHANGED
|
@@ -98,9 +98,10 @@ export class Plugin {
|
|
|
98
98
|
throw new Error('Malformed plan with resource that cannot be found');
|
|
99
99
|
}
|
|
100
100
|
await resource.apply(plan);
|
|
101
|
-
// Validate using desired/desired. If the apply was successful, no changes should be reported back
|
|
101
|
+
// Validate using desired/desired. If the apply was successful, no changes should be reported back.
|
|
102
|
+
// Default back desired back to current if it is not defined (for destroys only)
|
|
102
103
|
const validationPlan = await ptyLocalStorage.run(new BackgroundPty(), async () => {
|
|
103
|
-
const result = await resource.plan(plan.desiredConfig, plan.desiredConfig, plan.statefulMode);
|
|
104
|
+
const result = await resource.plan(plan.desiredConfig, plan.desiredConfig ?? plan.currentConfig, plan.statefulMode);
|
|
104
105
|
await getPty().kill();
|
|
105
106
|
return result;
|
|
106
107
|
});
|
package/package.json
CHANGED
package/src/plugin/plugin.ts
CHANGED
|
@@ -151,11 +151,12 @@ export class Plugin {
|
|
|
151
151
|
|
|
152
152
|
await resource.apply(plan);
|
|
153
153
|
|
|
154
|
-
// Validate using desired/desired. If the apply was successful, no changes should be reported back
|
|
154
|
+
// Validate using desired/desired. If the apply was successful, no changes should be reported back.
|
|
155
|
+
// Default back desired back to current if it is not defined (for destroys only)
|
|
155
156
|
const validationPlan = await ptyLocalStorage.run(new BackgroundPty(), async () => {
|
|
156
157
|
const result = await resource.plan(
|
|
157
158
|
plan.desiredConfig,
|
|
158
|
-
plan.desiredConfig,
|
|
159
|
+
plan.desiredConfig ?? plan.currentConfig,
|
|
159
160
|
plan.statefulMode
|
|
160
161
|
);
|
|
161
162
|
|