generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 41
/
aws_proxy_data_source.go
105 lines (102 loc) · 2.99 KB
/
aws_proxy_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
package load_balancer
import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
func DataSourceAWSProxy() *schema.Resource {
resource := &schema.Resource{
Description: "Data source for AWS Autostopping proxy",
ReadContext: resourceLoadBalancerRead,
Schema: map[string]*schema.Schema{
"identifier": {
Description: "Unique identifier of the resource",
Type: schema.TypeString,
Computed: true,
},
"name": {
Description: "Name of the proxy",
Type: schema.TypeString,
Required: true,
},
"host_name": {
Description: "Hostname for the proxy",
Type: schema.TypeString,
Required: true,
},
"cloud_connector_id": {
Description: "Id of the cloud connector",
Type: schema.TypeString,
Required: true,
},
"region": {
Description: "Region in which cloud resources are hosted",
Type: schema.TypeString,
Required: true,
},
"security_groups": {
Description: "Security Group to define the security rules that determine the inbound and outbound traffic",
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"vpc": {
Description: "VPC in which cloud resources are hosted",
Type: schema.TypeString,
Required: true,
},
"allocate_static_ip": {
Description: "Boolean value to indicate if proxy vm needs to have static IP",
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"machine_type": {
Description: "Machine instance type",
Type: schema.TypeString,
Required: true,
},
"api_key": {
Description: "Harness NG API key",
Sensitive: true,
Type: schema.TypeString,
Required: true,
},
"route53_hosted_zone_id": {
Description: "Route 53 hosted zone id",
Type: schema.TypeString,
Optional: true,
},
"keypair": {
Description: "",
Type: schema.TypeString,
Optional: true,
},
"certificates": {
Type: schema.TypeList,
Optional: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"cert_secret_id": {
Type: schema.TypeString,
Required: true,
Description: "Certificate secret ID",
},
"key_secret_id": {
Type: schema.TypeString,
Required: true,
Description: "Private key secret ID",
},
},
},
},
"delete_cloud_resources_on_destroy": {
Description: "Governs how the proxy entity will be deleted on Terraform destroy. When set to true, the associated VM will be deleted permanently from AWS account. Be fully aware of the consequneces of settting this to true, as the action is irreversible. When set to false, solely the Harness LB representation will be deleted, which leaves the proxy VM in AWS account itself.",
Type: schema.TypeBool,
Required: true,
},
},
}
return resource
}