https://pulumi.com logo
#general
Title
# general
a

ambitious-helmet-24352

10/29/2019, 4:11 PM
Hey how to I run pulumi up on my stack while excluding certain items ?
w

white-balloon-205

10/29/2019, 4:25 PM
What do you mean exactly by "excluding certain items"? We did add
-target <urn>
support recently - but that is intended for the opposite scenario - only updating specific resources. If you have more details on this - it may make sense to open a GitHub issue.
👍 1
i

incalculable-diamond-5088

10/29/2019, 5:13 PM
We’re using flags for that:
Copy code
function parseFlag(name: string, defaultValue: boolean): boolean {
  const envVar = process.env[name]
  if (envVar === undefined) return defaultValue
  return ['1', 'yes', 'y', 'true'].includes(envVar)
}

export const allowDatadog = parseFlag('ALLOW_DATADOG', true)
And then later:
Copy code
if (allowDatadog) { ... }
And then you can run:
Copy code
ALLOW_DATADOG=0 pulumi up
👍 1