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

Add terraform output to action output #215

Open
1 task done
jdraymon opened this issue Sep 13, 2024 · 1 comment
Open
1 task done

Add terraform output to action output #215

jdraymon opened this issue Sep 13, 2024 · 1 comment
Labels
enhancement New feature or request new A new issue or feature request that has not yet been triaged by maintainers

Comments

@jdraymon
Copy link

Description

In order to make programmatic decisions based on the terraform plan, it would be helpful to add the results of the cdktf-cli script as an output on the action. Presently the output only goes into a generated comment, so is unavailable for the next step in a pipeline.

Concrete example:
I want to set up an action pipeline where:

  1. A plan is generated
  2. IF there are changes to a stack, run a apply job
  3. ELSE do nothing

To solve this I'd like to parse the terraform output and detect if any changes were part of the diff/plan

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@jdraymon jdraymon added enhancement New feature or request new A new issue or feature request that has not yet been triaged by maintainers labels Sep 13, 2024
@jdraymon
Copy link
Author

As I dig into the code a bit more, outputting the results of hasTerraformChanges() would be enough for my use case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new A new issue or feature request that has not yet been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

1 participant