JaydenMaalouf / azure-pipelines-terraform-output

MIT License
4 stars 2 forks source link

Terraform deployment issue: Terraform Output failed with Exit Code: null Error Message: spawnSync /usr/bin/terraform ENOBUFS #16

Open syed-obaid-abbott opened 2 weeks ago

syed-obaid-abbott commented 2 weeks ago

Hi

I am using Terraform to deploy the infrastructure for the ADB2C service in Azure through an Azure DevOps CI/CD pipeline. Everything was functioning smoothly until recently, but now I'm encountering an issue. While the build pipelines run without any problems, the Terraform deployment in the release pipeline is failing during the Terraform Load Output task. I've even tried removing the .git folder from the published artifact in the build pipeline, but the issue persists.

Any assistance would be greatly appreciated.

[error]Terraform Output failed with Exit Code: null

  Error Message: spawnSync /usr/bin/terraform ENOBUFS

Regards Syed Obaid.

syed-obaid-abbott commented 2 weeks ago

Forgot to mention the size of terraform plan

printing size of plan svc_d_hf_bld domain users 3607795 Nov 7 20:31 tfplan

syed-obaid-abbott commented 2 weeks ago

Any update? Your kind help will be highly appreciated

JaydenMaalouf commented 1 week ago

This issue is due to the size of your plan output and the limitation of the buffer set by the azure-pipelines-task-lib Mind you, this is set to 1024x1024x1024 by default

For me to fix this, it would require a PR here https://github.com/microsoft/azure-pipelines-task-lib/blob/7898b15726774c98a607a7e2d69898481caed201/node/toolrunner.ts#L594

Which Microsoft don't accept PR's for :( Maybe you could raise an issue there and link it to this issue?

Ideally the IExecOptions would include the ability to set the buffer size (within limits ofc)