jaydenmaalouf / azure-pipelines-terraform-output Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
The pipeline step fails with the error:
##[error]TypeError: Cannot read property 'message' of undefined
This is my setup:
- task: TerraformOutput@1 # https://marketplace.visualstudio.com/items?itemName=JaydenMaalouf.terraform-output
inputs:
outputFilePath: '$(ROOT_MODULE)/terraform-plan'
artifactName: 'dev'
2023-06-15T10:24:48.0612569Z ##[section]Starting: TerraformOutput
2023-06-15T10:24:48.0615487Z ==============================================================================
2023-06-15T10:24:48.0615597Z Task : Terraform Load Output
2023-06-15T10:24:48.0615672Z Description : Load Terraform Output into Terraform Tab
2023-06-15T10:24:48.0615750Z Version : 1.1.27
2023-06-15T10:24:48.0615811Z Author : Jayden Maalouf
2023-06-15T10:24:48.0615882Z Help :
2023-06-15T10:24:48.0615926Z ==============================================================================
2023-06-15T10:24:49.6226854Z ##[error]TypeError: Cannot read property 'message' of undefined
2023-06-15T10:24:49.6238066Z ##[section]Finishing: TerraformOutput
Looking through the code, the only reference to <something>.message
I can find is:
azure-pipelines-terraform-output/tasks/TerraformOutput/src/index.ts
Lines 24 to 27 in bd7edd0
So I wonder whether my setup is raising an error that is not being returned correctly.
Hello,
I am creating multiple TFPlan thoughout my Azure DevOps Releases and I would like to know if it would be possible to load every tfplan with a single task from you ?
My TFPlans are created dynamically but I can't duplicate dynamically your task.
So I want to know if it would be possible to add something like that with "*" selector :
Regards,
Alex.
I tried using the standard plan file, and the JSON file, either way, I get a complaint about the "version" missing. Confused because the documentation doesn't say anything about converting the binary output file to JSON before parsing it - or maybe it's failing it's own internal JSON parsing because of the version mismatch? I use tfenv
in the pipeline to set the version for whatever the workspace is using - in this case my workspace is using 1.5.5, but it looks like the task is defaulting to whatever the latest version is.
Assuming it's just a version issue, is there a way to force the task to use a specific version? Or somehow allow it to be dynamic enough to read the currently used terraform version? I'm using the -chdir
flag to hot swap workspaces within the pipeline, which, incidentally is the same as the below parameter: ${{ parameters.workspace }}
- task: TerraformOutput@1
displayName: Terraform Show
inputs:
outputFilePath: $(Build.ArtifactStagingDirectory)/output.tfplan
artifactName: ${{ parameters.workspace }}
Starting: Terraform Show
==============================================================================
Task : Terraform Load Output
Description : Load Terraform Output into Terraform Tab
Version : 1.1.34
Author : Jayden Maalouf
Help :
==============================================================================
##[error]Terraform Output failed with Exit Code: 1
Error Message: ╷
│ Error: Failed to read the given file as a state or plan file
│
│ State read error: Error reading /agent/_work/1/a/output.tfplan as a
│ statefile: 2 problems:
│
│ - Unsupported state file format: The state file could not be parsed as
│ JSON: syntax error at byte offset 1.
│ - Unsupported state file format: The state file does not have a "version"
│ attribute, which is required to identify the format version.
│
│ Plan read error: plan file was created by Terraform 1.5.5, but this is
│ 1.5.7; plan files cannot be transferred between different Terraform
│ versions
╵
Terraform Plan Tab in Run Summary
In Microsoft Edge 114.0.1823.90 where a Terraform Plan is produced which has information lines wider than the tab frame this information is not visible.
Is it possible to enable horizontal scroll bars for this tab?
Hello @JaydenMaalouf,
Sorry to bother you, I don't know if you follow the closed issues so I create another one here.
I installed your extension and now I can see the "Terraform Plan" tab in the Release stages... BUT it stays empty even with a Terraform plan executed and an output generated...
Can you tell me if I do something wrong or if it is an issue ?
Regards,
With the addition of Release pipelines, I need to update documentation
Hello,
Does this plugin works with Azure Releases ? Or is it only for Azure Pipelines YAML ?
Regards,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.