Skip to content

Commit

Permalink
add remaining computed fields
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunchauhanibm committed Dec 15, 2024
1 parent f54dd39 commit fc65c99
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions ibm/service/cis/resource_ibm_cis_logpush_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,21 @@ func ResourceIBMCISLogPushJob() *schema.Resource {
ConflictsWith: []string{cisLogdna, cisLogPushCos, cisLogPushIbmCl},
Description: "Uniquely identifies a resource (such as an s3 bucket) where data will be pushed.",
},
cisLogpushLastComplete: {
Type: schema.TypeString,
Computed: true,
Description: "Records the last time for which logs have been successfully pushed.",
},
cisLogpushLastError: {
Type: schema.TypeString,
Computed: true,
Description: "Records the last time the job failed.",
},
cisLogpushErrorMessage: {
Type: schema.TypeString,
Computed: true,
Description: "The last failure message.",
},
},
}
}
Expand Down Expand Up @@ -279,6 +294,15 @@ func ResourceIBMCISLogpushJobRead(d *schema.ResourceData, meta interface{}) erro
d.Set(cisLogpushFreq, *result.Result.Frequency)
d.Set(cisLogpullOpt, *result.Result.LogpullOptions)
d.Set(cisLogpushDestConf, *result.Result.DestinationConf)
if result.Result.LastComplete != nil {
d.Set(cisLogpushLastComplete, *result.Result.LastComplete)
}
if result.Result.LastError != nil {
d.Set(cisLogpushLastError, result.Result.LastError)
}
if result.Result.ErrorMessage != nil {
d.Set(cisLogpushErrorMessage, result.Result.ErrorMessage)
}
return nil
}
func ResourceIBMCISLogpushJobUpdate(d *schema.ResourceData, meta interface{}) error {
Expand Down

0 comments on commit fc65c99

Please sign in to comment.