terraform-oci-oke
terraform-oci-oke copied to clipboard
OKE module fails with security token authentication.
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
I am running into an error with the oke module when using security token authentication. It fails with valid security token in configured under a profile in ~/.oci/config file.
I have a use-case where I want to use only security token based authentication when creating an OKE cluster with the oke module. Could you review and suggest how to use security token based authentication to use the OKE module ?
Here are the steps to replicate
-
configure the security token using oci authenticate
oci session authenticate --profile-name PROFILE_NAME --region REGION_NAME -
ensure the ~/.oci/config file only has PROFILE_NAME (configured in the previous step). Remove all other profiles.
-
use the PROFILE_NAME in the oci provider configuration
provider "oci" {
tenancy_ocid = "${local.tenancy_ocid}"
region = "${local.region}"
auth = "SecurityToken"
config_file_profile = PROFILE_NAME
}
terraform {
required_providers {
oci = {
source = "oracle/oci"
version = ">=4.67.3"
}
}
required_version = ">= 1.0.0"
}
Terraform Version and Provider Version
$ terraform -version Terraform v1.3.9 on darwin_arm64
- provider registry.terraform.io/hashicorp/cloudinit v2.3.2
- provider registry.terraform.io/hashicorp/time v0.9.1
- provider registry.terraform.io/oracle/oci v4.115.0
Affected Resource(s)
Terraform Configuration Files
# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file.
# Please remove any sensitive information from configuration files before sharing them.
Debug Output
Panic Output
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform apply