FEAT: Allow making successful run of terraform apply
a statues check on GitHub
#4140
Open
1 task done
Labels
feature
New functionality/enhancement
Community Note
Describe the user story
As a DevOps/platform engineer, I'd like to have a tool that automatically runs
terraform apply
against my PRs. The tool will set a "status check" on the PR that will only be set to "success" whenterraform apply
has been run successfully. Atlantis currently has a similar feature, but it doesn't requireterraform apply
to run before it is set to successful so I find the naming somewhat confusing.Right now I don't see any way to configure Atlantis to require running
terraform apply
before the status check is marked as "successful". That would be really killer functionality that would seemingly allow a lot of really cool workflows.Describe the solution you'd like
This would be especially powerful when combined with the "mergability requirements" feature in github. You could even in theory have a setup where Atlantis changes must be deployed before the PR could be merged.!
I would like to be able to configure Atlantis to require that
terraform apply
has run before a similarly named status check was marked as successful. Right now there is a check called apply but if you look at the code it does not actually require thatterraform apply
has ever run. I suspect its an unused legacy status because of the limited utility. I couldn't imagine depending on it for anything important since it can be marked as a success based on the result ofplan
or even a failure to run plan. This new check should be set from only one place - afterterraform plan
has run. I would possibly rename the old check to something like ur good brah or send it. Then add a new status check called apply.What I think would be useful is this status check would be configured in a way that it's only set to "successful" when Atlantis has run a successful terraform apply. That might confusing so I can elaborate. Running
plan
should not set it to "success". Failing to find any changes should not set it to "success", nor should failing to run any hook, query any data, generate a config file, or any other action or inaction beyond "successful execution ofterraform apply
.Describe the drawbacks of your solution
It does make sending it a bit more gnar (bad gnar not good gnar). Sometimes you'll have to type various commands several times before a PR would be ready for merge. It might slow down some teams' workflows, especially if they heavily depend on optimism as a testing strategy.
Describe alternatives you've considered
I considered naming it really apply, super apply, yes this actually ran your changes, it would be crazy to just skip the apply process entirely and even plan (it would be the ultimate ironic twist).
But ultimately I went with the simple apply. Considering the terraform command is apply, and the altantis command is apply, I think having the new status check named apply would be a good indicator to users that
terraform apply
has run. This would require renaming the old legacy check, but since it can be set to "success" whether an apply has run or not, I think the new one will actually be more useful.The text was updated successfully, but these errors were encountered: