diff --git a/GNUmakefile b/GNUmakefile index c6910e05..6dce6db7 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -25,7 +25,7 @@ windows: fmtcheck darwin: fmtcheck @mkdir -p bin/ GOOS=darwin GOARCH=amd64 go build -v -o bin/$(BINARY)_$(VERSION)_darwin_amd64 - GOOS=darwin GOARCH=386 go build -v -o bin/$(BINARY)_$(VERSION)_darwin_x86 + GOOS=darwin GOARCH=arm64 go build -v -o bin/$(BINARY)_$(VERSION)_darwin_arm64 freebsd: fmtcheck @mkdir -p bin/ diff --git a/argocd/provider.go b/argocd/provider.go index 3a061d89..8cd536df 100644 --- a/argocd/provider.go +++ b/argocd/provider.go @@ -86,6 +86,14 @@ func Provider() *schema.Provider { Type: schema.TypeString, Optional: true, }, + "client_cert_file": { + Type: schema.TypeString, + Optional: true, + }, + "client_cert_key": { + Type: schema.TypeString, + Optional: true, + }, "plain_text": { Type: schema.TypeBool, Optional: true, @@ -203,6 +211,12 @@ func initApiClient(d *schema.ResourceData) ( if v, ok := d.GetOk("cert_file"); ok { opts.CertFile = v.(string) } + if v, ok := d.GetOk("client_cert_file"); ok { + opts.ClientCertFile = v.(string) + } + if v, ok := d.GetOk("client_cert_key"); ok { + opts.ClientCertKeyFile = v.(string) + } if v, ok := d.GetOk("context"); ok { opts.Context = v.(string) } diff --git a/docs/index.md b/docs/index.md index b0ac114c..61b8e3a8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -22,6 +22,8 @@ provider "argocd" { * `username` - (Optional) authentication username. Can be set through the `ARGOCD_AUTH_USERNAME` environment variable. * `password` - (Optional) authentication password. Can be set through the `ARGOCD_AUTH_PASSWORD` environment variable. * `cert_file` - (Optional) Additional root CA certificates file to add to the client TLS connection pool. +* `client_cert_file` - (Optional) Client Certificate. +* `client_cert_key` - (Optional) Client Certificate Key. * `plain_text` - (Optional) Boolean, whether to initiate an unencrypted connection to ArgoCD server. * `context` - (Optional) Kubernetes context to load from an existing `.kube/config` file. Can be set through `ARGOCD_CONTEXT` environment variable. * `user_agent` - (Optional)