diff --git a/sysdig/data_source_sysdig_fargate_workload_agent_test.go b/sysdig/data_source_sysdig_fargate_workload_agent_test.go index be364974..5876ccc8 100644 --- a/sysdig/data_source_sysdig_fargate_workload_agent_test.go +++ b/sysdig/data_source_sysdig_fargate_workload_agent_test.go @@ -11,7 +11,8 @@ import ( "github.com/draios/terraform-provider-sysdig/sysdig" ) -func TestAccSysdigFargateWorkloadAgent(t *testing.T) { +// Direct connection mode has been deprecated in Prod envs +func TestAccSysdigFargateWorkloadAgentDirectConnection(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ ProviderFactories: map[string]func() (*schema.Provider, error){ "sysdig": func() (*schema.Provider, error) { @@ -20,13 +21,13 @@ func TestAccSysdigFargateWorkloadAgent(t *testing.T) { }, Steps: []resource.TestStep{ { - Config: getFargateWorkloadAgent(), + Config: getFargateWorkloadAgentDirectConnection(), }, }, }) } -func getFargateWorkloadAgent() string { +func getFargateWorkloadAgentDirectConnection() string { return ` data "sysdig_fargate_workload_agent" "test" { container_definitions = "[]" @@ -40,3 +41,31 @@ data "sysdig_fargate_workload_agent" "test" { } ` } + +func TestAccSysdigFargateWorkloadAgentOrchestrated(t *testing.T) { + resource.ParallelTest(t, resource.TestCase{ + ProviderFactories: map[string]func() (*schema.Provider, error){ + "sysdig": func() (*schema.Provider, error) { + return sysdig.Provider(), nil + }, + }, + Steps: []resource.TestStep{ + { + Config: getFargateWorkloadAgentOrchestrated(), + }, + }, + }) +} + +func getFargateWorkloadAgentOrchestrated() string { + return ` +data "sysdig_fargate_workload_agent" "test" { + container_definitions = "[]" + + orchestrator_host = "sysdig.orchestrator.agent.com" + orchestrator_port = 6667 + workload_agent_image = "quay.io/sysdig/workload-agent:latest" + sysdig_logging = "info" +} +` +}