Open alfredkrohmer opened 4 weeks ago
Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.
I just noticed that this error seems to pop up for any change to the cluster that Terraform wants to perform once OIDC authentication is enabled. I get the exact same error if Terraform is trying to perform the following change on a cluster where OIDC authentication is enabled:
# oci_containerengine_cluster.main will be updated in-place
~ resource "oci_containerengine_cluster" "main" {
id = "ocid1.cluster.oc1.eu-frankfurt-1.aaaaaaaao...redacted..."
name = "...redacted..."
# (10 unchanged attributes hidden)
~ options {
# (1 unchanged attribute hidden)
+ open_id_connect_discovery {
+ is_open_id_connect_discovery_enabled = true
}
# (6 unchanged blocks hidden)
}
# (3 unchanged blocks hidden)
}
Error:
2024-10-24 10:16:28,972 INFO Applying plan
Acquiring state lock. This may take a few moments...
oci_containerengine_cluster.main: Modifying... [id=ocid1.cluster.oc1.eu-frankfurt-1.aaaaaaaa...redacted...]
╷
│ Error: 400-InvalidParameter, Invalid OidcAuthnConfig.CaCertificate: Certificate processing error. Possibly invalid certificate data.
│ Suggestion: Please update the parameter(s) in the Terraform config as per error message Invalid OidcAuthnConfig.CaCertificate: Certificate processing error. Possibly invalid certificate data.
│ Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/containerengine_cluster
│ API Reference:
│ Request Target: PUT https://containerengine.eu-frankfurt-1.oci.oraclecloud.com/20180222/clusters/ocid1.cluster.oc1.eu-frankfurt-1.aaaaaaaa...redacted...
│ Provider version: 6.14.0, released on 2024-10-20.
│ Service: Containerengine Cluster
│ Operation Name: UpdateCluster
│ OPC request ID: ...redacted...
│
│
│ with oci_containerengine_cluster.main,
│ on oke-cluster.tf line 1, in resource "oci_containerengine_cluster" "main":
│ 1: resource "oci_containerengine_cluster" "main" {
│
╵
Note: options.open_id_connect_token_authentication_config.ca_certificate
is not set in the Terraform config as we use IDPs with certificates signed by recognized CAs.
This issue is fixed. Thanks for reporting it.
I'm trying to change the OIDC auth config on an enhanced OKE cluster that already has it enabled, more specifically I'm trying to switch to a different OIDC issuer and a different client ID.
This results in the following error:
However, if I put the following into a file
options.json
:The following command succeeds and does the expected change:
Hence this looks like a bug in the Terraform provider.
Community Note
Terraform Version and Provider Version
Affected Resource(s)
oci_containerengine_cluster
Terraform Configuration Files
This the corresponding block in the
oci_containerengine_cluster
resource definition:Debug Output
Panic Output
Expected Behavior
Terraform should have update the OIDC auth parameters.
Actual Behavior
An error occurred.
Steps to Reproduce
terraform apply
Important Factoids
References