pulumi/pulumi-converter-terraform

Consider a strict flag for example convert

t0yv0 opened this issue ยท 4 comments

t0yv0 commented

Hello!

  • Vote on this issue by adding a ๐Ÿ‘ reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

When building providers and converting examples as part of the build, we do not expect missing provider mappings. Missing mappings should be an error that blocks the build. This would be resolved by pinning more plugins so they're available for the build and examples conversion. Consider making it possible to opt into the behavior when missing mappings are an error, perhaps a Diagnostic emitted at ERROR level, not warning. Thank you.

Affected area/feature

t0yv0 commented

Actually maybe not necessary with pulumi/ci-mgmt#639 - we definitely intend to do 639 to prevent automatic plugin installation. Possibly that subsumes this ask. If plugins fail to auto-install, perhaps the converter already cannot emit mapping-free translations?

pulumi convert --strict already exists.

https://github.com/pulumi/pulumi/blob/4a577563effaef03f404691ef6d0fb177e2440ee/pkg/cmd/pulumi/convert.go#L137-L138

Is it not behaving the way you'd expect?

convert --strict changes codegen, but not conversion logic. We could pass a "strict" flag to convert to just change most (all?) warnings to errors.

I'm sorry for the delay here folks. I'll circle back once we have some practical experience with deploying the converter in the bridge build pipeline; consequently I'll have some more precise asks or close this as not needed.