-
Notifications
You must be signed in to change notification settings - Fork 730
Description
Hello,
I think this is an issue in oci-go-sdk, but I believe it needs to be tracked here, it can be used as a reference to open an issue there.
We use oracle-terraform-modules/terraform-oci-oke with two set of credentials: plan and apply credentials. The plan credentials can only read resources while the apply can manage them.
This bug means this data block in module-cluster.tf in terraform-oci-oke fails, which cascades into cluster_ca_cert being "none", the cloud-init config to be improperly computed creating undesired changes on the oci_containerengine_node_pool as well as the cluster_ca_cert output to be missing.
I'd be interested to know if there is a way to create an exception in the policy for our plan credentials for that specific call as a workaround.
Details from the debug log:
INFO 2025/11/22 03:50:57.538508 client.go:553: Dump Request POST /20180222/clusters/[redacted]/kubeconfig/content HTTP/1.1
Host: containerengine.us-phoenix-1.oci.oraclecloud.com
User-Agent: Oracle-GoSDK/65.104.0 (go/go1.25.3; linux/amd64; terraform/2.36.1; terraform-cli/1.11.0-beta1) Oracle-TerraformProvider/7.25.0
Content-Length: 31
Accept: */*
Authorization: [REDACTED]
Content-Type: application/json
Date: Sat, 22 Nov 2025 03:50:57 GMT
Opc-Client-Info: Oracle-GoSDK/65.104.0
Opc-Client-Retries: true
Opc-Request-Id: 010c1051dfb0a0dfa98e362e5d1db576
X-Content-Sha256: hXBVwINTczakBYvsF5pdxr8dmJTp4D/StbwftMOpPa4=
Accept-Encoding: gzip
INFO 2025/11/22 03:50:57.538563 log.go:229: Dump Request Body:
{"endpoint":"PRIVATE_ENDPOINT"}
INFO 2025/11/22 03:50:57.538686 client.go:559: Dump Response HTTP/1.1 404 Not Found
Content-Length: 111
Content-Type: application/json
Date: Sat, 22 Nov 2025 03:50:57 GMT
Opc-Request-Id: 010c1051dfb0a0dfa98e362e5d1db576/42FB92035083494D21332169504858B6/4CB19BA87233B16A856D8D897060D733
Strict-Transport-Security: max-age=31536000; includeSubDomains;
{
"code" : "NotAuthorizedOrNotFound",
"message" : "Authorization failed or requested resource not found."
}
cc @hyder