Terraform Error Unsupported Block Type When Configuring Auth0 Log Stream

Overview

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.
Applies To
  • Auth0 Terraform Provider

  • Log Streams

Cause

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. 

Solution

To resolve this issue, upgrade the Auth0 Terraform provider to the latest version.

  1. Navigate to the project's root directory containing the Terraform configuration files.

  2. Run the following command to update the provider versions defined in the configuration:
    terraform init -upgrade

  3. After the update completes, run terraform plan to confirm that the pii_config block is now recognized and the error is resolved.

Recommended content

No recommended content found...