[go: nahoru, domu]

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

WIP - Catch signals while running terraform commands to allow clean termination #76

Closed
wants to merge 2 commits into from

Conversation

bobh66
Copy link
Collaborator
@bobh66 bobh66 commented Jul 14, 2022

Description of your changes

Add signal handling when calling terraform commands that lock state so that the command can be gracefully terminated to clean up the workspace state locking.

Fixes #46

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Created a Workspace that has a terraform time_sleep resource with create_timeout set to 5 minutes and uses the terraform kubernetes backend

While tailing the pod log apply the workspace and observe that the reconcile of the workspace starts

Retrieve the list of kubernetes lease resources and observe that there is a lease for the specified workspace

Terminate the provider pod and observe in the logs that the process gets terminated. Observe that the Lease for the workspace has been deleted.

Signed-off-by: Bob Haddleton <bob.haddleton@nokia.com>
Signed-off-by: Bob Haddleton <bob.haddleton@nokia.com>
@bobh66
Copy link
Collaborator Author
bobh66 commented Jan 16, 2024

This PR has been moved to the new repository: upbound/provider-terraform#231

@bobh66 bobh66 closed this Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle tf state lock during the controller pod restart/upgrade
1 participant