I have a repo with atlantis integration. This repo houses many stacks that use the same modules, each stack in its own folder and with distinct tfvars.
I generate new stacks using some automation, which generates the new directories, copies a bunch of *.tf files and sets the tfvars with the correct values. Unfortunately, this integration is brittle as I have no tests that can fail PRs when something changes in the module and is not updated in the template files.
What I want is an integration test which creates a test stack, gets it planned by atlantis, fails if the plan fails, and otherwise passes.
Is this achievable?
It doesn't sound like this problem needs to be solved by atlantis. Atlantis is more of a tool for humans.
Try this using a pipelime such as a github action workflow
examples/complete
root module/stackterratest
or similar that will runterraform
init/apply/destroySee how the cloudposse github org uses this method to verify that their code is tested.