8. Terraform — is a universal tool to manage
anything that has an API
GSuite
Dropbox files and access
New Relic metrics
Datadog users and metrics
Bugs in Jira
All Terraform providers
42. How to use Terraform modules
Many resources, many modules
How to organize and use them?
How to orchestrate them?
43. All in one
Good:
Declare variables and outputs in
fewer places
Bad:
Large blast radius
Everything is blocked at once
Not possible to specify dependenies
between modules (depends_on)
57. before_hook + shell-script
See this: https://github.com/antonbabenko/modules.tf-lambda/blob/master/
templates/terragrunt-common-layer/template/common/scripts/
update_dynamic_values_in_tfvars.sh
Or try it yourself by using cloudcraft.co
58. Edge cases
Different AWS regions (S3 signature, EC2 ClassicLink, IPv6)
Age of AWS accounts
Limits in AWS
59. Avoid in Terraform
Non-sensitive arguments in CLI. Put them in tfvars file.
• -target
• -parallelism
Terraform workspaces => Separate directory
Dependency hell in modules
66. cloudcraft.co features
Manage AWS components in browser (EC2 instances, autoscaling groups, RDS,
etc)
Connect components
Import live AWS infrastructure
Calculate the budget
Share link to a blueprint
Export as image
Embed drawing to wiki, Confluence, etc
70. ✓ cloudcraft.co — design, plan and visualize
✓ terraform-aws-modules — building blocks of AWS infrastructure
✓ Terraform — infrastructure as code
71. modules.tf notes
✓ Available for all users: https://cloudcraft.co/
✓ Generates potentially ready-to-use Terraform configurations
✓ Suits best for bootstrapping
✓ Enforces Terraform best practices
✓ Batteries included (terraform-aws-modules, terragrunt, pre-commit, …)
✓ 100% free for all & open-source (https://github.com/antonbabenko/
modules.tf-lambda )
✓ Want to sponsor, or a sticker? Contact me.