Skip to content

Commit c551103

Browse files
committed
route docs
1 parent 3844686 commit c551103

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

internal/provider/route.go

+25-25
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ func (r *RouteResource) Schema(_ context.Context, _ resource.SchemaRequest, resp
5757
Required: true,
5858
},
5959
"from": schema.StringAttribute{
60-
Description: "From URL.",
60+
Description: "The external URL for a proxied request. Must contain a scheme and Hostname, must not contain a path.",
6161
Required: true,
6262
},
6363
"to": schema.SetAttribute{
6464
ElementType: types.StringType,
65-
Description: "To URLs.",
65+
Description: "The destination(s) of a proxied request. Must contain a scheme and Hostname, with an optional weight.",
6666
Required: true,
6767
},
6868
"namespace_id": schema.StringAttribute{
@@ -80,75 +80,75 @@ func (r *RouteResource) Schema(_ context.Context, _ resource.SchemaRequest, resp
8080
Computed: true,
8181
},
8282
"prefix": schema.StringAttribute{
83-
Description: "Prefix.",
83+
Description: "Matches incoming requests with a path that begins with the specified prefix.",
8484
Optional: true,
8585
},
8686
"path": schema.StringAttribute{
87-
Description: "Path.",
87+
Description: "Matches incoming requests with a path that is an exact match for the specified path.",
8888
Optional: true,
8989
},
9090
"regex": schema.StringAttribute{
91-
Description: "Regex.",
91+
Description: "Matches incoming requests with a path that matches the specified regular expression.",
9292
Optional: true,
9393
},
9494
"prefix_rewrite": schema.StringAttribute{
95-
Description: "Prefix rewrite.",
95+
Description: "While forwarding a request, Prefix Rewrite swaps the matched prefix (or path) with the specified value.",
9696
Optional: true,
9797
},
9898
"regex_rewrite_pattern": schema.StringAttribute{
99-
Description: "Regex rewrite pattern.",
99+
Description: "Rewrites the URL path according to the regex rewrite pattern.",
100100
Optional: true,
101101
},
102102
"regex_rewrite_substitution": schema.StringAttribute{
103-
Description: "Regex rewrite substitution.",
103+
Description: "Rewrites the URL path according to the regex rewrite substitution.",
104104
Optional: true,
105105
},
106106
"host_rewrite": schema.StringAttribute{
107-
Description: "Host rewrite.",
107+
Description: "Rewrites the Host header to a new literal value.",
108108
Optional: true,
109109
},
110110
"host_rewrite_header": schema.StringAttribute{
111-
Description: "Host rewrite header.",
111+
Description: "Rewrites the Host header to match an incoming header value.",
112112
Optional: true,
113113
},
114114
"host_path_regex_rewrite_pattern": schema.StringAttribute{
115-
Description: "Host path regex rewrite pattern.",
115+
Description: "Rewrites the Host header according to a regular expression matching the path.",
116116
Optional: true,
117117
},
118118
"host_path_regex_rewrite_substitution": schema.StringAttribute{
119-
Description: "Host path regex rewrite substitution.",
119+
Description: "Rewrites the Host header according to a regular expression matching the substitution.",
120120
Optional: true,
121121
},
122122
"regex_priority_order": schema.Int64Attribute{
123123
Description: "Regex priority order.",
124124
Optional: true,
125125
},
126126
"timeout": schema.StringAttribute{
127-
Description: "Timeout.",
127+
Description: "Sets the per-route timeout value. Cannot exceed global timeout values. Defaults to 30 seconds.",
128128
Optional: true,
129129
CustomType: timetypes.GoDurationType{},
130130
Computed: true,
131131
},
132132
"idle_timeout": schema.StringAttribute{
133-
Description: "Idle timeout.",
133+
Description: "Sets the time to terminate the upstream connection if there are no active streams. Defaults to 5 minutes.",
134134
Optional: true,
135135
CustomType: timetypes.GoDurationType{},
136136
Computed: true,
137137
},
138138
"allow_websockets": schema.BoolAttribute{
139-
Description: "Allow websockets.",
139+
Description: "If applied, this setting enables Pomerium to proxy websocket connections.",
140140
Optional: true,
141141
},
142142
"allow_spdy": schema.BoolAttribute{
143-
Description: "Allow SPDY.",
143+
Description: "If applied, this setting enables Pomerium to proxy SPDY protocol upgrades.",
144144
Optional: true,
145145
},
146146
"tls_skip_verify": schema.BoolAttribute{
147-
Description: "TLS skip verify.",
147+
Description: "If applied, Pomerium accepts any certificate presented by the upstream server and any Hostname in that certificate. Use for testing only.",
148148
Optional: true,
149149
},
150150
"tls_upstream_server_name": schema.StringAttribute{
151-
Description: "TLS upstream server name.",
151+
Description: "This server name overrides the Hostname in the 'To:' field, and will be used to verify the certificate name.",
152152
Optional: true,
153153
},
154154
"tls_downstream_server_name": schema.StringAttribute{
@@ -161,25 +161,25 @@ func (r *RouteResource) Schema(_ context.Context, _ resource.SchemaRequest, resp
161161
},
162162
"set_request_headers": schema.MapAttribute{
163163
ElementType: types.StringType,
164-
Description: "Set request headers.",
164+
Description: "Sets static and dynamic values for given request headers. Available substitutions: ${pomerium.id_token}, ${pomerium.access_token}, ${pomerium.client_cert_fingerprint}.",
165165
Optional: true,
166166
},
167167
"remove_request_headers": schema.SetAttribute{
168168
ElementType: types.StringType,
169-
Description: "Remove request headers.",
169+
Description: "Removes given request headers so they do not reach the upstream server.",
170170
Optional: true,
171171
},
172172
"set_response_headers": schema.MapAttribute{
173173
ElementType: types.StringType,
174-
Description: "Set response headers.",
174+
Description: "Sets static HTTP Response Header values for a route. These headers take precedence over globally set response headers.",
175175
Optional: true,
176176
},
177177
"preserve_host_header": schema.BoolAttribute{
178-
Description: "Preserve host header.",
178+
Description: "Passes the host header from the incoming request to the proxied host, instead of the destination hostname.",
179179
Optional: true,
180180
},
181181
"pass_identity_headers": schema.BoolAttribute{
182-
Description: "Pass identity headers.",
182+
Description: "If applied, passes X-Pomerium-Jwt-Assertion header and JWT Claims Headers to the upstream application.",
183183
Optional: true,
184184
},
185185
"kubernetes_service_account_token": schema.StringAttribute{
@@ -195,7 +195,7 @@ func (r *RouteResource) Schema(_ context.Context, _ resource.SchemaRequest, resp
195195
Optional: true,
196196
},
197197
"show_error_details": schema.BoolAttribute{
198-
Description: "Show error details.",
198+
Description: "If applied, shows error details, including policy explanation and remediation for 403 Forbidden responses.",
199199
Optional: true,
200200
Computed: true,
201201
},
@@ -208,7 +208,7 @@ func (r *RouteResource) Schema(_ context.Context, _ resource.SchemaRequest, resp
208208
},
209209
},
210210
"rewrite_response_headers": schema.SetNestedAttribute{
211-
Description: "Response header rewrite rules.",
211+
Description: "Modifies response headers before they are returned to the client. 'Header' matches the HTTP header name; 'prefix' will be replaced with 'value'.",
212212
Optional: true,
213213
NestedObject: schema.NestedAttributeObject{
214214
Attributes: map[string]schema.Attribute{

0 commit comments

Comments
 (0)