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

Bug Fix: azurerm_batch_job - Fix failure to create azurerm_batch_job with multiple properties in common_environment_properties #15686

Merged
merged 2 commits into from
Mar 3, 2022

Conversation

sinbai
Copy link
Contributor

@sinbai sinbai commented Mar 3, 2022

Since a for loop in golang always uses the same memory to receive the value of variable in the loop, the common_environment_properties is set to the same value(the value of last loop) when multiple properties are configured in it. Replace with utils.String to get a new temporary variable, then set the value to resolve issue #15647.

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @sinbai, could you also update the complete test to include two values in common_environment_properties so we can test this behaviour?

@stephybun stephybun added the bug label Mar 3, 2022
@sinbai
Copy link
Contributor Author

sinbai commented Mar 3, 2022

Thanks for this @sinbai, could you also update the complete test to include two values in common_environment_properties so we can test this behaviour?

Sure, done. Thanks for your time.

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

@stephybun stephybun merged commit fdd0039 into hashicorp:main Mar 3, 2022
@github-actions github-actions bot added this to the v2.99.0 milestone Mar 3, 2022
stephybun added a commit that referenced this pull request Mar 3, 2022
@github-actions
Copy link

This functionality has been released in v2.99.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@sinbai sinbai deleted the batch/fix_issue_15647 branch April 6, 2022 02:16
@github-actions
Copy link

github-actions bot commented May 6, 2022

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 May 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants