-
Notifications
You must be signed in to change notification settings - Fork 89
/
schema_repository_credentials.go
46 lines (44 loc) · 1.27 KB
/
schema_repository_credentials.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 argocd
import (
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
func repositoryCredentialsSchema() map[string]*schema.Schema {
return map[string]*schema.Schema{
"url": {
Type: schema.TypeString,
Description: "URL is the URL that these credentials matches to",
Required: true,
},
"username": {
Type: schema.TypeString,
Description: "Username for authenticating at the repo server",
Optional: true,
},
"password": {
Type: schema.TypeString,
Sensitive: true,
Description: "Password for authenticating at the repo server",
Optional: true,
},
"ssh_private_key": {
Type: schema.TypeString,
Sensitive: true,
Description: "SSH private key data for authenticating at the repo server only for Git repos",
ValidateFunc: validateSSHPrivateKey,
Optional: true,
},
"tls_client_cert_data": {
Type: schema.TypeString,
Description: "TLS client cert data for authenticating at the repo server",
// TODO: add a validator
Optional: true,
},
"tls_client_cert_key": {
Type: schema.TypeString,
Sensitive: true,
Description: "TLS client cert key for authenticating at the repo server ",
// TODO: add a validator
Optional: true,
},
}
}