Skip to content

Commit 95c1df6

Browse files
authored
fix idp_access_token_allowed_audiences type (#41)
1. fix schema for `idp_access_token_allowed_audiences` to match underlying types. 2. regenerate the docs
1 parent c9f71b3 commit 95c1df6

File tree

8 files changed

+15
-3
lines changed

8 files changed

+15
-3
lines changed

docs/data-sources/route.md

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Route data source
2828

2929
- `allow_spdy` (Boolean) Allow SPDY.
3030
- `allow_websockets` (Boolean) Allow websockets.
31+
- `bearer_token_format` (String) Bearer token format.
3132
- `description` (String) Description of the route.
3233
- `enable_google_cloud_serverless_authentication` (Boolean) Enable Google Cloud serverless authentication.
3334
- `from` (String) From URL.
@@ -36,6 +37,7 @@ Route data source
3637
- `host_rewrite` (String) Host rewrite.
3738
- `host_rewrite_header` (String) Host rewrite header.
3839
- `idle_timeout` (String) Idle timeout.
40+
- `idp_access_token_allowed_audiences` (Set of String) IDP access token allowed audiences.
3941
- `idp_client_id` (String) IDP client ID.
4042
- `idp_client_secret` (String) IDP client secret.
4143
- `kubernetes_service_account_token` (String) Kubernetes service account token.

docs/data-sources/routes.md

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Read-Only:
4040

4141
- `allow_spdy` (Boolean) Allow SPDY.
4242
- `allow_websockets` (Boolean) Allow websockets.
43+
- `bearer_token_format` (String) Bearer token format.
4344
- `description` (String) Description of the route.
4445
- `enable_google_cloud_serverless_authentication` (Boolean) Enable Google Cloud serverless authentication.
4546
- `from` (String) From URL.
@@ -49,6 +50,7 @@ Read-Only:
4950
- `host_rewrite_header` (String) Host rewrite header.
5051
- `id` (String) Unique identifier for the route.
5152
- `idle_timeout` (String) Idle timeout.
53+
- `idp_access_token_allowed_audiences` (Set of String) IDP access token allowed audiences.
5254
- `idp_client_id` (String) IDP client ID.
5355
- `idp_client_secret` (String) IDP client secret.
5456
- `kubernetes_service_account_token` (String) Kubernetes service account token.

docs/resources/route.md

+2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ Route for Pomerium.
2626

2727
- `allow_spdy` (Boolean) If applied, this setting enables Pomerium to proxy SPDY protocol upgrades.
2828
- `allow_websockets` (Boolean) If applied, this setting enables Pomerium to proxy websocket connections.
29+
- `bearer_token_format` (String) Bearer token format.
2930
- `description` (String) Description of the route.
3031
- `enable_google_cloud_serverless_authentication` (Boolean) Enable Google Cloud serverless authentication.
3132
- `host_path_regex_rewrite_pattern` (String) Rewrites the Host header according to a regular expression matching the path.
3233
- `host_path_regex_rewrite_substitution` (String) Rewrites the Host header according to a regular expression matching the substitution.
3334
- `host_rewrite` (String) Rewrites the Host header to a new literal value.
3435
- `host_rewrite_header` (String) Rewrites the Host header to match an incoming header value.
3536
- `idle_timeout` (String) Sets the time to terminate the upstream connection if there are no active streams. Defaults to 5 minutes.
37+
- `idp_access_token_allowed_audiences` (Set of String) IDP access token allowed audiences.
3638
- `idp_client_id` (String) IDP client ID.
3739
- `idp_client_secret` (String) IDP client secret.
3840
- `jwt_groups_filter` (Attributes) JWT Groups Filter (see [below for nested schema](#nestedatt--jwt_groups_filter))

docs/resources/settings.md

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ The settings are global object.
3030
- `autocert_dir` (String) Autocert directory is the path which Autocert will store x509 certificate data.
3131
- `autocert_must_staple` (Boolean) Controls whether the must-staple flag is enabled when requesting certificates.
3232
- `autocert_use_staging` (Boolean) Autocert Use Staging setting allows you to use Let's Encrypt's staging environment, which has more lenient usage limits than the production environment.
33+
- `bearer_token_format` (String) Bearer token format.
3334
- `cache_service_url` (String) Cache service URL
3435
- `certificate_authority` (String) Certificate authority
3536
- `certificate_authority_file` (String) Certificate authority file
@@ -66,6 +67,7 @@ The settings are global object.
6667
- `identity_provider_ping` (Attributes) Ping directory sync options (see [below for nested schema](#nestedatt--identity_provider_ping))
6768
- `identity_provider_refresh_interval` (String) Identity provider refresh interval
6869
- `identity_provider_refresh_timeout` (String) Identity provider refresh timeout
70+
- `idp_access_token_allowed_audiences` (Set of String) IDP access token allowed audiences.
6971
- `idp_client_id` (String) IDP client ID
7072
- `idp_client_secret` (String, Sensitive) IDP client secret
7173
- `idp_provider` (String) IDP provider

example/main.tf

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ resource "pomerium_settings" "settings" {
5656
jwt_groups_filter = {
5757
groups = ["id1", "id2"]
5858
}
59+
60+
idp_access_token_allowed_audiences = ["aud1", "aud2"]
5961
}
6062

6163
resource "pomerium_service_account" "test_sa" {
@@ -141,6 +143,8 @@ resource "pomerium_route" "prefix_route" {
141143
allow_websockets = true
142144
preserve_host_header = true
143145
pass_identity_headers = true
146+
147+
idp_access_token_allowed_audiences = ["aud3", "aud4"]
144148
}
145149

146150
# Example route with path matching

internal/provider/route.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ func (r *RouteResource) Schema(_ context.Context, _ resource.SchemaRequest, resp
261261
stringvalidator.OneOf("default", "idp_access_token", "idp_identity_token"),
262262
},
263263
},
264-
"idp_access_token_allowed_audiences": schema.ListAttribute{
264+
"idp_access_token_allowed_audiences": schema.SetAttribute{
265265
Description: "IDP access token allowed audiences.",
266266
Optional: true,
267267
ElementType: types.StringType,

internal/provider/route_data_source.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ func getRouteDataSourceAttributes(idRequired bool) map[string]schema.Attribute {
224224
Description: "Bearer token format.",
225225
Computed: true,
226226
},
227-
"idp_access_token_allowed_audiences": schema.ListAttribute{
227+
"idp_access_token_allowed_audiences": schema.SetAttribute{
228228
Description: "IDP access token allowed audiences.",
229229
Computed: true,
230230
ElementType: types.StringType,

internal/provider/settings_schema.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ var SettingsResourceSchema = schema.Schema{
457457
stringvalidator.OneOf("default", "idp_access_token", "idp_identity_token"),
458458
},
459459
},
460-
"idp_access_token_allowed_audiences": schema.ListAttribute{
460+
"idp_access_token_allowed_audiences": schema.SetAttribute{
461461
Description: "IDP access token allowed audiences.",
462462
Optional: true,
463463
ElementType: types.StringType,

0 commit comments

Comments
 (0)