Skip to content

Commit 42e95c8

Browse files
committed
update after rebase
1 parent 7c543a7 commit 42e95c8

File tree

7 files changed

+42
-10
lines changed

7 files changed

+42
-10
lines changed

sysdig/data_source_sysdig_monitor_team.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ func dataSourceSysdigMonitorTeam() *schema.Resource {
3636
Type: schema.TypeString,
3737
Computed: true,
3838
},
39+
"prometheus_remote_write_metrics_filter": {
40+
Type: schema.TypeString,
41+
Computed: true,
42+
},
3943
"can_use_sysdig_capture": {
4044
Type: schema.TypeBool,
4145
Computed: true,
@@ -48,6 +52,10 @@ func dataSourceSysdigMonitorTeam() *schema.Resource {
4852
Type: schema.TypeBool,
4953
Computed: true,
5054
},
55+
"can_use_agent_cli": {
56+
Type: schema.TypeBool,
57+
Computed: true,
58+
},
5159
"default_team": {
5260
Type: schema.TypeBool,
5361
Computed: true,
@@ -126,17 +134,21 @@ func dataSourceSysdigMonitorTeamRead(ctx context.Context, d *schema.ResourceData
126134
_ = d.Set("can_use_sysdig_capture", team.CanUseSysdigCapture)
127135
_ = d.Set("can_see_infrastructure_events", team.CanUseCustomEvents)
128136
_ = d.Set("can_use_aws_data", team.CanUseAwsMetrics)
137+
_ = d.Set("can_use_agent_cli", team.CanUseAgentCli)
129138
_ = d.Set("default_team", team.DefaultTeam)
130139
_ = d.Set("user_roles", userMonitorRolesToSet(team.UserRoles))
131140
_ = d.Set("entrypoint", entrypointToSet(team.EntryPoint))
132141
_ = d.Set("version", team.Version)
133142

134143
var ibmPlatformMetrics *string
144+
var prometheusRemoteWrite *string
135145
if team.NamespaceFilters != nil {
136146
ibmPlatformMetrics = team.NamespaceFilters.IBMPlatformMetrics
147+
prometheusRemoteWrite = team.NamespaceFilters.PrometheusRemoteWrite
137148
}
138149
_ = d.Set("enable_ibm_platform_metrics", team.CanUseBeaconMetrics)
139150
_ = d.Set("ibm_platform_metrics", ibmPlatformMetrics)
151+
_ = d.Set("prometheus_remote_write_metrics_filter", prometheusRemoteWrite)
140152

141153
return nil
142154
}

sysdig/data_source_sysdig_monitor_team_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ func TestAccDataSourceSysdigMonitorTeam(t *testing.T) {
3232
resource.TestCheckResourceAttr("data.sysdig_monitor_team.test", "can_use_sysdig_capture", "true"),
3333
resource.TestCheckResourceAttr("data.sysdig_monitor_team.test", "can_see_infrastructure_events", "true"),
3434
resource.TestCheckResourceAttr("data.sysdig_monitor_team.test", "can_use_aws_data", "true"),
35+
resource.TestCheckResourceAttr("data.sysdig_monitor_team.test", "can_use_agent_cli", "false"),
36+
resource.TestCheckResourceAttr("data.sysdig_monitor_team.test", "prometheus_remote_write_metrics_filter", "kube_cluster_name in (\"test-cluster\")"),
3537
),
3638
},
3739
},
@@ -48,9 +50,10 @@ resource "sysdig_monitor_team" "sample" {
4850
can_use_sysdig_capture = true
4951
can_see_infrastructure_events = true
5052
can_use_aws_data = true
51-
53+
can_use_agent_cli = false
54+
prometheus_remote_write_metrics_filter = "kube_cluster_name in (\"test-cluster\")"
5255
entrypoint {
53-
type = "Dashboards"
56+
type = "Dashboards"
5457
}
5558
}
5659

