terraform-provider-vcd icon indicating copy to clipboard operation
terraform-provider-vcd copied to clipboard

Add OIDC support

Open adambarreiro opened this issue 9 months ago • 0 comments

Overview

Closes #827

This PR adds a new resource and data source vcd_org_oidc, that allow to configure OpenID Connect for a given Organization in VCD.

Details

Most of the arguments are Optional+Computed, the reason being the wellknown_endpoint, that can "auto-configure" OIDC, making all arguments computed. On the other hand, if wellknown_endpoint is not informed, these arguments will be required (this is achieved with AtLeastOneOf).

The Optional+Computed combination makes things work, but it causes some quirks when one wants to override a configuration entry that was provided by the wellknown_endpoint. This quirk is explained in the documentation, so it's easy to avoid.

This PR must be tested on several VCD versions as it has arguments that are introduced in 10.4.1 and 10.5.1.

Testing

Tests require two new configuration entries that correspond to a running OIDC server.

Tested on VCD 10.5.1 and 10.4.0

adambarreiro avatar May 07 '24 13:05 adambarreiro