@@ -7,13 +7,14 @@ import (
77 b64 "encoding/base64"
88 "encoding/json"
99 "fmt"
10- "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
11- "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
12- "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1310 "os"
1411 "regexp"
1512 "testing"
1613
14+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
15+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
16+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
17+
1718 "github.com/draios/terraform-provider-sysdig/sysdig"
1819)
1920
@@ -68,33 +69,55 @@ resource "sysdig_secure_cloud_auth_account" "sample" {
6869 provider_type = "PROVIDER_GCP"
6970 enabled = "true"
7071 feature {
71- secure_config_posture {
72- enabled = " true"
73- components = ["COMPONENT_SERVICE_PRINCIPAL/secure-posture"]
74- }
75- secure_identity_entitlement {
76- enabled = true
77- components = ["COMPONENT_SERVICE_PRINCIPAL /secure-posture "]
78- }
72+ secure_config_posture {
73+ enabled = true
74+ components = ["COMPONENT_SERVICE_PRINCIPAL/secure-posture"]
75+ }
76+ secure_identity_entitlement {
77+ enabled = true
78+ components = ["COMPONENT_WEBHOOK_DATASOURCE /secure-runtime "]
79+ }
7980 }
8081 component {
81- type = "COMPONENT_SERVICE_PRINCIPAL"
82- instance = "secure-posture"
83- service_principal_metadata = jsonencode({
82+ type = "COMPONENT_SERVICE_PRINCIPAL"
83+ instance = "secure-posture"
84+ service_principal_metadata = jsonencode({
8485 gcp = {
8586 key = "%s"
8687 }
8788 })
8889 }
89- component {
90- type = "COMPONENT_SERVICE_PRINCIPAL"
91- instance = "secure-onboarding"
92- service_principal_metadata = jsonencode({
90+ component {
91+ type = "COMPONENT_SERVICE_PRINCIPAL"
92+ instance = "secure-onboarding"
93+ service_principal_metadata = jsonencode({
9394 gcp = {
9495 key = "%s"
9596 }
9697 })
9798 }
99+ component {
100+ type = "COMPONENT_WEBHOOK_DATASOURCE"
101+ instance = "secure-runtime"
102+ webhook_datasource_metadata = jsonencode({
103+ gcp = {
104+ webhook_datasource = {
105+ pubsub_topic_name = "pubsub_topic_name_value"
106+ sink_name = "sink_name_value"
107+ push_subscription_name = "push_subscription_name_value"
108+ push_endpoint = "push_endpoint_value"
109+ }
110+ service_principal = {
111+ workload_identity_federation = {
112+ pool_id = "pool_id_value"
113+ pool_provider_id = "pool_provider_id_value"
114+ project_number = "123456789011"
115+ }
116+ email = "email_value"
117+ }
118+ }
119+ })
120+ }
98121}
99122resource "sysdig_secure_organization" "sample-org" {
100123 management_account_id = sysdig_secure_cloud_auth_account.sample.id
0 commit comments