Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): add ShowResult attribute to plan response #4777

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

raulsh
Copy link

@raulsh raulsh commented Jul 23, 2024

what

Add new ShowResult attribute in /api/plan endpoint. It reads show output file and put into API response.

why

It allows to use JSON output to create new implementations/tools based on this instead of plain text Terraform output. In my case, I can build a drift detection tools that relies on Atlantis plan execution (instead of executing plan on separate environment).

Even I tried with https://github.com/cresta/atlantis-drift-detection. But just uses Atlantis just to check if a project have changes and locking state if need to do a plan. But after that, it needs to execute a plan outside Atlantis.

tests

references

@raulsh raulsh requested review from a team as code owners July 23, 2024 13:00
@raulsh raulsh requested review from GenPage, lukemassa and X-Guardian and removed request for a team July 23, 2024 13:00
@github-actions github-actions bot added docs Documentation go Pull requests that update Go code labels Jul 23, 2024
@raulsh raulsh changed the title feat(api): add ShowResult attribute to plan response feat(api): add ShowResult attribute to api plan response Jul 23, 2024
@raulsh raulsh changed the title feat(api): add ShowResult attribute to api plan response feat(api): add ShowResult attribute to plan response Jul 23, 2024
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some test per this change?

@chenrui333 chenrui333 added the feature New functionality/enhancement label Jul 23, 2024
@chenrui333
Copy link
Member

ping @raulsh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation feature New functionality/enhancement go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add json output in api response
2 participants