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

feature request: UI button to trigger atlantis for reconciling environment drift #2075

Open
tekumara opened this issue Feb 20, 2022 · 3 comments
Labels
feature New functionality/enhancement Stale

Comments

@tekumara
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

Sometimes our environment drifts because of changes made outside terraform. To reconcile our environment with the source, we need to trigger atlantis without making changes to the repo.

Currently, this can be done by creating an empty commit and raising a PR. But it would be nice if this could be triggered via a button on the UI.

@tekumara tekumara added the bug Something isn't working label Feb 20, 2022
@nitrocode
Copy link
Member

nitrocode commented Jul 14, 2022

PR #997 would allow us to run plans and applies across Atlantis repos. It would not complete the cycle but it would be a step towards detecting drift.

Then Atlantis would need to discover the terraform root modules to apply, show each in the user interface, and expose a plan or trigger button, and a way to trigger Atlantis terraform plan jobs on a configurable cron.

This would implement a crude version of terraform Enterprise / spacelift user interfaces.

@jamengual jamengual added feature New functionality/enhancement waiting-on-response Waiting for a response from the user and removed bug Something isn't working labels Aug 26, 2022
@github-actions github-actions bot added the Stale label Oct 4, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2022
@tekumara
Copy link
Author

tekumara commented Oct 9, 2022

bump

@jamengual jamengual reopened this Oct 9, 2022
@github-actions github-actions bot removed the Stale label Oct 10, 2022
@nitrocode nitrocode removed the waiting-on-response Waiting for a response from the user label Nov 10, 2022
@nitrocode
Copy link
Member

This is a pretty big ticket but I would imagine this could be accomplished in smaller steps.

Now that /plan and /apply, the next thing we need is to display atlantis projects. The easiest way to do that is to:

  1. Detect all repos that are terraform repos (either explicitly set or by the regex)
  2. Read a repo's atlantis.yaml file and parse the yaml's projects key.
    • If there isn't one, perhaps we can auto discover root terraform projects ? This would be difficult with workspaces.
    • If no workspaces, we'd have to look for projects with a terraform backend configured for example.
  3. For each project, display it in the index.html file containing important information. This would require a new endpoint to retrieve the information to display it in the UI.
    • project name (if it exists)
    • directory path
    • terraform version
    • github org / github repo
    • branch (optional)
    • workspace
    • commit hash (optional)
    • last apply
    • any special tags
  4. Allow clicking on the project to go to a new project page. This would be a new endpoint. For high cardinality, we could use a format like /<org>/<repo>/<dir>/<workspace>
  5. Project page
    • could show plan/apply/deploy buttons
    • where deploy is terraform apply -auto-approve
    • click plan to create a job id with a link to the job
    • job can show the plan in real-time (like it does now)
    • plan has to pass in order to apply

Maybe something like this on index.html

2022-11-09_20-22

@dosubot dosubot bot added the Stale label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality/enhancement Stale
Projects
None yet
Development

No branches or pull requests

3 participants