XPDays 2017 Building with Terraform code samples
The presentation could be found here: https://docs.google.com/presentation/d/1ZYWxuzoPwWyzmrM-GJvCnP8DurLZqGRLg-xYMHO4JIw/edit?usp=sharing
Sample1. Creating Ubuntu instance using one file
- Init the Terrarorm
- Starting our first instance
- Terraform produce the state file terraform.tfstate
Sample2. Creating ubuntu instance using set of files
- AMI selection moved to separate ami.tf
- Instance settings parametized by terraform variables
- Created variable files: terraform.tfvars, variables.tf
- Example for list element selection in vpc_security_group_ids
- Example for map element lookup in instance_type
- Add metadata variable count
Sample3. Deploy a sample application, using RDS
- Build custom image using packer. Build/redeploy workflow
- Deploy a sample application using user_data
- Create RDS MySQL database, pass db endpoint to application
- Adding outputs
Sample4. Using funtions and count hints
- Moving deployment script into temlplate provider
- Using length() function to get size and create multiple resources
Sample5. Scaling our applications, adding scaling policies
- Add IAM profile for instance
- Creating launch configuration, autoscaling grops
- Building module
- Dealing with LoadBalancers and http
AppendixA. Upgrading applications environment
- Blue/Green deployment
- Cannary upgrade