File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
internal/fleet/agent_policy Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,12 @@ func (model *agentPolicyModel) populateFromAPI(data *fleetapi.AgentPolicy) {
36
36
model .FleetServerHostId = types .StringPointerValue (data .FleetServerHostId )
37
37
38
38
if data .MonitoringEnabled != nil {
39
- model .MonitorLogs = types .BoolValue (slices .Contains (data .MonitoringEnabled , fleetapi .AgentPolicyMonitoringEnabledLogs ))
40
- model .MonitorMetrics = types .BoolValue (slices .Contains (data .MonitoringEnabled , fleetapi .AgentPolicyMonitoringEnabledMetrics ))
41
- } else {
42
- model .MonitorLogs = types .BoolNull ()
43
- model .MonitorMetrics = types .BoolNull ()
39
+ if slices .Contains (data .MonitoringEnabled , fleetapi .AgentPolicyMonitoringEnabledLogs ) {
40
+ model .MonitorLogs = types .BoolValue (true )
41
+ }
42
+ if slices .Contains (data .MonitoringEnabled , fleetapi .AgentPolicyMonitoringEnabledMetrics ) {
43
+ model .MonitorMetrics = types .BoolValue (true )
44
+ }
44
45
}
45
46
model .MonitoringOutputId = types .StringPointerValue (data .MonitoringOutputId )
46
47
model .Name = types .StringValue (data .Name )
You can’t perform that action at this time.
0 commit comments