CloudCast: Mastering Terraform Naming Conventions & Essential Reads for DevOps

CloudCast: Mastering Terraform Naming Conventions & Essential Reads for DevOps

???? Hey DevOps folks!

Today I want to talk about the importance of naming conventions in Terraform. It’s not just about style — good names make life easier, improve readability, and help avoid issues when scaling infrastructure.

Here are my key recommendations:

  1. Use underscores to separate words instead of hyphens.
  2. Stick to lowercase letters and numbers only.
  3. Always use singular nouns for naming resources.
  4. Avoid repeating the resource type in the resource name (either partially or fully). Instead of: resource "aws_route_table" "private-aws-route-table" {} Use: resource "aws_route_table" "private" {}
  5. If you can’t come up with a descriptive name, use this or main as a fallback.
  6. Make sure resource names are logical and meaningful.
  7. Output names should describe the attribute they hold. The best structure for this is: {name}_{type}_{attribute}.

By following these simple rules, you’ll avoid many potential problems and speed up your infrastructure workflows.

?? Interesting Articles of the Week:

?? By the way, I once shared insights on Using CAF Terraform for Azure Landing Zones — check out the video here.

?? That’s all for this week! I hope these resources help you deepen your Terraform knowledge and optimize your workflows. Got questions or feedback? Feel free to reach out!

—

Until next week!

Roman, Cloud Architect | Co-Founder & CTO at Gart Solutions

Specializing in DevOps & Cloud Solutions

Natali Trubnikova

Co-founder & Marketing Consultant at Go Global - your guide to international markets | CMO at Gart Solutions - helping companies focus on business, not IT challenges | ????

6 个月

Thanks!)

要查看或添加评论,请登录

Roman B.的更多文章

社区洞察

其他会员也浏览了