One of the most common situations we see when architecting and implementing SaaS solutions on AWS is a lack of automated testing on the infrastructure side.
At nClouds, we help SaaS businesses build robust infrastructure solutions in an automated way, and I’ll describe in this post how you can do the same. We believe that infrastructure should be treated the same as your code so that your DevOps teams can push changes faster and with more confidence using a continuous integration/continuous delivery (CI/CD) workflow.
There are many tools and solutions that you can choose to build and manage your SaaS infrastructure. We have deep experience in modern tools such as:
All of these tools are powerful, enable you to write reusable code, have a broad range of providers for most use cases, and an extensive ecosystem of tools around them to improve core functionality in terms of testing, validation, and security. In this blog, I’ll focus on how we use Terraform to automate testing and deployment for our customers’ SaaS infrastructures.
CI allows us to build and test the Terraform code used by a SaaS infrastructure automatically at each commit to be confident that we aren’t breaking things or introducing new bugs with the new changes to code. Automated testing validates the quality and functionality of the code. It also tests the security implications of our changes.
Here are some of the Terraform tools that we typically use:
For full acceptance testing, we use such tools as:
With such testing in place, we can automate CI for our SaaS customers’ infrastructures, similar to how we automate a microservices workflow.
CD for your infrastructure is much like CD for your application code. Once the Terraform code has passed all the tests outlined above, we can deploy it automatically (though we may only deploy it in a staging environment until we gain sufficient confidence and trust in our solution). In our Terraform workflow, we use:
Implementing CI/CD to automate the testing and deployment of your SaaS infrastructure will bring improved speed and reliability to your workflow. I’ve outlined in this post some of the tools we are using for a Terraform-based solution. We have implemented similar solutions using CloudFormation, AWS CDK, Pulumi, Chef, Puppet, and Red Hat Ansible.
Reach out to us if we can help you implement a CI/CD pipeline for your SaaS solution on AWS. The nClouds team is here to help with that and all your AWS infrastructure requirements.