Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auth0 terraform generate should use null instead of {} for empty encryption_key property of auth0_client resources #1001

Open
6 tasks done
bugfloyd opened this issue May 16, 2024 · 0 comments
Labels
bug This points to a verified bug in the code

Comments

@bugfloyd
Copy link

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this project and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

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

  1. Create a sample application using the Auth0 console with the bare minimum information.
  2. Use the CLI to generate Terraform configuration for that application.
  3. Attempt to deploy the generated resource by running terraform plan.

Auth0 CLI version

1.4.0

@bugfloyd bugfloyd added the bug This points to a verified bug in the code label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

1 participant