Name conversion – tf and py files #269
Tian-2017
started this conversation in
Firebreak April 24
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
🌵What is the problem or issue we're trying to address?
We have use kebab case or other case in our tf code.
Sometimes 1) Terraform: we use
lower
function to switch it to lower case, which confuses people sometimes. 2) Python: I've seenfilename = re.sub('[^a-zA-Z0-9]+', '-', filename).lower()
They are not necessary from my view.
🎯How is this affecting producers, consumers or platform engineers?
We'd better adhere to consistent naming conventions, which make the code easier to understand and sometimes simplify the code.
Resource names, module names, and the names of the module's folders are all recommended to use snake case. Python files should follow the PEP 8 standard, which is widely used by linters/industry.
street-systems-api-ingestion -> street_systems_api_ingestion
Prod -> prod
The Style guide for Terraform:
https://developer.hashicorp.com/terraform/language/style
For Python:
https://peps.python.org/pep-0008/
📝What is the proposed task?
No response
🤔How might this work be carried out?
1 hour, just let team realise, and we can create linter to reminder it as well.
⌛How urgent is this work?
No response
💪How much effort do you think this will take?
No response
🛠️What skills are needed?
No response
📃Additional Info:
No response
Beta Was this translation helpful? Give feedback.
All reactions