images | ||
terraform | ||
.gitignore | ||
LICENSE | ||
README.md |
tf-cf-aws-3tier-dev (WIP NOT COMPLETE)
Abstract
In this project we attempt to automate infrastructure provisioning in Amazon Web Services. The infrastructure includes the services essential for a customer managed three-tier-app. An attempt is made to convert as many services or resources into Terraform plans as possible. The project is intended as a MVP and to be tested in a non-production AWS account.
Architecture
Requirements
The author(s) assumes the reader has access to Amazon Web Services with sufficient IAM permissions. Access to provisioned GNU+Linux compute requires a personal SSH key. Access to Windows Server compute requires a local or domain account.
IaC
Experience handling infrastructure as code and Terraform is very helpful as well. Consider reading Terraform Up and Running for the fundamentals.
Tooling
Terraform >= 1.4.XYZ
- Provider:
hashicorp/aws >= v5.3.0
Usage
- Install requirements
- Configure AWS Account Credentials
- Clone repository
- Generate a
.tfvars
file using the templatetfvars.skel
terraform init
terraform plan
terraform apply
- Confirm SSH and RDP access is available
- Apply desired application tests
DO NOT STORE SSH KEYS, API KEYS, OR TERRAFORM STATE FILES REMOTELY. PLEASE KEEP THEM SECURE ON YOUR LOCAL MACHINE
Testing and Debugging
Terraform provides simple linting and validation functionality. Keep in mind validation or linting does not guarantee a successful deployment.
Terraform
Quickly check your plans: terraform fmt && terraform validate
Bugs
The current IaC implementation will fail to provision. There improvements in use of the for_each
meta-argument to be made. Lastly, the implementation is not resilient to failures and requires an overhaul. Future plans will consider serverless and auto-scaling cloud services to bolster resiliency.
Attribution
- Terraform AWS VPC Module
- Terraform AWS SG Module
- Terraform AWS EC2 Module
- Terraform AWS ALB Module
- Terraform AWS RDS Module
Warning
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
TL;DR: Not my problem
License
The GPL V2
license applies to this project. All copyrights belong to their respective copyright holders and all trademarks belong to their trademark holders.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.)