sysdig/data_source_sysdig_secure_team.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ func dataSourceSysdigSecureTeam() *schema.Resource {
4040
Type: schema.TypeBool,
4141
Computed: true,
4242
},
43+
"can_use_agent_cli": {
44+
Type: schema.TypeBool,
45+
Computed: true,
46+
},
47+
"can_use_rapid_response": {
48+
Type: schema.TypeBool,
49+
Computed: true,
50+
},
4351
"default_team": {
4452
Type: schema.TypeBool,
4553
Computed: true,
@@ -103,6 +111,8 @@ func dataSourceSysdigSecureTeamRead(ctx context.Context, d *schema.ResourceData,
103111
_ = d.Set("scope_by", team.Show)
104112
_ = d.Set("filter", team.Filter)
105113
_ = d.Set("use_sysdig_capture", team.CanUseSysdigCapture)
114+
_ = d.Set("can_use_agent_cli", team.CanUseAgentCli)
115+
_ = d.Set("can_use_rapid_response", team.CanUseRapidResponse)
106116
_ = d.Set("default_team", team.DefaultTeam)
107117
_ = d.Set("user_roles", userSecureRolesToSet(team.UserRoles))
108118
_ = d.Set("version", team.Version)

sysdig/data_source_sysdig_secure_team_test.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ func TestAccDataSourceSysdigSecureTeam(t *testing.T) {
3131
resource.TestCheckResourceAttr("data.sysdig_secure_team.test", "version", "0"),
3232
resource.TestCheckResourceAttr("data.sysdig_secure_team.test", "use_sysdig_capture", "true"),
3333
resource.TestCheckResourceAttr("data.sysdig_secure_team.test", "all_zones", "true"),
34+
resource.TestCheckResourceAttr("data.sysdig_secure_team.test", "can_use_agent_cli", "false"),
35+
resource.TestCheckResourceAttr("data.sysdig_secure_team.test", "can_use_rapid_response", "true"),
3436
),
3537
},
3638
},
@@ -40,12 +42,14 @@ func TestAccDataSourceSysdigSecureTeam(t *testing.T) {
4042
func secureTeamAndDatasource(name string) string {
4143
return fmt.Sprintf(`
4244
resource "sysdig_secure_team" "sample" {
43-
name = "%s"
44-
description = "A test secure team"
45-
scope_by = "container"
46-
use_sysdig_capture = true
47-
filter = "container.image.repo = \"sysdig/agent\""
48-
all_zones = true
45+
name = "%s"
46+
description = "A test secure team"
47+
scope_by = "container"
48+
use_sysdig_capture = true
49+
filter = "container.image.repo = \"sysdig/agent\""
50+
all_zones = true
51+
can_use_agent_cli = false
52+
can_use_rapid_response = true
4953
}
5054
5155
data "sysdig_secure_team" "test" {

website/docs/d/monitor_team.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ data "sysdig_monitor_team" "example" {
2828
- `description` - The description of the monitor team.
2929
- `entrypoint` - The entrypoint configuration for the team.
3030
- `filter` - The filter applied to the team.
31+
- `prometheus_remote_write_metrics_filter` - The Prometheus remote write metrics filter for the team.
3132
- `scope_by` - The scope of the team.
3233
- `can_use_sysdig_capture` - Whether the team can use Sysdig capture.
3334
- `can_see_infrastructure_events` - Whether the team can see infrastructure events.
35+
- `can_use_agent_cli` - Whether the team can use the agent CLI.
3436
- `can_use_aws_data` - Whether the team can use AWS data.
3537
- `default_team` - Whether the team is the default team.
3638
- `user_roles` - The roles assigned to users in the team.

website/docs/d/secure_team.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ data "sysdig_secure_team" "example" {
2929
- `filter` - The filter applied to the team.
3030
- `scope_by` - The scope of the team.
3131
- `use_sysdig_capture` - Whether the team can use Sysdig capture.
32+
- `can_use_agent_cli` - Whether the team can use the agent CLI.
33+
- `can_use_rapid_response` - Whether the team can use rapid response.
3234
- `default_team` - Whether the team is the default team.
3335
- `user_roles` - The roles assigned to users in the team.
3436
- `zone_ids` - The IDs of the zones associated with the team.
3537
- `all_zones` - Whether the team has access to all zones.
3638
- `version` - The version of the secure team.
3739
- `theme` - The theme of the secure team.
38-

website/docs/r/monitor_team.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ data "sysdig_custom_role" "custom_role" {
6767

6868
* `prometheus_remote_write_metrics_filter` - (Optional) Use this option to select which Prometheus Remote Write data users of this team can view. Not setting it will allow users to see all Prometheus Remote Write data.
6969

70-
* `use_sysdig_capture` - (Optional) Defines if the team is able to create Sysdig Capture files. Default: true.
70+
* `can_use_sysdig_capture` - (Optional) Defines if the team is able to create Sysdig Capture files. Default: true.
7171

7272
* `can_see_infrastructure_events` - (Optional) Enable this option to allow this team to view all Infrastructure and Custom Events from every user and agent. Otherwise, this team will only see infrastructure events sent specifically to this team. Default: false.
7373

0 commit comments

Comments
 (0)