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_action runtime is not supported #286

Closed
5 tasks done
kpettijohn opened this issue Aug 17, 2022 · 3 comments
Closed
5 tasks done

auth0_action runtime is not supported #286

kpettijohn opened this issue Aug 17, 2022 · 3 comments
Labels
🪲 bug Something isn't working

Comments

@kpettijohn
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 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

I seem to be unable to create an action with a node16 runtime.

resource "auth0_action" "test" {
  name    = "Test"
  runtime = "node16"
  supported_triggers {
    id      = "post-login"
    version = "v1"
  }
  code   = <<-EOT
      exports.onContinuePostLogin = async (event, api) => {
          console.log("test");
      };
   EOT
  deploy = false
}

Error response

Error: 400 Bad Request: runtime is not supported

If I use a node12 runtime the action is successfully created.

Expectation

Ability to create auth0 actions using the node16 runtime.

Reproduction

  1. Create a auth0_action using the node16 runtime
  2. Apply Terraform
  3. Error: 400 Bad Request: runtime is not supported

Auth0 Terraform Provider version

0.35.0 and 0.34.0

Terraform version

1.1.8

@kpettijohn kpettijohn added the 🪲 bug Something isn't working label Aug 17, 2022
@willvedd
Copy link
Contributor

You're correct that node16 should be available for actions. I believe the issue here is around the version of the trigger you're binding to, v1:

 supported_triggers {
    id      = "post-login"
    version = "v1"
  }

Version 1 does not support node 16 which should explain the error. Further, versions 1 and 2 of that trigger are deprecated, so I'd recommend trying again with v3 which supports node 16 by default. Hope that helps!

@kpettijohn
Copy link
Author

@willvedd thanks for the clarification! I didn't realize version controlled the available runtimes. Thanks again!

@willvedd
Copy link
Contributor

willvedd commented Sep 9, 2022

@kpettijohn One final followup here – I've pushed a change to an internal repo that adds more context to this exact error. I'm hoping it enables users to rectify themselves. Thanks again for bringing this to our attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants