Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Terraform formatting and add module_prefix attribute to modules_config #1162

Merged

Conversation

antonkovach
Copy link
Collaborator

@antonkovach antonkovach commented Feb 18, 2023

Fix the formatting of Terraform files in 0-cicd-github under repository population. Without proper formatting generated repositories may show formatting mismatches.
The module_prefix attribute has been added to the modules_config variable to handle non modules only repository use cases. The module_prefix attribute specifies the location of Terraform modules within the repository, which can help organize the modules and avoid naming conflicts.

@antonkovach antonkovach force-pushed the fast/fix-extras-0-cicd-github branch from fae5be5 to 699a42e Compare February 19, 2023 08:04
@antonkovach antonkovach changed the title Fix Terraform formatting and add module/ prefix to path in 0-cicd-github repository population Fix Terraform formatting in 0-cicd-github repository population Feb 19, 2023
@antonkovach antonkovach changed the title Fix Terraform formatting in 0-cicd-github repository population Fix Terraform formatting and add module_prefix to modules_config in 0-cicd-github repository population Feb 19, 2023
@antonkovach antonkovach changed the title Fix Terraform formatting and add module_prefix to modules_config in 0-cicd-github repository population Fix Terraform formatting and add module_prefix attribute to modules_config in 0-cicd-github repository population Feb 19, 2023
@antonkovach antonkovach changed the title Fix Terraform formatting and add module_prefix attribute to modules_config in 0-cicd-github repository population Fix Terraform formatting and add module_prefix attribute to modules_config Feb 19, 2023
@antonkovach antonkovach requested a review from ludoo February 19, 2023 13:07
…hub repository population

fix the formatting of Terraform files and adds the module/ prefix to the module path in 0-cicd-github under repository population. Without proper formatting and module path, generated repositories may show formatting mismatches and examples in the README.md file may not run as expected.
The changes include updating the replace function with a new regular expression pattern to correctly apply the git source for modules and updating the each.value.file attribute to include the module/ prefix in the Terraform file path. This ensures that the examples in the README.md file work as intended and that the generated repositories follow best practices for Terraform code.
- Add module_prefix to modules_config
- Add example to Readme.md
- use module_prefix variable to specify the path
@antonkovach antonkovach force-pushed the fast/fix-extras-0-cicd-github branch from 16d0e09 to bfe74cb Compare February 19, 2023 16:39
@ludoo ludoo merged commit 5cf60cb into GoogleCloudPlatform:master Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants