Terraform and AWS resource naming should follow a company standard. Each company has different requirements and the standard should be adjusted.
Best Practice: Terraform Naming Patterns: Name each Terraform variable following a pattern of elements that indicate all the information.
Follow this pattern. Use lowercase and underscores as a separator.
instances_to_db_port
explains the intended usage of the rule. In this case, it is a rule to allow access from the EC2 instances to the RDS Database port.Examples:
The name of each resource should follow a pattern. Use lowercase and a dash as a separator.
Example:
name =”ditwl-sn-za-pro-pub-32″
Using a consistent pattern allows the name to include all the needed information to understand its purpose making the description almost unnecessary.
IT Wonder Lab tutorials are based on the diverse experience of Javier Ruiz, who founded and bootstrapped a SaaS company in the energy sector. His company, later acquired by a NASDAQ traded company, managed over €2 billion per year of electricity for prominent energy producers across Europe and America. Javier has over 25 years of experience in building and managing IT companies, developing cloud infrastructure, leading cross-functional teams, and transitioning his own company from on-premises, consulting, and custom software development to a successful SaaS model that scaled globally.
Are you looking for cloud automation best practices tailored to your company?