diff --git a/cli/azd/pkg/azapi/stack_deployments.go b/cli/azd/pkg/azapi/stack_deployments.go index 151e6b4bd45..172b2be751b 100644 --- a/cli/azd/pkg/azapi/stack_deployments.go +++ b/cli/azd/pkg/azapi/stack_deployments.go @@ -524,19 +524,19 @@ func parseDeploymentStackOptions(options map[string]any) (*deploymentStackOption var deploymentStackOptions *deploymentStackOptions has, err := optionsConfig.GetSection(deploymentStacksConfigKey, &deploymentStackOptions) - if !has { - return defaultDeploymentStackOptions, nil - } - if err != nil { suggestion := &internal.ErrorWithSuggestion{ Err: fmt.Errorf("failed parsing deployment stack options: %w", err), - Suggestion: "Review the 'infra.config.deploymentStacks' configuration section in the 'azure.yaml' file.", + Suggestion: "Review the 'infra.deploymentStacks' configuration section in the 'azure.yaml' file.", } return nil, suggestion } + if !has || deploymentStackOptions == nil { + return defaultDeploymentStackOptions, nil + } + if deploymentStackOptions.BypassStackOutOfSyncError == nil { deploymentStackOptions.BypassStackOutOfSyncError = defaultDeploymentStackOptions.BypassStackOutOfSyncError }