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 bug in applied group terraform backends #110

Merged

Conversation

heyealex
Copy link
Contributor

Description

A bug where the backends in all resource groups have the same prefix is
fixed with this change. Before the address of the default configuration
was being added to the groups and it's prefix was added. That prefix
would propogate as the defaults were added to other groups and therefore
the correct prefix was never updated.

In addition to the bug fix, the section of code was pulled out into it's
own function in expand as that better represents what it is doing.

Tests have been added to hopefully catch this type of bug in the future.

Submission Checklist:

  • Have you installed and run this change against pre-commit? pre-commit install
  • Are all tests passing? make tests
  • If applicable, have you written additional unit tests to cover this
    change?
  • Is unit test coverage still above 80%?
  • Have you updated any application documentation such as READMEs and user
    guides?
  • Have you followed the guidelines in our Contributing document?

A bug where the backends in all resource groups have the same prefix is
fixed with this change. Before the address of the default configuration
was being added to the groups and it's prefix was added. That prefix
would propogate as the defaults were added to other groups and therefore
the correct prefix was never updated.

In addition to the bug fix, the section of code was pulled out into it's
own function in expand as that better represents what it is doing.

Tests have been added to hopefully catch this type of bug in the future.
@heyealex heyealex merged commit 82015c2 into GoogleCloudPlatform:develop Feb 11, 2022
@heyealex heyealex deleted the bugfix/tf-backend-group branch February 11, 2022 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants