https://pulumi.com logo
#typescript
Title
# typescript
m

magnificent-lifeguard-15082

11/25/2021, 12:16 PM
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

green-school-95910

11/25/2021, 12:37 PM
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

magnificent-lifeguard-15082

11/25/2021, 12:39 PM
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

billowy-army-68599

11/26/2021, 5:54 PM
@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

magnificent-lifeguard-15082

11/26/2021, 6:02 PM
Will file an issue, thanks!
documented here
b

billowy-army-68599

11/26/2021, 6:09 PM
@magnificent-lifeguard-15082 as a workaround, you could wrap the remote state reference with an
if pulumi.is_dry_run()
m

magnificent-lifeguard-15082

11/26/2021, 6:10 PM
ty that should work (I just have a config now but this will save me another variable!)