Skip to content

Commit

Permalink
Add support for GRPCWebRootPath ArgoCD ApiClient ClientOption (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
fvdnabee authored May 20, 2021
1 parent 4bd78ea commit 4c3ad41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions argocd/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ func Provider() terraform.ResourceProvider {
Type: schema.TypeBool,
Optional: true,
},
"grpc_web_root_path": {
Type: schema.TypeString,
Optional: true,
},
"port_forward": {
Type: schema.TypeBool,
Optional: true,
Expand Down Expand Up @@ -219,6 +223,9 @@ func initApiClient(d *schema.ResourceData) (
if v, ok := d.GetOk("grpc_web"); ok {
opts.GRPCWeb = v.(bool)
}
if v, ok := d.GetOk("grpc_web_root_path"); ok {
opts.GRPCWebRootPath = v.(string)
}
if v, ok := d.GetOk("port_forward"); ok {
opts.PortForward = v.(bool)
}
Expand Down
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ provider "argocd" {
* `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)
* `grpc_web` - (Optional) Whether to use gRPC web proxy client.
* `grpc_web` - (Optional) Whether to use gRPC web proxy client. Useful if Argo CD server is behind proxy which does not support HTTP2.
* `grpc_web_root_path` - (Optional) Use the gRPC web proxy client and set the web root, e.g. `argo-cd`. Useful if the Argo CD server is behind a proxy at a non-root path.
* `port_forward` - (Optional)
* `port_forward_with_namespace` - (Optional)
* `headers` - (Optional) Additional headers to add to each request to the ArgoCD server.
Expand Down

0 comments on commit 4c3ad41

Please sign in to comment.