generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 40
/
spot_data_source.go
55 lines (50 loc) · 1.63 KB
/
spot_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
47
48
49
50
51
52
53
54
55
package connector
import (
"github.com/harness/terraform-provider-harness/helpers"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
func DatasourceConnectorSpot() *schema.Resource {
resource := &schema.Resource{
Description: "Datasource for looking up an Spot connector.",
ReadContext: resourceConnectorSpotRead,
Schema: map[string]*schema.Schema{
"permanent_token": {
Description: "Authenticate to Spot using account id and permanent token.",
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spot_account_id": {
Description: "Spot account id.",
Type: schema.TypeString,
Computed: true,
},
"spot_account_id_ref": {
Description: "Reference to the Harness secret containing the spot account id." + secret_ref_text,
Type: schema.TypeString,
Computed: true,
},
"api_token_ref": {
Description: "Reference to the Harness secret containing the permanent api token." + secret_ref_text,
Type: schema.TypeString,
Computed: true,
},
"delegate_selectors": {
Description: "Connect only using delegates with these tags.",
Type: schema.TypeSet,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"execute_on_delegate": {
Description: "Execute on delegate or not.",
Type: schema.TypeBool,
Computed: true,
},
},
},
},
},
}
helpers.SetMultiLevelDatasourceSchemaIdentifierRequired(resource.Schema)
return resource
}