Skip to content

azurerm_linux[windows]_function[web]_app_[slot] azurerm_flex_consumption_app - update api version to 2025-05-01#32239

Open
xiaxyi wants to merge 37 commits into
hashicorp:mainfrom
xiaxyi:flex-consumption/site-update
Open

azurerm_linux[windows]_function[web]_app_[slot] azurerm_flex_consumption_app - update api version to 2025-05-01#32239
xiaxyi wants to merge 37 commits into
hashicorp:mainfrom
xiaxyi:flex-consumption/site-update

Conversation

@xiaxyi

@xiaxyi xiaxyi commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

  • update the api version to 2025-05-01 for app service to upport the siteUpdateStrategy in flex consumption app.
  • The network related properties:virtual_network_image_pull_enabledvnet, virtual_network_backup_restore_enabled, vnet_route_all_enabled are renamed and restructured, updating the properties according to the api change.
  • The webdeploy_publish_basic_authentication_enabled and ftp_publish_basic_authentication_enabled default behaviour has been changed. The default value is not true when property is omitted, and to avoid breaking change we need to set the default value in the api.

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.
    For example: “resource_name_here - description of change e.g. adding property new_property_name_here

Changes to existing Resource / Data Source

  • I have added an explanation of what my changes do and why I'd like you to include them (This may be covered by linking to an issue above, but may benefit from additional explanation).
  • I have written new tests for my resource or datasource changes & updated any relevant documentation.
  • I have successfully run tests with my changes locally. If not, please provide details on testing challenges that prevented you running the tests.
  • (For changes that include a state migration only). I have manually tested the migration path between relevant versions of the provider.

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

  • azurerm_linux[windows]_function[web]_app_[slot], azurerm_flex_consumption_app - support for the site_update_strategy property [GH-00000]

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

Fixes #0000

AI Assistance Disclosure

  • AI Assisted - This contribution was made by, or with the assistance of, AI/LLMs

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the provider.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Note

If this PR changes meaningfully during the course of review please update the title and description as required.

@WodansSon WodansSon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@xiaxyi, Thanks for tightening this up and pushing changes. I can see the test/config naming fix landed, the site update strategy validation now uses the SDK helper, and most of the VNet routing read-side handling has been cleaned up.

Per earlier direction, I’m not looking for docs updates in this PR since those should be fixed in a follow-up PR. I do still see a couple of code items that look unresolved though:

  1. In function_app_flex_consumption_resource.go, the update path still writes through model.Properties.OutboundVnetRouting.ApplicationTraffic without first ensuring OutboundVnetRouting is initialized. Older apps can still come back without that block, so this still looks like a panic risk on update to me.

  2. In linux_function_app_resource.go, the new vnetRoutingProps guard looks reversed:

   vnetRoutingProps := &webapps.OutboundVnetRouting{}
   if model.Properties.OutboundVnetRouting == nil {
       vnetRoutingProps = model.Properties.OutboundVnetRouting
   }

As written, if the existing block is nil we assign vnetRoutingProps back to nil, so the later writes can still panic.

Nit:
3. linux_function_app_resource.go still has the manual ClientCertMode enum conversion rather than pointer.ToEnum.

If you fix the two OutboundVnetRouting cases above, I think that covers the remaining substantive review items on my side, however it would be nice to fix the nit too 🙂.

@xiaxyi

xiaxyi commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @WodansSon for reviewing! I updated the code:

1. fixed the incorrect guard in linux function app
2. initialized the OutboundVnetRouting in flex consumption app.
3. updated the pointed.toEnum 

Let me know if you have more comments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants