generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 41
/
splunk_data_source.go
46 lines (41 loc) · 1.24 KB
/
splunk_data_source.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package connector
import (
"github.com/harness/terraform-provider-harness/helpers"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
func DatasourceConnectorSplunk() *schema.Resource {
resource := &schema.Resource{
Description: "Datasource for looking up a Splunk connector.",
ReadContext: resourceConnectorSplunkRead,
Schema: map[string]*schema.Schema{
"url": {
Description: "URL of the Splunk server.",
Type: schema.TypeString,
Computed: true,
},
"username": {
Description: "The username used for connecting to Splunk.",
Type: schema.TypeString,
Computed: true,
},
"account_id": {
Description: "Splunk account id.",
Type: schema.TypeString,
Computed: true,
},
"password_ref": {
Description: "The reference to the Harness secret containing the Splunk password." + secret_ref_text,
Type: schema.TypeString,
Computed: true,
},
"delegate_selectors": {
Description: "Tags to filter delegates for connection.",
Type: schema.TypeSet,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
}
helpers.SetMultiLevelDatasourceSchemaIdentifierRequired(resource.Schema)
return resource
}