Skip to content

Commit

Permalink
argocd_application: fix NPE during resource import
Browse files Browse the repository at this point in the history
  • Loading branch information
oboukili committed Jul 16, 2020
1 parent 0d84db7 commit b25af60
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions argocd/structure_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,17 @@ func flattenApplicationSpec(s application.ApplicationSpec) (
"destination": flattenApplicationDestinations(
[]application.ApplicationDestination{s.Destination},
),
"ignore_difference": flattenApplicationIgnoreDifferences(s.IgnoreDifferences),
"info": flattenApplicationInfo(s.Info),
"project": s.Project,
"revision_history_limit": *s.RevisionHistoryLimit,
"ignore_difference": flattenApplicationIgnoreDifferences(s.IgnoreDifferences),
"info": flattenApplicationInfo(s.Info),
"project": s.Project,
"source": flattenApplicationSource(
[]application.ApplicationSource{s.Source},
),
"sync_policy": flattenApplicationSyncPolicy(s.SyncPolicy),
}
if s.RevisionHistoryLimit != nil {
spec["revision_history_limit"] = int(*s.RevisionHistoryLimit)
}
return []map[string]interface{}{spec}, nil
}

Expand Down

0 comments on commit b25af60

Please sign in to comment.