Hey folks,
Hope you all doing well, wondering your thoughts while placing atlantis on multi-account aws architecture, maybe you can guide me to identify pros,cons and answer my questions.
Cautions:
• We have shared-services accounts named as prod-shared-infrastructure and non-prod-shared-infrastructure
◦ Both used services like common ci/cd services like ecr, upstream eks cluster and other dependencies etc.
◦ Isolated prod and non-prod in different accounts.
• Using terragrunt to provision these environments.
• I will share 2 screenshot related with repository architecture which is the root level folder structure of the repository and you will find some of them divided into folders which corresponds to environments and in other screenshot is related with the atlantis aws account placement
As a general rule of thumb, we use platformtest account approach that infrastructure developers can work, break, crash do whatever they want,
so here since we have 2 accounts for prod and non-prod environments, we place platformtest environment into non-prod account(co-existing with dev,test resources in the same account). And as you can see the platform folder in the screenshot which belong to this platformtest environment resources(it includes terragrunt file which calls terraform modules). Now, my tests are completed to have a stable up and running atlantis instance however I have thoughts on placing it into different accounts(running in eks cluster).
So now I'm sharing second screen shot.
Questions:
• At the and of the day, I will need 1 atlantis instance for platformtest purposes and 1 for running workflows in workload accounts that's for sure.
◦ Should I deploy different atlantis instances for prod and non-prod environments(don't include platformtest)
◦ What are your thoughts?
• Even I go with 1 atlantis instance or 2 atlantis instance, since I have platformtest environment, I have to figure out how to configure atlantis instance for specific folder paths ? like if some change happened under platform folder which corresponds to platformtest environment that infrastructure developer use, then platformtest atlantis instance should react and if it is a change in other folders(dev,prod,test etc.) then it should be the other atlantis instance, how can I succeed this ?
• is there a configuration that atlantis triggers to specific branches, i.g: trigger atlantis only branch startswith feature/* etc.?
• What would be the best practices you are going to suggest, if there's a link that you can guide me that works fine as well!