Skip to content

Commit 0aac888

Browse files
authored
azurerm_linux_function_app - fix panic when deployed without all permissions (#31344)
[BUG] * Resource: `azurerm_linux_function_app` - fix panic when deployed without all required permissions
1 parent d264c62 commit 0aac888

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/services/appservice/linux_function_app_resource.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,14 +748,14 @@ func (r LinuxFunctionAppResource) Read() sdk.ResourceFunc {
748748
}
749749

750750
basicAuthFTP := true
751-
if basicAuthFTPResp, err := client.GetFtpAllowed(ctx, *id); err != nil && basicAuthFTPResp.Model != nil {
751+
if basicAuthFTPResp, err := client.GetFtpAllowed(ctx, *id); err != nil || basicAuthFTPResp.Model == nil {
752752
return fmt.Errorf("retrieving state of FTP Basic Auth for %s: %+v", id, err)
753753
} else if csmProps := basicAuthFTPResp.Model.Properties; csmProps != nil {
754754
basicAuthFTP = csmProps.Allow
755755
}
756756

757757
basicAuthWebDeploy := true
758-
if basicAuthWebDeployResp, err := client.GetScmAllowed(ctx, *id); err != nil && basicAuthWebDeployResp.Model != nil {
758+
if basicAuthWebDeployResp, err := client.GetScmAllowed(ctx, *id); err != nil || basicAuthWebDeployResp.Model == nil {
759759
return fmt.Errorf("retrieving state of WebDeploy Basic Auth for %s: %+v", id, err)
760760
} else if csmProps := basicAuthWebDeployResp.Model.Properties; csmProps != nil {
761761
basicAuthWebDeploy = csmProps.Allow

0 commit comments

Comments
 (0)