Skip to content

Commit

Permalink
azurerm_linux_function_app_slot - fixed panic when planning from a …
Browse files Browse the repository at this point in the history
…version older than 3.88.0 (#25838)
  • Loading branch information
christian-calabrese committed May 17, 2024
1 parent 8469c8d commit 93f1ade
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1575,9 +1575,9 @@ func (l LinuxFunctionAppSlotV0toV1) Schema() map[string]*pluginsdk.Schema {

func (l LinuxFunctionAppSlotV0toV1) UpgradeFunc() pluginsdk.StateUpgraderFunc {
return func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) {
oldId := rawState["service_plan_id"].(string)
oldId, ok := rawState["service_plan_id"].(string)
// service_plan_id can be empty if it is not in a different Service Plan to the "parent" app
if oldId == "" {
if !ok || oldId == "" {
return rawState, nil
}
parsedId, err := commonids.ParseAppServicePlanIDInsensitively(oldId)
Expand Down

0 comments on commit 93f1ade

Please sign in to comment.