generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 40
/
aws_kms_data_source.go
93 lines (88 loc) · 3.07 KB
/
aws_kms_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
package connector
import (
"github.com/harness/terraform-provider-harness/helpers"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
func DatasourceConnectorAwsKms() *schema.Resource {
resource := &schema.Resource{
Description: "Datasource for looking up an AWS KMS connector.",
ReadContext: resourceConnectorAwsKmsRead,
Schema: map[string]*schema.Schema{
"arn_ref": {
Description: "A reference to the Harness secret containing the ARN of the AWS KMS.",
Type: schema.TypeString,
Computed: true,
},
"region": {
Description: "The AWS region where the AWS Secret Manager is.",
Type: schema.TypeString,
Computed: true,
},
"delegate_selectors": {
Description: "Connect using only the delegates which have these tags.",
Type: schema.TypeSet,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"credentials": {
Description: "The credentials to use for connecting to aws.",
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"manual": {
Description: "Specify the AWS key and secret used for authenticating.",
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"access_key_ref": {
Description: "The reference to the Harness secret containing the AWS access key.",
Type: schema.TypeString,
Computed: true,
},
"secret_key_ref": {
Description: "The reference to the Harness secret containing the AWS secret key.",
Type: schema.TypeString,
Computed: true,
},
},
},
},
"inherit_from_delegate": {
Description: "Inherit the credentials from from the delegate.",
Type: schema.TypeBool,
Computed: true,
},
"assume_role": {
Description: "Connect using STS assume role.",
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"role_arn": {
Description: "The ARN of the role to assume.",
Type: schema.TypeString,
Computed: true,
},
"external_id": {
Description: "If the administrator of the account to which the role belongs provided you with an external ID, then enter that value.",
Type: schema.TypeString,
Computed: true,
},
"duration": {
Description: "The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) to 3600 seconds (1 hour). By default, the value is set to 3600 seconds. An expiration can also be specified in the client request body. The minimum value is 1 hour.",
Type: schema.TypeInt,
Computed: true,
},
},
},
},
},
},
},
},
}
helpers.SetMultiLevelDatasourceSchema(resource.Schema)
return resource
}