You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When TF_LOG=DEBUG is set, request logs are output in [INFO] logs, but response logs are not.
If response logs were also output, it would be convenient to obtain information about the created resource details and RequestId.
Environment
terraform v1.5.7
terraform provider v1.14.0
export TF_LOG=DEBUG
NOTE
However, in the case of an error, the error response is formatted and output as [ERROR].
But the response information, including headers that were obtained with [INFO] in #90, is not obtained.
> 2024-06-18T13:50:06.883Z [INFO] provider.terraform-provider-nifcloud_v1.14.0: 2024/06/18 13:50:06 DEBUG Request
> POST /api/ HTTP/1.1
> Host: jp-east-1.computing.api.nifcloud.com
> User-Agent: aws-sdk-go-v2/1.17.4 os/linux lang/go/1.20.3 md/GOOS/linux md/GOARCH/amd64 api/computing/1.22.1
> Content-Length: 256
> Amz-Sdk-Invocation-Id: 2818f70e-ba4e-47ad-b684-de0160fd45ce
> Amz-Sdk-Request: attempt=1; max=1
> Content-Type: application/x-www-form-urlencoded
> Accept-Encoding: gzip
>
> AccessKeyId={masked}&Action=ImportKeyPair&Description=&KeyName=deployerkey&PublicKeyMaterial=YQo%3D&Signature={masked}&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2024-06-18T13%3A50%3A06Z&Version=3.0: timestamp=2024-06-18T13:50:06.883Z
> 2024-06-18T13:50:07.354Z [ERROR] provider.terraform-provider-nifcloud_v1.14.0: Response contains error diagnostic: tf_proto_version=5.3 tf_resource_type=nifcloud_key_pair tf_rpc=ApplyResourceChange tf_provider_addr=provider tf_req_id=165ffd33-fbad-caa1-ae62-2475a98ee15e @caller=/home/runner/go/pkg/mod/github.com/hashicorp/[email protected]/tfprotov5/internal/diag/diagnostics.go:58 @module=sdk.proto diagnostic_detail= diagnostic_severity=ERROR diagnostic_summary="failed creating KeyPair: operation error computing: ImportKeyPair, https response error StatusCode: 500, RequestID: 704f1dd9-12d8-41a8-9d71-fa2c62234b93, api error Client.AuthFailurePermission.AccessKey: This system was not able to validate the provided access key." timestamp=2024-06-18T13:50:07.354Z
Reference Information
It seems possible to output them by changing cfg.ClientLogMode = aws.LogRequestWithBody to cfg.ClientLogMode = aws.LogRequestWithBody | aws.LogResponseWithBody.
Summary
When TF_LOG=DEBUG is set, request logs are output in [INFO] logs, but response logs are not.
If response logs were also output, it would be convenient to obtain information about the created resource details and RequestId.
Environment
export TF_LOG=DEBUG
NOTE
However, in the case of an error, the error response is formatted and output as [ERROR].
But the response information, including headers that were obtained with [INFO] in #90, is not obtained.
Reference Information
It seems possible to output them by changing
cfg.ClientLogMode = aws.LogRequestWithBody
tocfg.ClientLogMode = aws.LogRequestWithBody | aws.LogResponseWithBody
.https://github.com/nifcloud/terraform-provider-nifcloud/blob/main/nifcloud/provider_config.go#L35
The text was updated successfully, but these errors were encountered: