Skip to content

fix: destroy the resource on drift - #1351

Merged
nickfloyd merged 3 commits into
integrations:mainfrom
yordis:fixes-749
Oct 20, 2025
Merged

nickfloyd merged 3 commits into
integrations:mainfrom
yordis:fixes-749

Conversation

@yordis

@yordis yordis commented Nov 5, 2022 •

Copy link
Copy Markdown
Contributor

closes #749

Based on the request from @jcudit #749 (comment) related to #749 (comment)

@github-actions

github-actions Bot commented Aug 3, 2023

Copy link
Copy Markdown

👋 Hey Friends, this pull request has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions Bot added the Status: Stale Used by stalebot to clean house label Aug 3, 2023
@yordis

yordis commented Aug 3, 2023

Copy link
Copy Markdown
Contributor Author

hopefully will figure out how to test this locally one day 😢

@github-actions github-actions Bot removed the Status: Stale Used by stalebot to clean house label Aug 4, 2023
@kfcampbell

Copy link
Copy Markdown
Contributor

@yordis have you had a peek at our CONTRIBUTING.md yet? There's some environment configuration you need but testing changes locally is very doable.

@yordis
yordis force-pushed the fixes-749 branch 2 times, most recently from 2fdc3cf to 2d80855 Compare August 10, 2023 21:47
@yordis

yordis commented Aug 10, 2023

Copy link
Copy Markdown
Contributor Author

@kfcampbell definitely helped a ton, my breakpoint is being hit now. Now trying to figure out how we suppose to setup the test case for it!

@yordis
yordis force-pushed the fixes-749 branch 2 times, most recently from 752ab9b to 04c83c0 Compare August 10, 2023 22:45
@yordis

yordis commented Aug 10, 2023

Copy link
Copy Markdown
Contributor Author

I am trying to figure out what function would allow me to check if a new id was assigned to the resource ... any feedback welcome

@yordis

yordis commented Aug 10, 2023

Copy link
Copy Markdown
Contributor Author

The thing is working! Just the testing environment is tricky! I am unsure how to create a scenario where the external resource change and whatnot ... 😢

2023-08-10_19-27-09.mp4

@kfcampbell

Copy link
Copy Markdown
Contributor

@yordis can you build a version of the provider locally and use it to manually test?

@yordis

yordis commented Aug 11, 2023

Copy link
Copy Markdown
Contributor Author

@kfcampbell good idea!

@yordis
yordis marked this pull request as ready for review August 25, 2023 01:58
@yordis

yordis commented Aug 25, 2023

Copy link
Copy Markdown
Contributor Author

Hey I gave it a try to test it by building the local plugin, but I couldn't figure out how to make it work:

I did the following:

cat ~/.terraformrc         
provider_installation {
  dev_overrides {
    "integrations/github" = "/Users/ubi/Developer/github.com/integrations/terraform-provider-github/bin/"
  }

  direct {}
}

No luck, I tested manually as I showed before, so maybe try on your end if you do not mind.

@kfcampbell

Copy link
Copy Markdown
Contributor

@yordis can you try following the instructions here to build the provider locally? You should be using a dev.tfrc file in order to specify the override.

@yordis

yordis commented Sep 15, 2023

Copy link
Copy Markdown
Contributor Author

I tried that guideline multiple times, and it didn't work.

As shown in the video, I tested by running the code in the test environment. I would appreciate it if someone took the lead in helping to do an integration test out of the generated binary.

@github-actions

Copy link
Copy Markdown

👋 Hey Friends, this pull request has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions Bot added the Status: Stale Used by stalebot to clean house label Jun 12, 2024
@yordis

yordis commented Jun 12, 2024

Copy link
Copy Markdown
Contributor Author

keep

@github-actions github-actions Bot removed the Status: Stale Used by stalebot to clean house label Jun 13, 2024
@MagnusHJensen

Copy link
Copy Markdown

Hi @yordis

We're running into the same problem just with regular action secrets.
I would like to offer my help in getting this fixed.

I can see your approach is to add a new destroy_on_drift property, but could we not just respect the already available ignore_changes array? And then check for either plaintext_value or encrypted_value appearing in that array, and not destroy it on drift, instead of introducing a new variable/config option? LMK what you think.

@nbali

nbali commented Nov 13, 2024

Copy link
Copy Markdown

Why wasn't this merged?

@github-actions

Copy link
Copy Markdown

👋 Hey Friends, this pull request has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions Bot added the Status: Stale Used by stalebot to clean house label Aug 11, 2025
@nbali

nbali commented Aug 11, 2025

Copy link
Copy Markdown

this is funny, because we can't

@github-actions github-actions Bot removed the Status: Stale Used by stalebot to clean house label Aug 12, 2025
@nickfloyd nickfloyd moved this to On Deck in Terraform Provider Oct 14, 2025
@nickfloyd nickfloyd moved this from On Deck to In Progress in Terraform Provider Oct 20, 2025
@nickfloyd
nickfloyd enabled auto-merge (squash) October 20, 2025 12:50
@nickfloyd
nickfloyd merged commit d67b357 into integrations:main Oct 20, 2025
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Terraform Provider Oct 20, 2025
@calebworks

Copy link
Copy Markdown

Thanks for updating the documentation in this PR 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

github_actions_organization_secret always applies the value, even if it's unchanged

6 participants