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: secrets are not getting added while new/update action call #52

Closed
sergiught opened this issue Feb 21, 2022 · 0 comments · Fixed by #248
Closed

auth0_action: secrets are not getting added while new/update action call #52

sergiught opened this issue Feb 21, 2022 · 0 comments · Fixed by #248
Assignees
Labels
🪲 bug Something isn't working resource/auth0_action

Comments

@sergiught
Copy link
Contributor

From terraform-provider-auth0 created by RishikeshDarandale: alexkappa/terraform-provider-auth0#477

Description

auth0_action secrets most probably do not support the update/delete of existing secrets. But, adding new is supported and this functionality is not working at this moment with resource auth0_action.

Terraform Version

Terraform v1.0.11
on linux_amd64
+ provider registry.terraform.io/alexkappa/auth0 v0.24.2
+ provider registry.terraform.io/hashicorp/local v2.0.0

Affected Resource(s)

  • auth0_action

Terraform Configuration Files

resource "auth0_action" "test-action" {
  name = "test"
  supported_triggers {
    id      = "pre-user-registration"
    version = "v2"
  }

  code    = file("test.js")
  runtime = "node16"

  dependencies {
    name    = "Dep1"
    version = "v1"
  }
  dependencies {
    name    = "Dep2"
    version = "v2"
  }

  secrets {
    name  = "SOME_KEY"
     value = "SOME_VALUE"
  }

  deploy = true
}

Expected Behavior

  • terraform import should get the secret key read into the state file
  • terraform apply should add the new secret to the action

Use Cases

  • import existing action having one secret
  • create a new action with one secret
  • update a existing action to add a new secret

Note: In all cases, terraform (internally auth0 mgmt API) should not be deleting/updating existing secrets.

Above observation is based on the events that were recorded #470 as below.

  • Import action resource with secret and code does not have secret
  • later resource has secret added, shown in plan;
  • PATCH api body does not have secret added.
  • PATCH call successful
  • The existing secret is still there, thus above observation holds true.

Actual Behavior

  • terraform import is not importing the secret with only key into terraform state
  • terraform apply is not passing the new secrets to HTTP PATCH call for action update.

Steps to Reproduce

  1. terraform apply

Debug Output

Please refer #470 and #472 for more debug details!

Panic Output

Important Factoids

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working resource/auth0_action
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant