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

Atlantis plan via curl #1263

Closed
ginski47 opened this issue Nov 17, 2020 · 2 comments
Closed

Atlantis plan via curl #1263

ginski47 opened this issue Nov 17, 2020 · 2 comments
Labels
question Further information is requested

Comments

@ginski47
Copy link

Hello,

How would we do an atlantis plan through curl?

Also, we need to extract the atlantis plan command from the gitlab http request? Could you kindly tell us what field in the body we need to look for - that would be great.

I also created this duplicate issue terraform-aws-modules/terraform-aws-atlantis#165 but i guess it can be ignored depending on who answers me first :)

@acastle
Copy link
Contributor

acastle commented Dec 2, 2020

Atlantis does not expose a direct RPC API where you could have it execute a plan directly via curl. Instead, Atlantis reacts to webhook events from the various version control systems it supports. Those events are posted to the /events path where they are then parsed into the appropriate commands on the server side.

You could mimic a gitlab "atlantis plan" comment through curl but I am not sure that quite gets what you are after as the result will still be posted as a comment to your merge request. The specific structure for these requests can be seen here: https://github.com/xanzy/go-gitlab/blob/49181212cbaa23be36579a67a838e1ddce3684af/event_webhook_types.go#L311

@acastle acastle added the question Further information is requested label Dec 4, 2020
@nitrocode
Copy link
Member

There are now /plan and /apply endpoints. See pr #997.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants