SlideShare a Scribd company logo
Terraform Infrastructure as Code
Best Practices and Common Mistakes
Given by Derek C. Ashmore
DevOps West 2021
June 9, 2021
©2020 Derek C. Ashmore, All Rights Reserved 1
Who am I?
• Professional Geek
since 1987
• AWS since 2010
• Azure since 2017
• Terraform since the
0.5.x days
• Specialties
• Application
Transformation
• Infrastructure
Automation
• Yes – I still code!
©2021 Derek C. Ashmore, All Rights Reserved 2
Discussion Resources
• This slide deck
– https://www.slideshare.net/derekashmore/presentations
• Sample code on my Github
– https://github.com/Derek-Ashmore/
• Slide deck has hyper-links!
– Don’t bother writing down URLs
• Assumptions
– You have used Terraform (at least played with it)
– You know basic functionality
• Keep track of your questions – live Q&A at the end
©2021 Derek C. Ashmore, All Rights Reserved 3
Agenda
Intro and
Level Set
Environment
Management
Modularity
Summary /
Q&A
©2021 Derek C. Ashmore, All Rights Reserved 4
Terraform Terminology
• Configuration vs Module
– Terraform Module designed for
reuse
– Terraform configuration is the
outer layer
• TFVars files
– Provides variable input for an
environment
• Like properties file
– Used with the –var-file
option
©2021 Derek C. Ashmore, All Rights Reserved
• Resources
– Controls a cloud asset
• Data lookup
– Searches for cloud assets
• Variables
– Different values per context
• Function and Expressions
– Built-ins that
gather/manipulate values
How Terraform Works
• Terraform is
“Declarative”
– Like SQL
• Reads all files with
extension .tf
– Figures out execution
order
• Supports variables and
functions
• Plugin architecture
– Supports many clouds
and products
©2021 Derek C. Ashmore, All Rights Reserved
Agenda
Intro and
Level Set
Environment
Management
Modularity
Summary /
Q&A
©2021 Derek C. Ashmore, All Rights Reserved 7
Project Structure
• Separate Configurations
from Modules
– Documents what’s
designed for reuse and
what is not
• TFVars files provide
environment specifics
– All environments use the
same automation
– Easy to add
environments
– Different back-end state
per environment
©2021 Derek C. Ashmore, All Rights Reserved
Project Structure Anti-Pattern
• Separate configurations per
environment
• The good
– Code is often simpler
– Easier to add/subtract
capabilities per environment
– Separate state if using local
file system default
• The bad
– Has code duplication
– Harder to establish new
environments
– Environments can be
inconsistent
• Works in dev, but not prod
©2021 Derek C. Ashmore, All Rights Reserved
Making Environment Differences Configurable
• Use Conditionals
– No “If-Then”
capability
– Boolean indicators
• Resources using
count
• Dynamic blocks
©2021 Derek C. Ashmore, All Rights Reserved
Optional configuration through ‘try’
• Use for complex
inputs with optional
fields
• Try suppresses
exceptions
• Specify Terraform
defaults with null
©2021 Derek C. Ashmore, All Rights Reserved
Environment Management Best Practices
• Always run Terraform through tooling, not on your desktop
– CI/CD Tools such as Jenkins or Terraform Cloud
– Benefits
• Audit history
• Terraform and provider version control
• Consistent runtime environment
• Always require a plan before the apply
– Require approval step before going on to the apply
• Utilize cloud security constructs
– AWS IAM instance roles for Jenkins agents
– Azure Managed Identities for Jenkins or Azure DevOps agents
• Always use back-end state
©2021 Derek C. Ashmore, All Rights Reserved
Agenda
Intro and
Level Set
Environment
Management
Modularity
Summary /
Q&A
©2021 Derek C. Ashmore, All Rights Reserved 13
Terraform Usage Evolution
• In the beginning
– Use Source Control
– Use Back-end state
• As #Coders grows
– Feature branches
– CI/CD Pipelines
• As #Configurations grows
– Separate repo for modules
• Or Terraform registry
– Implement versioning
• Never use main/master!
• Further reading
©2021 Derek C. Ashmore, All Rights Reserved
Feature Branching
• DevOps Team Discipline is Key
• Feature Branches
– Never edit main/master directly!
– Update using Pull Requests
• Should live less than one day!
– Single targeted enhancement
– One developer only
– Long-lived branches prone to merge
conflicts
– Prefer rebase to merge
• Further reading
©2021 Derek C. Ashmore, All Rights Reserved
CI/CD Pipelines
• Provides consistent runtime
environment
– Terraform version
– Cloud security policy
• Audit history / Admin security
• Pipeline approvals
– Force Plan execution
– Force manual approval before
apply or destroy
– Automatic “Apply” nullifies benefit
of doing the plan
©2021 Derek C. Ashmore, All Rights Reserved
Modularity Anti-Patterns
• All of these examples come from
the field
– Module creation before it’s
needed
– Modules that only contain one
resource
– Inappropriate Data lookups in
modules
– Undocumented modules
– Use modules referencing
main/master
©2021 Derek C. Ashmore, All Rights Reserved
Module creation before it’s needed
• Should have at least two
consumers before module is
created
• Classic YAGNI
• Hard to track down consumers
after release
• Impossible to remove unused
modules
©2021 Derek C. Ashmore, All Rights Reserved
Modules that only contain one resource
• Amounts to a thin proxy
– No value-add
• Unnecessary complexity
• Not as well documented as the
underlying Terraform resource
• Every module should have at
least two resources!
©2021 Derek C. Ashmore, All Rights Reserved
Inappropriate Data lookups in modules
• Data lookups fail if
nothing is found
– Error if the consumer
configuration creates
the resource
• Makes assumptions
about execution
context
• Data lookups belong in
configurations, not
modules, as they do
know context
©2021 Derek C. Ashmore, All Rights Reserved
Undocumented Modules
• Force consumers to
read/understand module code
– Costs them time
• Makes it hard to use
• All modules should have a
README.md:
– Example module call
– Release Notes
– Variable list
– Output list
©2021 Derek C. Ashmore, All Rights Reserved
Use modules referencing main/master
• Always consume referencing
specific versions
– Version upgrades are planned
work
• Source code
©2021 Derek C. Ashmore, All Rights Reserved
• Recipe for unplanned work
– Consumers can break
unexpectedly when modules
change
• Always version modules
Agenda
Intro and
Level Set
Environment
Management
Modularity
Summary /
Q&A
©2021 Derek C. Ashmore, All Rights Reserved 23
Secrets Handling
• Secrets include
– Credentials (account/password)
– SSL Certificates
– SSH Keys
• Manage secrets separately
– Digital Vault
• Terraform looks the secret up
– CI/CD Pipeline “Secret” variable
• Anti-pattern: Terraform generating
password
– Easy to get out of sync with reality
– Secrets have different life-cycle
©2021 Derek C. Ashmore, All Rights Reserved
Simplicity is Key
• Eliminate unused variables
– Always remove dead code
• Don’t replicate derived values
– Derive once in locals and use
• Variable defaults
– Inappropriate defaults common
• Environment-specific names
• Globally unique names
©2021 Derek C. Ashmore, All Rights Reserved
Avoid the Hammer and Nail Problem
• Terraform is good for:
– Creating cloud assets
– Changing attributes on cloud
assets
©2021 Derek C. Ashmore, All Rights Reserved
• Terraform is not good for:
– Maintaining content on cloud
assets
• VM configuration management
– Use Ansible, Chef, etc.
• Image pipelines
– Use Packer
– Don’t “remote control”
• Use Terraform to execute Ansible
or Packer
Session Summary
• How to structure projects
• Manage environments using
tfvars
– Not configurations
• How to make resources
optional
• Use CI/CD tooling
• Appropriate uses for Terraform
©2021 Derek C. Ashmore, All Rights Reserved
• Module Anti-Patterns
– Module creation before it’s
needed
– Modules that only contain one
resource
– Inappropriate Data lookups in
modules
– Undocumented modules
– Use modules referencing
main/master
Thank you!
• Derek Ashmore:
– Blog: www.derekashmore.com
– LinkedIn: www.linkedin.com/in/derekashmore
• Connect Invites from attendees welcome
– Twitter: https://twitter.com/Derek_Ashmore
– GitHub: https://github.com/Derek-Ashmore
– Book: http://dvtpress.com/
• Please fill out the survey form!
• Click the “Subsessions” tab for live Q&A
©2021 Derek C. Ashmore, All Rights Reserved 28

More Related Content

PDF
Implementing DevOps Automation: Best Practices & Common Mistakes - DevOps Eas...
PDF
AWS Lambda: Best Practices and Common Mistakes - Chicago Cloud Conference 2020
PDF
Microservices with Terraform, Docker and the Cloud. JavaOne 2017 2017-10-02
PDF
Writing microservices in java java one-2015-10-28
PDF
Refactoring Into Microservices. Chicago Coders Conference 2017-06-26
PDF
Microservices for java architects schamburg-2015-05-19
PDF
Microservices for java architects it-symposium-2015-09-15
PDF
Writing microservices in Java -- Chicago-2015-11-10
Implementing DevOps Automation: Best Practices & Common Mistakes - DevOps Eas...
AWS Lambda: Best Practices and Common Mistakes - Chicago Cloud Conference 2020
Microservices with Terraform, Docker and the Cloud. JavaOne 2017 2017-10-02
Writing microservices in java java one-2015-10-28
Refactoring Into Microservices. Chicago Coders Conference 2017-06-26
Microservices for java architects schamburg-2015-05-19
Microservices for java architects it-symposium-2015-09-15
Writing microservices in Java -- Chicago-2015-11-10

What's hot (20)

PDF
Flintstones or Jetsons? Jump Start Your Virtual Test Lab
PPTX
Delivering Mobile Apps That Perform
PPTX
Monitoring Cloud/Virtual/Physical IT Infrastructures
PPTX
Managing and Monitoring Virtual/Cloud/Physical Infrastructures
PDF
[India Merge World Tour] Electric Cloud
PPSX
Yeoman - Santa Barbara JavaScript Meetup
PPTX
BOSE - Josh Steckler - Automating Automation: Build environments, on-demand
PDF
Calculating the Savings of Moving Your Drupal Site to the Cloud
PPTX
Building azure applications ireland
PDF
be the captain of your connections deployment
PDF
Automatic Undo for Cloud Management via AI Planning
PPTX
Embracing Failure - Fault Injection and Service Resilience at Netflix
PDF
Java Application Servers Are Dead!
PPTX
Sam Fell - Electric Cloud - Faster Continuous Integration with ElectricAccele...
PPTX
Extending Availability to the Cloud
PDF
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
PDF
v10 of Backup & Replication: a sneak peek
PDF
Software Architecture
PPTX
Lucas Gravley - HP - Self-Healing And Monitoring in a DevOps world
PPTX
DevOps in Silos
Flintstones or Jetsons? Jump Start Your Virtual Test Lab
Delivering Mobile Apps That Perform
Monitoring Cloud/Virtual/Physical IT Infrastructures
Managing and Monitoring Virtual/Cloud/Physical Infrastructures
[India Merge World Tour] Electric Cloud
Yeoman - Santa Barbara JavaScript Meetup
BOSE - Josh Steckler - Automating Automation: Build environments, on-demand
Calculating the Savings of Moving Your Drupal Site to the Cloud
Building azure applications ireland
be the captain of your connections deployment
Automatic Undo for Cloud Management via AI Planning
Embracing Failure - Fault Injection and Service Resilience at Netflix
Java Application Servers Are Dead!
Sam Fell - Electric Cloud - Faster Continuous Integration with ElectricAccele...
Extending Availability to the Cloud
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
v10 of Backup & Replication: a sneak peek
Software Architecture
Lucas Gravley - HP - Self-Healing And Monitoring in a DevOps world
DevOps in Silos
Ad

