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

azurerm_[windows|linux]_function_app - refactor app_settings processing for updates #16442

Merged
merged 1 commit into from
Apr 20, 2022

Conversation

jackofallops
Copy link
Member

@jackofallops jackofallops commented Apr 19, 2022

  • azurerm_linux_function_app - fix updates to app_settings
  • azurerm_windows_function_app - fix updates to app_settings

fixes #16244
fixes #16396

@jackofallops jackofallops added this to the v3.3.0 milestone Apr 19, 2022
@jackofallops jackofallops requested a review from a team April 19, 2022 08:59
@jackofallops jackofallops self-assigned this Apr 19, 2022
@sebader
Copy link
Contributor

sebader commented Apr 19, 2022

will this also fix #16396 ?

@jackofallops
Copy link
Member Author

will this also fix #16396 ?

Hi @sebader - I believe it will, yes. Thanks for the heads up, I'll link these together.

Copy link
Member

@manicminer manicminer left a comment

Choose a reason for hiding this comment

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

LGTM 🧨

@sebader
Copy link
Contributor

sebader commented Apr 19, 2022

@jackofallops glad to hear it!
What about the WEBSITE_RUN_FROM_PACAKGE setting? I don't see a mention of this in your code changes. Will this stay untouched as it was in the previous version of the Function app resource?

@jackofallops
Copy link
Member Author

@jackofallops glad to hear it! What about the WEBSITE_RUN_FROM_PACAKGE setting? I don't see a mention of this in your code changes. Will this stay untouched as it was in the previous version of the Function app resource?

Hi @sebader - That's a user specified attribute relating to deployments, so won't get an explicit mention in code. Since the app_settings map is multi-purpose, the provider only attempts to manage items in the map that are injected into is as a result of property values "elsewhere" such as storage, or values that are needed to help maintain state/dependency evaluation for Terraform. The specific problem here was that we were not always correctly maintaining existing settings depending on the update scenario / route taken. This should now be resolved, and I've added more test cases we had not previously considered. If you find that there are still issues with this fix in place, I'm happy to re-open the related issue to investigate further.

Thanks!

@jackofallops jackofallops merged commit d34f09b into main Apr 20, 2022
@jackofallops jackofallops deleted the b/appservice-appsettings-update-bug branch April 20, 2022 09:51
jackofallops added a commit that referenced this pull request Apr 20, 2022
@github-actions
Copy link

This functionality has been released in v3.3.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!

@sebader
Copy link
Contributor

sebader commented Apr 22, 2022

@jackofallops I just tested 3.3.0:

so the application_stack is not properly kept in place :) However, WEBSITE_RUN_FROM_PACAKGE still gets removed which does break the deployed Function app until you redeploy again. When looking at the old azurerm_function_app resource, it explicitly mentioned this:

image

This behavior seems to be missing from the new resources

@github-actions
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 May 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.