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

Introduce Manual Lock Mecanism #1891

Open
suzuki-shunsuke opened this issue Oct 10, 2024 · 5 comments
Open

Introduce Manual Lock Mecanism #1891

suzuki-shunsuke opened this issue Oct 10, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@suzuki-shunsuke
Copy link
Owner

Feature Overview

Introduce Manual Lock Mecanism.

Why is the feature needed?

Sometimes we want to prevent accessing Terraform State and some terraform commands such as plan, apply and import.
For example,

  1. You want to prevent any changes during an event
  2. You want prevent any changes during splitting Terraform State

Example Code

No response

Note

No response

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Oct 10, 2024
@suzuki-shunsuke
Copy link
Owner Author

  • We don't want to depend on other services such as AWS and GCP. We want use GitHub features such as branches, issues and GHCR
  • Enable us to list locked directories
  • Enable us to leave comments when locking and unlocking
  • Easy to understand the mechanism

@suzuki-shunsuke
Copy link
Owner Author

Operation

  • List locked directories
  • Lock a directory
  • Unlock a directory

How to lock

  • workflow_dispatch
  • Open an issue
    • Create an issue per directory
  • Post a comment to an issue
  • Post a comment to a pull request

@suzuki-shunsuke
Copy link
Owner Author

Action when the directory is locked

  • Wait until the directory is unlocked
    • timeout
  • Fail immediately

@suzuki-shunsuke
Copy link
Owner Author

I've developed a GitHub Action for lock mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant