Skip to content

Commit b418362

Browse files
committed
feat: add option for provider specific proxy
1 parent 48a2c4c commit b418362

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

kubernetes/provider.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ func Provider() *schema.Provider {
134134
},
135135
Description: "",
136136
},
137+
"bastion_host": {
138+
Type: schema.TypeString,
139+
Optional: true,
140+
Description: "URL to the proxy to be used for all requests",
141+
},
137142
},
138143

139144
DataSourcesMap: map[string]*schema.Resource{
@@ -436,6 +441,10 @@ func initializeConfiguration(d *schema.ResourceData) (*restclient.Config, error)
436441
overrides.AuthInfo.Exec = exec
437442
}
438443

444+
if v, ok := d.GetOk("bastion_host"); ok {
445+
overrides.ClusterDefaults.ProxyURL = v.(string)
446+
}
447+
439448
cc := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loader, overrides)
440449
cfg, err := cc.ClientConfig()
441450
if err != nil {

0 commit comments

Comments
 (0)