<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
System Status
Announcements
Announcements
Search
Search
Select Language

Capture Debug Logs From Terraform for the Okta Terraform Provider

Okta Classic Engine
Okta Identity Engine
SDKs & Libraries

Overview

Administrators troubleshooting the Okta Terraform Provider must capture debug logs to view the specific events and API calls made to Okta. Prepend the Terraform command with the debug log variables to generate a local log file.

Applies To

  • Okta Identity Engine (OIE)
  • Okta Classic Engine
  • Okta Terraform Provider

Solution

How do administrators capture debug logs from Terraform?

Prepend the Terraform command with the debug log variables and specify a destination file to capture the debug logs.

  1. Enter TF_LOG=debug TF_LOG_PATH="<FILENAME>" in front of the Terraform command, replacing <FILENAME> with the desired destination file.
  2. Run the command to append the logs to the specified file.

 

Review the following examples of Terraform commands with the debug variables prepended.

TF_LOG=debug TF_LOG_PATH="terraform.txt" terraform plan
TF_LOG=debug TF_LOG_PATH="terraform.txt" terraform apply

Running these commands generates a terraform.txt file containing the debug logs for the plan command followed by the apply command.

 

NOTE: Terraform debug logs contain sensitive information such as API (SSWS) tokens or access tokens. Redact this information before uploading the file to the Okta Support Portal.

 

Loading
Capture Debug Logs From Terraform for the Okta Terraform Provider | Okta Support