Certificate error in Visual Code for terraform script

Hi All,

Recently I updated visual code and after the update I’m getting the below error message while I destroy some terraform managed VM’s.

Could someone please help to resolve this issue.

Error: building account: getting authenticated object ID: parsing json result from the Azure CLI: waiting for the Azure CLI:
exit status 1: WARNING: The underlying Active Directory Graph API will be replaced by Microsoft Graph API in Azure CLI 2.37.0.
Please carefully review all breaking changes introduced during this migration: Microsoft Graph migration | Microsoft Docs
│ ERROR: Error occurred in request., SSLError: HTTPSConnectionPool(host=‘graph.windows.net’, port=443): Max retries exceeded with url: /85c997b9-f494-46b3-a11d-772983cf6f11/me?api-version=1.6 (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)’)))
│ Certificate verification failed. This typically happens when using Azure CLI behind a proxy that intercepts traffic with a self-signed certificate. Please add this certificate to the trusted CA bundle. More info: Tips for using the Azure CLI | Microsoft Docs.

│ with provider[“Terraform Registry”],
│ on tfb-conf.tf line 17, in provider “azurerm”:
│ 17: provider “azurerm” {

Regards,
Shanthosh

I managed to resolve the above mentioned issue by reinstalling the azure cli.

thank you!

Regards,
Shanthosh