Skip to content

Commit 408af72

Browse files
Add option to pass Client Certificate and Key (#187)
* Add option to pass Client Certificate and Key * update darwin build * remote extra test * Revert "remote extra test" This reverts commit 98d15c2.
1 parent 1917df8 commit 408af72

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

GNUmakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ windows: fmtcheck
2525
darwin: fmtcheck
2626
@mkdir -p bin/
2727
GOOS=darwin GOARCH=amd64 go build -v -o bin/$(BINARY)_$(VERSION)_darwin_amd64
28-
GOOS=darwin GOARCH=386 go build -v -o bin/$(BINARY)_$(VERSION)_darwin_x86
28+
GOOS=darwin GOARCH=arm64 go build -v -o bin/$(BINARY)_$(VERSION)_darwin_arm64
2929

3030
freebsd: fmtcheck
3131
@mkdir -p bin/

argocd/provider.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ func Provider() *schema.Provider {
8686
Type: schema.TypeString,
8787
Optional: true,
8888
},
89+
"client_cert_file": {
90+
Type: schema.TypeString,
91+
Optional: true,
92+
},
93+
"client_cert_key": {
94+
Type: schema.TypeString,
95+
Optional: true,
96+
},
8997
"plain_text": {
9098
Type: schema.TypeBool,
9199
Optional: true,
@@ -203,6 +211,12 @@ func initApiClient(d *schema.ResourceData) (
203211
if v, ok := d.GetOk("cert_file"); ok {
204212
opts.CertFile = v.(string)
205213
}
214+
if v, ok := d.GetOk("client_cert_file"); ok {
215+
opts.ClientCertFile = v.(string)
216+
}
217+
if v, ok := d.GetOk("client_cert_key"); ok {
218+
opts.ClientCertKeyFile = v.(string)
219+
}
206220
if v, ok := d.GetOk("context"); ok {
207221
opts.Context = v.(string)
208222
}

docs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ provider "argocd" {
2222
* `username` - (Optional) authentication username. Can be set through the `ARGOCD_AUTH_USERNAME` environment variable.
2323
* `password` - (Optional) authentication password. Can be set through the `ARGOCD_AUTH_PASSWORD` environment variable.
2424
* `cert_file` - (Optional) Additional root CA certificates file to add to the client TLS connection pool.
25+
* `client_cert_file` - (Optional) Client Certificate.
26+
* `client_cert_key` - (Optional) Client Certificate Key.
2527
* `plain_text` - (Optional) Boolean, whether to initiate an unencrypted connection to ArgoCD server.
2628
* `context` - (Optional) Kubernetes context to load from an existing `.kube/config` file. Can be set through `ARGOCD_CONTEXT` environment variable.
2729
* `user_agent` - (Optional)

0 commit comments

Comments
 (0)