Is there a way I could, at runtime, hook into (and...
# typescript
m
Is there a way I could, at runtime, hook into (and override) a provider such as aws so that I can prevent its default actions? Essentially I'm trying to, completely isolated and offline, get all registered resources and their inputs. I don't care about resolved outputs and don't want it to hit any aws apis, I'm just wanting to check user input.
g
You should be able to do
pulumi preview --refresh=false
It won't apply anything and calculate the diff using only the state, without hitting AWS
m
ty
this has helped me make progress
though
_terraform_._state_.RemoteStateReference
appears to try and hit my configured s3 backend
feels like it shouldn’t when not wanting to refresh and instead pulumi is just tracking an
Output
will try at least bypass with some configuration
Regarding this: is this expected behaviour? The implication was that
--refresh=false
should not do any network?
b
@magnificent-lifeguard-15082 remote state reference might not honour this, you'll need to file an issue, it's a bit of an edge case
m
Will file an issue, thanks!
documented here
b
@magnificent-lifeguard-15082 as a workaround, you could wrap the remote state reference with an
if pulumi.is_dry_run()
m
ty that should work (I just have a config now but this will save me another variable!)