Skip to content

Commit

Permalink
feat(pulumi): Added expectNoChanges option to preview executor
Browse files Browse the repository at this point in the history
  • Loading branch information
TriPSs committed May 16, 2024
1 parent 970507f commit a42223b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/pulumi/src/executors/preview/preview.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { which } from 'shelljs'
export interface PreviewOptions {
stack?: string
root?: string

expectNoChanges?: boolean
}

export default async function creatExecutor(
Expand All @@ -22,7 +24,8 @@ export default async function creatExecutor(
execSync(buildCommand([
'PULUMI_EXPERIMENTAL=true',
'pulumi preview --diff --suppress-progress',
options.stack && `--stack=${options.stack}`
options.stack && `--stack=${options.stack}`,
options.expectNoChanges && '--expect-no-changes'
]), {
cwd: join(workspaceRoot, options.root ?? sourceRoot),
stdio: 'inherit'
Expand Down
3 changes: 3 additions & 0 deletions packages/pulumi/src/executors/preview/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"root": {
"type": "string",
"description": "The working directory to run Pulumi commands from, if specified."
},
"expectNoChanges": {
"type": "boolean"
}
}
}

0 comments on commit a42223b

Please sign in to comment.