pulumi / docs

All things Pulumi docs!
https://pulumi.com
Apache License 2.0
125 stars 220 forks source link

Document logflow parameter in the troubleshooting guide #11730

Open DaRosenberg opened 2 years ago

DaRosenberg commented 2 years ago

Issue details

The Azure CLI (az) can be configured using the --debug switch to print the actual requests and responses (including URL, method, and body and headers in both directions) against the Azure REST API, which can be enormously helpful in troubleshooting.

The AzureNative provider should do the same when running Pulumi with -v=9 --logtostderr.

One example scenario where this would be particularly helpful is when it's not clear whether to specify a resource by its name or its fully qualified ID (as is the case with many resources in the ApiManagement space, where it's common for their properties to be named things like ApiId but in reality only a name is expected. In such cases, the API will often respond with just a 404 with an empty body, which Pulumi can't say much about. But seeing the actual request URL in these cases can clearly show what's wrong.

Affected area/feature

mikhailshilkov commented 2 years ago

Maybe you are missing --logflow. The HTTP logs should already be available with e.g.

pulumi up --debug -v=9 --logtostderr --logflow --yes --skip-preview
DaRosenberg commented 2 years ago

Yes, did not know about that. I think it's not documented in the troubleshooting section?

DaRosenberg commented 2 years ago

I think that should definitely be added here: https://www.pulumi.com/docs/troubleshooting/#verbose-logging