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

Backport of Relocate localterraform.com aliasing to backend configurators into v1.5 #33563

Conversation

teamterraform
Copy link
Contributor

Backport

This PR is auto-generated from #33432 to be assessed for backporting due to the inclusion of the label 1.5-backport.

The below text is copied from the body of the original PR.


Previously, remote and cloud backends would automatically alias localterraform.com as the configured hostname during configuration. This turned out to be an issue with how backends could potentially be used within the builtin terraform_remote_state data source. Those data sources each configure the same service discovery with different targets for localterraform.com, and do so simultaneously, creating an occasional concurrent map read & write panic when multiple data sources are defined.

localterraform.com is obviously not useful for every backend configuration. Therefore, I relocated the alias configuration to the callers, so they may specify when to use it. The modified design adds a new method to backend.Enhanced to allow configurators to ask which aliases should be defined.

Fixes #33333

Target Release

1.5.2

BUG FIXES

  • Fixed a panic when reading from terraform_remote_state data sources when multiple resources are defined

@teamterraform teamterraform force-pushed the backport/TF-7327-using-multiple-terraform-remote-state-data-sources-can-cause-race-conditions-when-the-backend-configuring-localterraform-com/remarkably-just-bird branch 2 times, most recently from 6ee8fb3 to 935e07f Compare July 21, 2023 21:01
@brandonc brandonc force-pushed the backport/TF-7327-using-multiple-terraform-remote-state-data-sources-can-cause-race-conditions-when-the-backend-configuring-localterraform-com/remarkably-just-bird branch from 7339104 to 0ff8348 Compare July 25, 2023 15:44
@brandonc brandonc force-pushed the backport/TF-7327-using-multiple-terraform-remote-state-data-sources-can-cause-race-conditions-when-the-backend-configuring-localterraform-com/remarkably-just-bird branch from 0ff8348 to 4b4bc51 Compare August 14, 2023 21:09
@brandonc brandonc merged commit 5335a3b into v1.5 Aug 16, 2023
6 checks passed
@brandonc brandonc deleted the backport/TF-7327-using-multiple-terraform-remote-state-data-sources-can-cause-race-conditions-when-the-backend-configuring-localterraform-com/remarkably-just-bird branch August 16, 2023 16:24
@github-actions
Copy link

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants