terraform
terraform copied to clipboard
stdout: error="read |0: file already closed
Terraform Version
1.9.0 - 1.9.5 (Linux AMD64)
Terraform Configuration Files
terraform { required_providers { azurerm = { source = "hashicorp/azurerm" version = "~> 3.116.0" } random = { source = "hashicorp/random" version = "3.3.1" } }
backend "azurerm" {} }
provider "azurerm" { subscription_id = var.subscription_id features {} }
resource "azurerm_resource_group" "test" {
name = "TEST-RG" location = "North Europe"
}
provider "random" {}
Debug Output
[ERROR] provider: error encountered while scanning stdout: error="read |0: file already closed
Expected Behavior
Normal deployment
Actual Behavior
This Error does occur on every deployment but in about 30% of all cases.
Does not occur with terraform 1.8.5
Steps to Reproduce
1.terraform init 2. terraform plan 3. terraform apply
Additional Context
No response
References
A simliar Issue; https://github.com/hashicorp/go-plugin/issues/116
Hi @DavidHermes,
That isn't a user-facing error from Terraform, are you experiencing a problem with Terraform planning or applying the configuration?
It happens when applying a configuration.
I can confirm that this issue happens in some deployments. It seems to happen randomly, sometimes I get this error, but then re-running terraform apply with the same exact configuration works. Platform is Ubuntu x64.
This started happening after a recent Terraform update, but I can't pinpoint the exact version. It does not seem to be provider-related, as downgrading to an older Terraform version (1.6.x in my case) fixes it.
Hello, the question we're waiting on is if there is an error reported by Terraform in the UI, or if Terraform is not behaving correctly. The log message above is not intended for the end user, it is probably an erroneous log message from an upstream library, but I'd like to rule out any possible Terraform issues before sending this over to other maintainers.
Thanks!
Since we have not heard back in a while I'm going to close the issue. If you have any updates regarding the issue, feel free to open a new issue with the requested information. If you have more questions, you can also use the community forum where there are more people ready to help.
Thanks!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.