-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for IBM Cloud Logs atracker targets #5270
Changes from 4 commits
0762867
37163ce
d02af7d
ddabebb
bd0a260
32f1ba7
909d338
cdf0ea8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,6 +156,20 @@ func DataSourceIBMAtrackerTargets() *schema.Resource { | |
}, | ||
}, | ||
}, | ||
"cloudlogs_endpoint": &schema.Schema{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we rename the attirbute to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We were keeping the same convention as previous changes. Collapsing the service name and adjoining it with |
||
Type: schema.TypeList, | ||
Computed: true, | ||
Description: "Property values for the IBM Cloud Logs endpoint in responses.", | ||
Elem: &schema.Resource{ | ||
Schema: map[string]*schema.Schema{ | ||
"target_crn": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "The CRN of the IBM Cloud Logs instance", | ||
}, | ||
}, | ||
}, | ||
}, | ||
"cos_write_status": { | ||
Type: schema.TypeList, | ||
Computed: true, | ||
|
@@ -340,6 +354,13 @@ func DataSourceIBMAtrackerTargetsTargetToMap(model *atrackerv2.Target) (map[stri | |
} | ||
modelMap["eventstreams_endpoint"] = []map[string]interface{}{eventstreamsEndpointMap} | ||
} | ||
if model.CloudlogsEndpoint != nil { | ||
cloudlogsEndpointMap, err := DataSourceIBMAtrackerTargetsCloudlogsEndpointToMap(model.CloudlogsEndpoint) | ||
if err != nil { | ||
return modelMap, err | ||
} | ||
modelMap["cloudlogs_endpoint"] = []map[string]interface{}{cloudlogsEndpointMap} | ||
} | ||
if model.WriteStatus != nil { | ||
writeStatusMap, err := DataSourceIBMAtrackerTargetsWriteStatusToMap(model.WriteStatus) | ||
if err != nil { | ||
|
@@ -403,6 +424,14 @@ func DataSourceIBMAtrackerTargetsEventstreamsEndpointToMap(model *atrackerv2.Eve | |
return modelMap, nil | ||
} | ||
|
||
func DataSourceIBMAtrackerTargetsCloudlogsEndpointToMap(model *atrackerv2.CloudLogsEndpoint) (map[string]interface{}, error) { | ||
modelMap := make(map[string]interface{}) | ||
if model.TargetCRN != nil { | ||
modelMap["target_crn"] = *model.TargetCRN | ||
} | ||
return modelMap, nil | ||
} | ||
|
||
func DataSourceIBMAtrackerTargetsWriteStatusToMap(model *atrackerv2.WriteStatus) (map[string]interface{}, error) { | ||
modelMap := make(map[string]interface{}) | ||
if model.Status != nil { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are changing github.com/IBM/project-go-sdk verison value
This change is breaking the go build
https://github.com/IBM-Cloud/terraform-provider-ibm/actions/runs/8690624159/job/23917984722?pr=5270