Similar to Terraform best-practices-and-common-mistakes-dev ops-west-2021 (20)

PDF
Microservices with Terraform, Docker and the Cloud. Chicago Coders Conference...
PDF
Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018
PDF
Microservices with Terraform, Docker and the Cloud. IJug Chicago 2017-06-06
PDF
Implementing DevOps Automation Best Practices and Common Mistakes
PDF
Managing AWS Using Terraform AWS Chicago-Suburbs 2018-01-18
PDF
Tactics for Testing DevOps Infrastructure Code
PDF
Managing AWS Using Terraform AWS Atlanta 2018-07-18
PDF
Refactoring Into Microservices 2016-11-08
PDF
Refactoring Into Microservices 2016-11-06
PDF
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
PDF
Platform Engineering for the Modern Oracle World
PDF
APIsecure 2023 - How to abuse Terraform to elevate access, Mike McCabe
PDF
Docker in the Enterprise
PDF
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
PDF
Microservices for architects los angeles-2016-07-16
PDF
Database Provisioning in EM12c: Provision me a Database Now!
PDF
Testing Infrastructure Code Best Practices and Common Mistakes
PPTX
NGENSTOR_ODA_P2V_V5
PPTX
Cloud Design Patterns - Hong Kong Codeaholics
PDF
AWS Lambda: Best Practices and Common Mistakes - Dev Ops West 2019
Microservices with Terraform, Docker and the Cloud. Chicago Coders Conference...
Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018
Microservices with Terraform, Docker and the Cloud. IJug Chicago 2017-06-06
Implementing DevOps Automation Best Practices and Common Mistakes
Managing AWS Using Terraform AWS Chicago-Suburbs 2018-01-18
Tactics for Testing DevOps Infrastructure Code
Managing AWS Using Terraform AWS Atlanta 2018-07-18
Refactoring Into Microservices 2016-11-08
Refactoring Into Microservices 2016-11-06
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Platform Engineering for the Modern Oracle World
APIsecure 2023 - How to abuse Terraform to elevate access, Mike McCabe
Docker in the Enterprise
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
Microservices for architects los angeles-2016-07-16
Database Provisioning in EM12c: Provision me a Database Now!
Testing Infrastructure Code Best Practices and Common Mistakes
NGENSTOR_ODA_P2V_V5
Cloud Design Patterns - Hong Kong Codeaholics
AWS Lambda: Best Practices and Common Mistakes - Dev Ops West 2019
Ad

