Reputation: 368
I have created a Azure devOps Pipeline with a task to output a human readable Terraform plan.
I have the below pipeline task that was working without warnings...
- task: TerraformOutput@1
enabled: true
inputs:
outputFilePath: $(System.DefaultWorkingDirectory)/deployment_layer/network/tfplan'
artifactName: 'tfplan'
I am now getting a warning:
##[warning]Task 'Terraform Load Output' version 1 (TerraformOutput@1) is dependent on a Node version (10) that is end-of-life.
Contact the extension owner for an updated version of the task. Task maintainers should review Node upgrade guidance: https://aka.ms/node-runner-guidance
I have a look at the url but could not work out how what they were saying could relate back to my task to resolve the warning.
I'll try and find a similar 'task' that creates and publishes as a tab a human readable Terraform Plan - anyone else used a different task type to do this other than 'TerraformOutput@1'?
- task: TerraformOutput@1
enabled: true
displayName: "Create human readbale plan"
inputs:
outputFilePath: '$(System.DefaultWorkingDirectory)/deployment_layer/re_id/tfplan'
artifactName: 'tfplan'
Upvotes: 1
Views: 1612
Reputation: 35259
I can get the same warning when using the TerraformOutput@1 task in Azure DevOps.
It indicates that the pipeline task is using the end-of-life node version. The warning is from the task itself.
Refer to the TerraformOutput task configuration: task.json
"execution": {
"Node10": {
"target": "src/index.js"
}
}
We need to contact the Extension developer to update the node version that the extension depends on. As shared by jessehouwing, we can create issue feedback ticket in the Extension site.
Based on my test, this warning does not affect the use of the task for the time being. You can ignore this warning and continue to use it.
I'll try and find a similar 'task' that creates and publishes as a tab a human readable Terraform Plan - anyone else used a different task type to do this other than 'TerraformOutput@1'?
I am afraid that there is no out-of-box pipeline tasks(built-in or extension tasks) can achieve the same feature(show the terraform plan output in the Pipeline tab).
For a workaround, we can use terraform show command to convert the tfplan file to a human readable format and use logging command to output the file to pipeline task.
Here is an example:
steps:
- task: TerraformTaskV4@4
inputs:
provider: 'azurerm'
command: 'init'
xxx
- task: TerraformTaskV4@4
inputs:
provider: 'azurerm'
command: 'plan'
commandOptions: '-out=tfplan'
environmentServiceNameAzureRM: 'xx'
- task: TerraformTaskV4@4
inputs:
provider: 'azurerm'
command: 'show'
commandOptions: 'tfplan -no-color'
outputTo: 'file'
outputFormat: 'default'
fileName: 'tfplan.md'
environmentServiceNameAzureRM: 'xx'
- bash: |
ls -la
sed -i '1 i\```' tfplan.md
echo '```' >> tfplan.md
echo "##vso[task.uploadsummary]$(System.DefaultWorkingDirectory)/tfplan.md"
Result:
In this case, we can see the human readable terraform output in the Pipeline tab.
Upvotes: 1