terraform-provider-azurerm: Simple terraform script always causes grpc: error while marshaling: string field contains invalid UTF-8
Is there an existing issue for this?
- I have searched the existing issues
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave “+1” or “me too” comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version
1.2.4
AzureRM Provider Version
3.13.0
Affected Resource(s)/Data Source(s)
azurerm_resource_group
Terraform Configuration Files
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=3.13.0"
}
}
}
provider "azurerm" {
features {}
}
# Create a resource group
resource "azurerm_resource_group" "my" {
name = "rgtest"
location = "westeurope"
}
Debug Output/Panic Output
2022-07-08T17:56:33.002+0200 [TRACE] provider.terraform-provider-azurerm_v3.13.0_x5.exe: Calling downstream: @caller=github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/tf5server/server.go:386 @module=sdk.proto tf_provider_addr=provider tf_req_id=69b4666b-dc3d-a7a0-39d9-966555e7bc7c tf_proto_version=5 tf_rpc=Configure timestamp=2022-07-08T17:56:33.002+0200
2022-07-08T17:56:33.002+0200 [INFO] provider.terraform-provider-azurerm_v3.13.0_x5.exe: Testing if Service Principal / Client Certificate is applicable for Authentication..: timestamp=2022-07-08T17:56:33.002+0200
2022-07-08T17:56:33.003+0200 [INFO] provider.terraform-provider-azurerm_v3.13.0_x5.exe: Testing if Multi Tenant Service Principal / Client Secret is applicable for Authentication..: timestamp=2022-07-08T17:56:33.002+0200
2022-07-08T17:56:33.003+0200 [INFO] provider.terraform-provider-azurerm_v3.13.0_x5.exe: Testing if Service Principal / Client Secret is applicable for Authentication..: timestamp=2022-07-08T17:56:33.002+0200
2022-07-08T17:56:33.003+0200 [INFO] provider.terraform-provider-azurerm_v3.13.0_x5.exe: Testing if OIDC is applicable for Authentication..: timestamp=2022-07-08T17:56:33.002+0200
2022-07-08T17:56:33.003+0200 [INFO] provider.terraform-provider-azurerm_v3.13.0_x5.exe: Testing if Managed Service Identity is applicable for Authentication..: timestamp=2022-07-08T17:56:33.002+0200
2022-07-08T17:56:33.003+0200 [INFO] provider.terraform-provider-azurerm_v3.13.0_x5.exe: Testing if Obtaining a Multi-tenant token from the Azure CLI is applicable for Authentication..: timestamp=2022-07-08T17:56:33.002+0200
2022-07-08T17:56:33.004+0200 [INFO] provider.terraform-provider-azurerm_v3.13.0_x5.exe: Testing if Obtaining a token from the Azure CLI is applicable for Authentication..: timestamp=2022-07-08T17:56:33.002+0200
2022-07-08T17:56:33.004+0200 [INFO] provider.terraform-provider-azurerm_v3.13.0_x5.exe: Using Obtaining a token from the Azure CLI for Authentication: timestamp=2022-07-08T17:56:33.002+0200
2022-07-08T17:56:35.950+0200 [TRACE] provider.terraform-provider-azurerm_v3.13.0_x5.exe: Called downstream: tf_proto_version=5 tf_provider_addr=provider tf_req_id=69b4666b-dc3d-a7a0-39d9-966555e7bc7c tf_rpc=Configure @module=sdk.proto @caller=github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/tf5server/server.go:392 timestamp=2022-07-08T17:56:35.950+0200
2022-07-08T17:56:35.950+0200 [ERROR] plugin.(*GRPCProvider).ConfigureProvider: error="rpc error: code = Internal desc = grpc: error while marshaling: string field contains invalid UTF-8"
2022-07-08T17:56:35.951+0200 [TRACE] provider.terraform-provider-azurerm_v3.13.0_x5.exe: Served request: @module=sdk.proto tf_provider_addr=provider tf_req_id=69b4666b-dc3d-a7a0-39d9-966555e7bc7c tf_rpc=Configure @caller=github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/tf5server/server.go:398 tf_proto_version=5 timestamp=2022-07-08T17:56:35.950+0200
2022-07-08T17:56:35.951+0200 [DEBUG] provider.terraform-provider-azurerm_v3.13.0_x5.exe: ERROR: 2022/07/08 17:56:35 [core] grpc: server failed to encode response: rpc error: code = Internal desc = grpc: error while marshaling: string field contains invalid UTF-8
2022-07-08T17:56:35.951+0200 [ERROR] vertex "provider[\"registry.terraform.io/hashicorp/azurerm\"]" error: Plugin error
2022-07-08T17:56:35.952+0200 [TRACE] vertex "provider[\"registry.terraform.io/hashicorp/azurerm\"]": visit complete, with errors
Expected Behaviour
terraform plan should return without error
Actual Behaviour
│ Error: Plugin error │ │ with provider[“registry.terraform.io/hashicorp/azurerm”], │ on test.tf line 10, in provider “azurerm”: │ 10: provider “azurerm” { │ │ The plugin returned an unexpected error from plugin.(*GRPCProvider).ConfigureProvider: rpc error: code = Internal desc = grpc: error while marshaling: string field contains invalid UTF-8
Steps to Reproduce
terraform plan
Important Factoids
Running on Windows 10, script was a newly written file with current version of Visual Studio Code
References
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 13
- Comments: 18 (6 by maintainers)
I got the same problem today, hope this helps someone:
I was logged in per
az account show, yet somehow logging in again (az login) fixed the problem.try after logging into azure. it worked for me!