Kong / terraform-provider-konnect

Terraform Provider for Kong Konnect
https://registry.terraform.io/providers/kong/konnect/latest
29 stars 7 forks source link

Terraform apply wrong changes to konnect_gateway_plugin_openid_connect.openid_connect #88

Closed dascole closed 3 weeks ago

dascole commented 1 month ago

When creating the OIDC plugin with a scopes value of [], the terraform plan/apply commands correctly show the empty scopes, however terraform apply renders the default value of "openid". Confirmed that the Konnect API supports sending in the empty array and leaves the field blank as intended.

Plan

image

This is the only line reference I see to scopes in the debug output:

2024-10-17T16:19:17.270-0400 [DEBUG] provider.terraform-provider-konnect_v1.0.0: Value switched to prior value due to semantic equality logic: @caller=github.com/hashicorp/terraform-plugin-framework@v1.10.0/internal/fwschemadata/value_semantic_equality.go:91 @module=sdk.framework tf_resource_type=konnect_gateway_plugin_openid_connect tf_attribute_path=config.scopes tf_provider_addr=registry.terraform.io/kong/konnect tf_req_id=7498ec00-b010-d75b-2ade-942585a749f2 tf_rpc=ApplyResourceChange timestamp=2024-10-17T16:19:17.270-0400

oidc.txt

dascole commented 1 month ago

This has become particularly problematic when configuring the plugin to use the client credentials grant where a scope of 'openid' cannot be used

mheap commented 3 weeks ago

This is fixed in #99, which will go out today or tomorrow

mheap commented 3 weeks ago

This is released as 2.0.0 as it's a breaking change