vmware / terraform-provider-vcd

Terraform VMware Cloud Director provider
https://www.terraform.io/docs/providers/vcd/
Mozilla Public License 2.0
151 stars 112 forks source link

Add OIDC support #1263

Closed adambarreiro closed 6 months ago

adambarreiro commented 6 months ago

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