Closed Nihisil closed 5 months ago
It is maybe not needed, but should add a test for
args.projectName.toLowerCase().replace(/\s/g, '-');
(e.g. add a space in the currentprojectDir = 'core test'
and add 1 assertion that the file does main.tf does NOT containscore test
but containscore-test
. 🤔
Good point. I have added positive test here: https://github.com/nimblehq/infrastructure-templates/pull/275/commits/007ce2ac99510ba234ad8889203a393afe63b25a
In cases where the file doesn't contain the value, we don't yet have a helper, and adding one here might be excessive. What do you think?
Also I wasn't clear earlier. After these changes, the directory name for the template output will change too. If a user chooses My dir
for their generated templates, it'll be saved to my-dir
.
We could split the current project name variable into two: project name and project dir. This would keep the requested directory unchanged, and the generated project name would meet AWS requirements, which often don't allow spaces in names.
However, I don't believe it's worth the effort. In most cases, people don't use directory names with spaces since it's not the norm for developers
What happened 👀
-
to make sure that we can use project name as variableProof Of Work 📹
Before the fix, I couldn't deploy the template to the company's AWS account since the groups had already been created by the Nexus project:![image](https://github.com/nimblehq/infrastructure-templates/assets/475367/666c843a-9b7a-4b6f-9c54-c596939b28c8)
After the fix groups were created:![image](https://github.com/nimblehq/infrastructure-templates/assets/475367/a6757690-d32a-4a8f-80e0-0cde586a0f2c)