Recently uploaded (20)

PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
AI in Product Development-omnex systems
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
top salesforce developer skills in 2025.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
2025 Textile ERP Trends: SAP, Odoo & Oracle
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
AI in Product Development-omnex systems
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Design an Analysis of Algorithms I-SECS-1021-03
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Operating system designcfffgfgggggggvggggggggg
Upgrade and Innovation Strategies for SAP ERP Customers
Odoo POS Development Services by CandidRoot Solutions
top salesforce developer skills in 2025.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Odoo Companies in India – Driving Business Transformation.pdf
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Reimagine Home Health with the Power of Agentic AI​
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Softaken Excel to vCard Converter Software.pdf
wealthsignaloriginal-com-DS-text-... (1).pdf
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...

Terraform best-practices-and-common-mistakes-dev ops-west-2021

  • 1. Terraform Infrastructure as Code Best Practices and Common Mistakes Given by Derek C. Ashmore DevOps West 2021 June 9, 2021 ©2020 Derek C. Ashmore, All Rights Reserved 1
  • 2. Who am I? • Professional Geek since 1987 • AWS since 2010 • Azure since 2017 • Terraform since the 0.5.x days • Specialties • Application Transformation • Infrastructure Automation • Yes – I still code! ©2021 Derek C. Ashmore, All Rights Reserved 2
  • 3. Discussion Resources • This slide deck – https://www.slideshare.net/derekashmore/presentations • Sample code on my Github – https://github.com/Derek-Ashmore/ • Slide deck has hyper-links! – Don’t bother writing down URLs • Assumptions – You have used Terraform (at least played with it) – You know basic functionality • Keep track of your questions – live Q&A at the end ©2021 Derek C. Ashmore, All Rights Reserved 3
  • 4. Agenda Intro and Level Set Environment Management Modularity Summary / Q&A ©2021 Derek C. Ashmore, All Rights Reserved 4
  • 5. Terraform Terminology • Configuration vs Module – Terraform Module designed for reuse – Terraform configuration is the outer layer • TFVars files – Provides variable input for an environment • Like properties file – Used with the –var-file option ©2021 Derek C. Ashmore, All Rights Reserved • Resources – Controls a cloud asset • Data lookup – Searches for cloud assets • Variables – Different values per context • Function and Expressions – Built-ins that gather/manipulate values
  • 6. How Terraform Works • Terraform is “Declarative” – Like SQL • Reads all files with extension .tf – Figures out execution order • Supports variables and functions • Plugin architecture – Supports many clouds and products ©2021 Derek C. Ashmore, All Rights Reserved
  • 7. Agenda Intro and Level Set Environment Management Modularity Summary / Q&A ©2021 Derek C. Ashmore, All Rights Reserved 7
  • 8. Project Structure • Separate Configurations from Modules – Documents what’s designed for reuse and what is not • TFVars files provide environment specifics – All environments use the same automation – Easy to add environments – Different back-end state per environment ©2021 Derek C. Ashmore, All Rights Reserved
  • 9. Project Structure Anti-Pattern • Separate configurations per environment • The good – Code is often simpler – Easier to add/subtract capabilities per environment – Separate state if using local file system default • The bad – Has code duplication – Harder to establish new environments – Environments can be inconsistent • Works in dev, but not prod ©2021 Derek C. Ashmore, All Rights Reserved
  • 10. Making Environment Differences Configurable • Use Conditionals – No “If-Then” capability – Boolean indicators • Resources using count • Dynamic blocks ©2021 Derek C. Ashmore, All Rights Reserved
  • 11. Optional configuration through ‘try’ • Use for complex inputs with optional fields • Try suppresses exceptions • Specify Terraform defaults with null ©2021 Derek C. Ashmore, All Rights Reserved
  • 12. Environment Management Best Practices • Always run Terraform through tooling, not on your desktop – CI/CD Tools such as Jenkins or Terraform Cloud – Benefits • Audit history • Terraform and provider version control • Consistent runtime environment • Always require a plan before the apply – Require approval step before going on to the apply • Utilize cloud security constructs – AWS IAM instance roles for Jenkins agents – Azure Managed Identities for Jenkins or Azure DevOps agents • Always use back-end state ©2021 Derek C. Ashmore, All Rights Reserved
  • 13. Agenda Intro and Level Set Environment Management Modularity Summary / Q&A ©2021 Derek C. Ashmore, All Rights Reserved 13
  • 14. Terraform Usage Evolution • In the beginning – Use Source Control – Use Back-end state • As #Coders grows – Feature branches – CI/CD Pipelines • As #Configurations grows – Separate repo for modules • Or Terraform registry – Implement versioning • Never use main/master! • Further reading ©2021 Derek C. Ashmore, All Rights Reserved
  • 15. Feature Branching • DevOps Team Discipline is Key • Feature Branches – Never edit main/master directly! – Update using Pull Requests • Should live less than one day! – Single targeted enhancement – One developer only – Long-lived branches prone to merge conflicts – Prefer rebase to merge • Further reading ©2021 Derek C. Ashmore, All Rights Reserved
  • 16. CI/CD Pipelines • Provides consistent runtime environment – Terraform version – Cloud security policy • Audit history / Admin security • Pipeline approvals – Force Plan execution – Force manual approval before apply or destroy – Automatic “Apply” nullifies benefit of doing the plan ©2021 Derek C. Ashmore, All Rights Reserved
  • 17. Modularity Anti-Patterns • All of these examples come from the field – Module creation before it’s needed – Modules that only contain one resource – Inappropriate Data lookups in modules – Undocumented modules – Use modules referencing main/master ©2021 Derek C. Ashmore, All Rights Reserved
  • 18. Module creation before it’s needed • Should have at least two consumers before module is created • Classic YAGNI • Hard to track down consumers after release • Impossible to remove unused modules ©2021 Derek C. Ashmore, All Rights Reserved
  • 19. Modules that only contain one resource • Amounts to a thin proxy – No value-add • Unnecessary complexity • Not as well documented as the underlying Terraform resource • Every module should have at least two resources! ©2021 Derek C. Ashmore, All Rights Reserved
  • 20. Inappropriate Data lookups in modules • Data lookups fail if nothing is found – Error if the consumer configuration creates the resource • Makes assumptions about execution context • Data lookups belong in configurations, not modules, as they do know context ©2021 Derek C. Ashmore, All Rights Reserved
  • 21. Undocumented Modules • Force consumers to read/understand module code – Costs them time • Makes it hard to use • All modules should have a README.md: – Example module call – Release Notes – Variable list – Output list ©2021 Derek C. Ashmore, All Rights Reserved
  • 22. Use modules referencing main/master • Always consume referencing specific versions – Version upgrades are planned work • Source code ©2021 Derek C. Ashmore, All Rights Reserved • Recipe for unplanned work – Consumers can break unexpectedly when modules change • Always version modules
  • 23. Agenda Intro and Level Set Environment Management Modularity Summary / Q&A ©2021 Derek C. Ashmore, All Rights Reserved 23
  • 24. Secrets Handling • Secrets include – Credentials (account/password) – SSL Certificates – SSH Keys • Manage secrets separately – Digital Vault • Terraform looks the secret up – CI/CD Pipeline “Secret” variable • Anti-pattern: Terraform generating password – Easy to get out of sync with reality – Secrets have different life-cycle ©2021 Derek C. Ashmore, All Rights Reserved
  • 25. Simplicity is Key • Eliminate unused variables – Always remove dead code • Don’t replicate derived values – Derive once in locals and use • Variable defaults – Inappropriate defaults common • Environment-specific names • Globally unique names ©2021 Derek C. Ashmore, All Rights Reserved
  • 26. Avoid the Hammer and Nail Problem • Terraform is good for: – Creating cloud assets – Changing attributes on cloud assets ©2021 Derek C. Ashmore, All Rights Reserved • Terraform is not good for: – Maintaining content on cloud assets • VM configuration management – Use Ansible, Chef, etc. • Image pipelines – Use Packer – Don’t “remote control” • Use Terraform to execute Ansible or Packer
  • 27. Session Summary • How to structure projects • Manage environments using tfvars – Not configurations • How to make resources optional • Use CI/CD tooling • Appropriate uses for Terraform ©2021 Derek C. Ashmore, All Rights Reserved • Module Anti-Patterns – Module creation before it’s needed – Modules that only contain one resource – Inappropriate Data lookups in modules – Undocumented modules – Use modules referencing main/master
  • 28. Thank you! • Derek Ashmore: – Blog: www.derekashmore.com – LinkedIn: www.linkedin.com/in/derekashmore • Connect Invites from attendees welcome – Twitter: https://twitter.com/Derek_Ashmore – GitHub: https://github.com/Derek-Ashmore – Book: http://dvtpress.com/ • Please fill out the survey form! • Click the “Subsessions” tab for live Q&A ©2021 Derek C. Ashmore, All Rights Reserved 28