Terraform Error Unsupported Block Type When Configuring Auth0 Log Stream
This article addresses the following error that occurs when attempting to configure a Personally Identifiable Information (PII) block for an auth0_log_stream resource using the Auth0 Terraform provider:
Error: Unsupported block type
Blocks of type "pii_config" are not expected here.-
Auth0 Terraform Provider
-
Log Streams
The error occurs because the version of the Auth0 Terraform provider in use does not support the pii_config block for the auth0_log_stream resource. This feature was introduced in 1.26.0 version of the provider. Terraform returns this error when it encounters a configuration block that is not defined in the schema of the provider version being used.
The "Error: Unsupported block type" is a generic error that can occur with other features as well. The underlying cause is often the use of an older version of the Auth0 Terraform provider, which lacks support for new features added in later versions of the Auth0 Terraform provider.
To resolve this issue, upgrade the Auth0 Terraform provider to the latest version.
-
Navigate to the project's root directory containing the Terraform configuration files.
-
Run the following command to update the provider versions defined in the configuration:
terraform init -upgrade -
After the update completes, run
terraform planto confirm that thepii_configblock is now recognized and the error is resolved.