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

Excluding certain resource changes #28

Open
ricardofalc opened this issue Nov 26, 2024 · 2 comments
Open

Excluding certain resource changes #28

ricardofalc opened this issue Nov 26, 2024 · 2 comments
Labels

Comments

@ricardofalc
Copy link

Hi,

I am for example planning changes in resources against production.
But because the staging environment, has a different service principal for authentication and for example a different database connection string then production.

Each PR consistently marks this as a change, which is correct.
Is it possible to maybe introduce something where you can exclude these changes?

Or would this make it way too complex and make it prone to errors?

@borchero
Copy link
Owner

borchero commented Nov 26, 2024

I think it would be very feasible to provide a list of resource paths (+effect? i.e. change/update/...) that should be excluded from the comment pasted to the PR. Obviously, this would come with some caveats (do you really want the PR to show "no changes" if there's a diff in this resource path?) but I guess the user will be aware of the implications.

One potential addition could be the following:

- name: Post PR comment
  uses: borchero/terraform-plan-comment@v2
  with:
    token: ${{ github.token }}
    planfile: .planfile
    ignore-resources: |
      local_file.foo

or, including the effect:

- name: Post PR comment
  uses: borchero/terraform-plan-comment@v2
  with:
    token: ${{ github.token }}
    planfile: .planfile
    ignore-updates: |
      local_file.foo
    ignore-deletions: |
      local_file.bar

Wdyt? Would you be interested in contributing?

Copy link

🤖 Stalebot

This issue hasn't seen updates in the last 60 days.

If it has been resolved or won't be worked on, please consider closing the issue. Otherwise, it will be closed automatically in 30 days.

@github-actions github-actions bot added the stale label Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants