Skip to content

Commit

Permalink
azurerm_linux_function_app azurerm_function_app_slot `azurerm_win…
Browse files Browse the repository at this point in the history
…dows_function_app` `azurerm_windows_function_app` - taint resource when resource was partially created. (#24520)
  • Loading branch information
lonegunmanb authored Apr 8, 2024
1 parent 4dc8ffe commit 4f03524
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion internal/services/appservice/linux_function_app_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,8 @@ func (r LinuxFunctionAppResource) Create() sdk.ResourceFunc {
return fmt.Errorf("creating Linux %s: %+v", id, err)
}

metadata.SetID(id)

stickySettings := helpers.ExpandStickySettings(functionApp.StickySettings)

if stickySettings != nil {
Expand Down Expand Up @@ -642,7 +644,6 @@ func (r LinuxFunctionAppResource) Create() sdk.ResourceFunc {
}
}

metadata.SetID(id)
return nil
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,8 @@ func (r LinuxFunctionAppSlotResource) Create() sdk.ResourceFunc {
return fmt.Errorf("creating Linux %s: %+v", id, err)
}

metadata.SetID(id)

if !functionAppSlot.PublishingDeployBasicAuthEnabled {
sitePolicy := webapps.CsmPublishingCredentialsPoliciesEntity{
Properties: &webapps.CsmPublishingCredentialsPoliciesEntityProperties{
Expand Down Expand Up @@ -619,7 +621,6 @@ func (r LinuxFunctionAppSlotResource) Create() sdk.ResourceFunc {
}
}

metadata.SetID(id)
return nil
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,8 @@ func (r WindowsFunctionAppResource) Create() sdk.ResourceFunc {
return fmt.Errorf("updating properties of Windows %s: %+v", id, err)
}

metadata.SetID(id)

stickySettings := helpers.ExpandStickySettings(functionApp.StickySettings)

if stickySettings != nil {
Expand Down Expand Up @@ -642,7 +644,6 @@ func (r WindowsFunctionAppResource) Create() sdk.ResourceFunc {
}
}

metadata.SetID(id)
return nil
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,8 @@ func (r WindowsFunctionAppSlotResource) Create() sdk.ResourceFunc {
return fmt.Errorf("updating properties of Windows %s: %+v", id, err)
}

metadata.SetID(id)

backupConfig, err := helpers.ExpandBackupConfig(functionAppSlot.Backup)
if err != nil {
return fmt.Errorf("expanding backup configuration for Windows %s: %+v", id, err)
Expand Down Expand Up @@ -636,7 +638,6 @@ func (r WindowsFunctionAppSlotResource) Create() sdk.ResourceFunc {
}
}

metadata.SetID(id)
return nil
},
}
Expand Down

0 comments on commit 4f03524

Please sign in to comment.