Git Product home page Git Product logo

action-terraform-report's Introduction

About Ahmad Nassri

Ahmad is a Fractional CTO, Startup Advisor, and Investor. Leading up to the acquisition by GitHub in 2020, Ahmad served as the CTO for npm, taking over the critical mission of ensuring the Open Source JavaScript registry remains stable, reliable and sustainable for the millions of developers and systems that rely on it daily.

Prior to joining npm, Ahmad led the platform engineering team as Chief Architect for TELUS Digital. As VP of Engineering at Kong, his focus was on powering API-driven development, and open-source technology for the enterprise.

Ahmad founded REFACTOR Community โ€” a developer community of over 17,000+ members, operating 4 annual tech conferences in Canada.

action-terraform-report's People

Contributors

ahmadnassri avatar dependabot[bot] avatar ruxandrafed avatar semantic-release-bot avatar smokedlinq avatar x4b1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

action-terraform-report's Issues

Make pull request an input

GitHub security best practices suggest putting commenting workflows separate (details)

I have my workflow output the json and txt diffs as artifacts, and would like to call this action from a dependent workflow with those files - but this isn't currently possible because this action fails to get the pull request metadata from the dependent workflow.

Can we add an optional input for pull request number?

Many thanks for the awesome plugin!

`remove-stale-reports` doesn't seem to work

Utilizing v3.2.5, and the following configuration -- looks a little funky because this is a reusable workflow, and we have multiple sets of terraform deployments per repository:

# [...]
      - name: terraform-plan
        if: ${{ !inputs.destroy && !inputs.apply }}
        run: |
          terraform -chdir="${{ inputs.deployment_name }}" plan \
            -out terraform.plan \
            -var deployment_name="${{ inputs.deployment_name }}" \
            -var environment="${{ inputs.environment }}" ${{ secrets.terraform_args }}

          terraform -chdir="${{ inputs.deployment_name }}" \
            show -no-color terraform.plan > "${{ github.workspace }}/${{ inputs.deployment_name }}.plan.text"

          terraform -chdir="${{ inputs.deployment_name }}" \
            show -json terraform.plan > "${{ github.workspace }}/${{ inputs.deployment_name }}.plan.json"
      - uses: ahmadnassri/action-terraform-report@54b9349621e8310146a87b8c636b8d5fbab5767e
        if: ${{ github.event_name == 'pull_request' && !inputs.destroy && !inputs.apply }}
        with:
          terraform-text: "${{ github.workspace }}/${{ inputs.deployment_name }}.plan.text"
          terraform-json: "${{ github.workspace }}/${{ inputs.deployment_name }}.plan.json"
          custom-header: ":robot: terraform-plan: ${{ inputs.deployment_name }} (env: ${{ inputs.environment }})"
          show-plan: true
          show-diff: false
          remove-stale-reports: true
# [...]

Re-running the action twice results in a duplicate set of comments in the PR, and it doesn't remove the previous comments. Not sure if this is due to this logic and using a custom header, maybe?

Duplicate comment example:
image

To also add, the second run doesn't show any warnings/errors/etc about not being able to remove comments. This is the result of the 2nd run that added the 2nd comment:

image

Thoughts on what the issue may be? Am I misunderstanding what remove-stale-reports is used for?

Showing an example of usage

This looks promising! โค๏ธ

Would you be up for adding/showing an example (output/screenshot) of what the user experience is when using this action?

Feature Request: Add Custom Information to Header

Would it be possible to have some additional context such that we could add some custom information to the Report Header specifically

๐Ÿค– Terraform Report <- custom information here ->

We run our terraform for different environments/regions it would be nice to have the region/env information right at the top?

I would be willing to submit a PR, if you think that feature is acceptable.

Cant handle large deltas - >= 65k

There is a limit on the github api where if the terraform delta is over 65k chars, that the Github api cant handle the comment request.

It would be amazing if this action could trim the plan to be within the limiit and indicate in the comment that its been truncated.

Doesn't show destroy(recreated) resources

I have plan with 10 resources to recreate. action-terraform-report doesn't show destroyed resources for recreated/replaced resources in comment message.
Screenshot 2024-01-02 at 15 54 45

I expect this output:

Plan: 28 to add, 19 to change, 10 to destroy

Additional option to show recreated resourced like this:

Plan: 18 to add, 19 to change, 0 to destroy, 10 to recreate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.