Use atlantis as a github action #2994
Replies: 4 comments 12 replies
-
How would it work? We cannot host the server ourselves. We would need perhaps a local subcommand to run workflows using repo atlantis.yaml file. See issue #671. You may be interested in using github actions natively instead. See this project https://github.com/dflook/terraform-github-actions |
Beta Was this translation helpful? Give feedback.
-
I'm guessing your design is assuming self hosted runners? where there is
more control. of the cache storage?
…On Tue, Jan 17, 2023, 9:27 p.m. Kishan B ***@***.***> wrote:
In my mind, atlantis holds it state in its backend which is currently
either boltdb or redis. If we separate backend, then atlantis is a
stateless component at a high level. Github actions are great for stateless
things, in my mind github actions are like AWS Lambdas as they have the
same execution flow which is
Trigger --> Perform tasks --> Terminate
For atlantis, the triggers are people typing terraform commands in their
PR. Tasks are functionalities offered by atlantis(locking etc).
Given the ephermeral nature of this execution model, the current backends
are not ideal (boltdb data will get purged as Github CI agent terminates,
running redis involves runtime cost and maintenance overheads)
Hence i recommend adding github actions cache
<https://github.com/actions/cache> as a new backend to store state.
@nitrocode <https://github.com/nitrocode> Also thanks a lot for
recommending terraform-github-actions
<https://github.com/dflook/terraform-github-actions> never knew that
existed before your comment. Will give that a spin :-)
—
Reply to this email directly, view it on GitHub
<#2994 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3ERFBKBQDDAYXOZJIBWTWS55L3ANCNFSM6AAAAAAT55RVHQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
@nitrocode @jamengual After giving it a more thought, i think the flexibility of the backend interface will be a huge advantage as people would be able to plug and play the desired backend as a parameter/input to the github action. The backend can be anything like Github Cache, Dynamodb Table (For AWS users), Cockroach DB etc which would be plugged in to to the github action as a parameter/input/env secret |
Beta Was this translation helpful? Give feedback.
-
Hi all, I've put something together as a PoC in https://github.com/danielgblanco/atlantis-gha-poc There are some caveats to the approach, but hopefully that shows a way forward. Being able to forward GH events as a command, rather than having to start server and wait for it to complete, would make things simpler! Using an external Redis instance to manage locking is definitely an enabler for this sort of feature :) |
Beta Was this translation helpful? Give feedback.
-
Problem
From a setup point of view atlantis requires an installation and maintenance of a server. I think there should be avenues that is explored to remove this overhead.
Proposed solution
This is very specific to github, i assume there must be similar things for other CI servers.
Beta Was this translation helpful? Give feedback.
All reactions