@@ -7,13 +7,14 @@ import (
7
7
b64 "encoding/base64"
8
8
"encoding/json"
9
9
"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"
13
10
"os"
14
11
"regexp"
15
12
"testing"
16
13
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
+
17
18
"github.com/draios/terraform-provider-sysdig/sysdig"
18
19
)
19
20
@@ -68,33 +69,55 @@ resource "sysdig_secure_cloud_auth_account" "sample" {
68
69
provider_type = "PROVIDER_GCP"
69
70
enabled = "true"
70
71
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
+ }
79
80
}
80
81
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({
84
85
gcp = {
85
86
key = "%s"
86
87
}
87
88
})
88
89
}
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({
93
94
gcp = {
94
95
key = "%s"
95
96
}
96
97
})
97
98
}
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
+ }
98
121
}
99
122
resource "sysdig_secure_organization" "sample-org" {
100
123
management_account_id = sysdig_secure_cloud_auth_account.sample.id
0 commit comments