This message was deleted.
# general
s
This message was deleted.
l
Not as a built-in feature, but stack and resource transformations have access to the opts parameter, so you could throw an exception from there.
t
Thank you! For others who are curious this seems to work:
Copy code
pulumi.runtime.registerStackTransformation((args) => {
  if (
    args.type.includes("kubernetes") &&
    !args.type.includes("provider") &&
    !args.opts.provider
  ) {
    throw `Please specify provider for ${args.name}`;
  }
  return undefined;
});
👍 1