generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 41
/
as_rds_data_source.go
110 lines (106 loc) · 2.79 KB
/
as_rds_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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
package as_rule
import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
func DataSourceRDSRule() *schema.Resource {
resource := &schema.Resource{
Description: "Data source for retrieving a Harness Variable.",
ReadContext: resourceASRuleRead,
Schema: map[string]*schema.Schema{
"identifier": {
Description: "Unique identifier of the resource",
Type: schema.TypeFloat,
Computed: true,
},
"name": {
Description: "Name of the rule",
Type: schema.TypeString,
Required: true,
},
"cloud_connector_id": {
Description: "Id of the cloud connector",
Type: schema.TypeString,
Required: true,
},
"idle_time_mins": {
Description: "Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.",
Type: schema.TypeInt,
Optional: true,
Default: 15,
},
"database": {
Type: schema.TypeList,
Required: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Type: schema.TypeString,
Required: true,
Description: "ID of the database",
},
"region": {
Type: schema.TypeString,
Required: true,
Description: "Region to which database belong to",
},
},
},
},
"tcp": {
Description: "TCP routing configuration",
Type: schema.TypeList,
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"proxy_id": {
Description: "Id of the Proxy",
Type: schema.TypeString,
Required: true,
},
"forward_rule": {
Description: "Additional tcp forwarding rules",
Type: schema.TypeList,
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"connect_on": {
Description: "Port to listen on the proxy",
Type: schema.TypeInt,
Optional: true,
},
"port": {
Description: "Port to listen on the vm",
Type: schema.TypeInt,
Required: true,
},
},
},
},
},
},
},
"depends": {
Description: "Dependent rules",
Type: schema.TypeList,
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"rule_id": {
Description: "Rule id of the dependent rule",
Type: schema.TypeInt,
Required: true,
},
"delay_in_sec": {
Description: "Number of seconds the rule should wait after warming up the dependent rule",
Type: schema.TypeInt,
Optional: true,
Default: 5,
},
},
},
},
},
}
return resource
}