When generating Terraform configuration from an existing tenant using auth0 terraform generate, if a client application lacks an encryption_key, the generated code sets the value to {}. This prevents deployment, causing the following error:
│ Error: 400 Bad Request: Payload validation error: 'Too few properties defined (0), minimum 1' on property encryption_key (Encryption used for WsFed responses with this client).
│
│ with auth0_client.example_app,
│ on clients.tf line 1, in resource "auth0_client" "example_app":
│ 1: resource "auth0_client" "example_app" {
Expectation
I expect to be able to plan and apply the generated Terraform resources on an empty tenant. However, the above error is blocking this process. A potential workaround is to use null for the encryption_key property instead of {} when it is empty for an application.
Reproduction
Create a sample application using the Auth0 console with the bare minimum information.
Use the CLI to generate Terraform configuration for that application.
Attempt to deploy the generated resource by running terraform plan.
Checklist
Description
When generating Terraform configuration from an existing tenant using
auth0 terraform generate
, if a client application lacks anencryption_key
, the generated code sets the value to{}
. This prevents deployment, causing the following error:Expectation
I expect to be able to plan and apply the generated Terraform resources on an empty tenant. However, the above error is blocking this process. A potential workaround is to use
null
for theencryption_key
property instead of{}
when it is empty for an application.Reproduction
Auth0 CLI version
1.4.0