Skip to content

Commit 4c3ad41

Browse files
authored
Add support for GRPCWebRootPath ArgoCD ApiClient ClientOption (argoproj-labs#79)
1 parent 4bd78ea commit 4c3ad41

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

argocd/provider.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ func Provider() terraform.ResourceProvider {
8989
Type: schema.TypeBool,
9090
Optional: true,
9191
},
92+
"grpc_web_root_path": {
93+
Type: schema.TypeString,
94+
Optional: true,
95+
},
9296
"port_forward": {
9397
Type: schema.TypeBool,
9498
Optional: true,
@@ -219,6 +223,9 @@ func initApiClient(d *schema.ResourceData) (
219223
if v, ok := d.GetOk("grpc_web"); ok {
220224
opts.GRPCWeb = v.(bool)
221225
}
226+
if v, ok := d.GetOk("grpc_web_root_path"); ok {
227+
opts.GRPCWebRootPath = v.(string)
228+
}
222229
if v, ok := d.GetOk("port_forward"); ok {
223230
opts.PortForward = v.(bool)
224231
}

docs/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ provider "argocd" {
2121
* `plain_text` - (Optional) Boolean, whether to initiate an unencrypted connection to ArgoCD server.
2222
* `context` - (Optional) Kubernetes context to load from an existing `.kube/config` file. Can be set through `ARGOCD_CONTEXT` environment variable.
2323
* `user_agent` - (Optional)
24-
* `grpc_web` - (Optional) Whether to use gRPC web proxy client.
24+
* `grpc_web` - (Optional) Whether to use gRPC web proxy client. Useful if Argo CD server is behind proxy which does not support HTTP2.
25+
* `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.
2526
* `port_forward` - (Optional)
2627
* `port_forward_with_namespace` - (Optional)
2728
* `headers` - (Optional) Additional headers to add to each request to the ArgoCD server.

0 commit comments

Comments
 (0)