Open iisyos opened 5 months ago
@denis256 could you take a look on this? Output in json format would be very useful 😁
Will be helpful to add tests that will track JSON output generation
Will be helpful to add tests that will track JSON output generation
Disregard my last message, I got most of the tests working locally. However, the tests currently aren't setup for testing the outputs from the action. How were you envisioning that working, the only way I really see it working is by inspecting the github-action-logs that are written to /tmp currently.
Description
This PR introduces a new output variable
tg_output
that contains the Terragrunt output in JSON format. This allows users to easily parse and extract specific values from the Terragrunt output using tools like jq within their GitHub Actions workflows.Example usage:
This feature is useful when you need Terragrunt output values for the next steps in your workflow. It eliminates the need to hardcode resource names in template files, making your workflow more dynamic and flexible.
In the AWS provider, there are several situations where this feature can be particularly useful
tg_output
, you can automate the cache purge process in your workflow.tg_output
, you can easily access the service and cluster names, enabling you to implement a wait step in your workflow.Release Notes (draft)
Added / Removed / Updated [X].
Added
tg_output
variable containing Terragrunt output in JSON format.Migration Guide
N/A