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

Updates to an Autopilot Assistant Task's actions don't appear to be applied #92

Open
stephenhand opened this issue Feb 9, 2022 · 5 comments
Labels
type: bug bug in the library

Comments

@stephenhand
Copy link

Issue Summary

When creating a new Autopilot Task for a bot, the data appears to be populated from the Terrafrom twilio_autopilot_assistants_tasks_v1 resource correctly, but subsequent updates don't seem to be applied

In my case, I was attempting to update the URI of a redirect action. The URI in the JSON was set as uri: "${var.serverless_url}/autopilotRedirect"

Initially var.serverless_url was blank, so the URI property was set to /autopilotRedirect in Twilio console, as you would expect.

But the var.serverless_url was populated and terraform apply was ran again. The change was detected and reported as an update that would be applied, but after the apply was run, whilst the state was updated, the URI in Twilio Console still read /autopilotRedirect

I tried changing some of the static JSON in the URI value, just to see if it was because only a variable had changed, but same result, the change was detected and applied to the state, but no change in the Twilio Console.

Steps to Reproduce

  1. Create an Autopilot Assistant Task resource with a redirect action defined
  2. Run terraform apply - the new task should be added to the state and created on the Twilio account as expected
  3. Change the URI of the redirect in the resource's action attribute's JSON.
  4. Run terraform apply again

Expected Result:

The updated task is detected and updated in the state and set to the updated URI on the Twilio account.

Actual Result

The updated task is detected and updated in the state, but the URI in Twilio Console is still the one the task was initially created with.

Code Snippet

resource "twilio_autopilot_assistants_tasks_v1" "redirect_function" {
  unique_name = "redirect_function"
  assistant_sid = twilio_autopilot_assistants_v1.pre_survey.sid
  actions = jsonencode({
    "actions" : [
      {
        "redirect" : {
          "method" : "POST",
          "uri" : "${var.serverless_url}/autopilotRedirect"
        }
      }
    ]
  })
}

Technical details:

  • terraform-provider-twilio version: 0.11.1:
  • terraform version: v1.1.0 (windows_amd64)
@shwetha-manvinkurke
Copy link
Contributor

I could recreate the issue. This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

@shwetha-manvinkurke shwetha-manvinkurke added the type: bug bug in the library label Feb 14, 2022
@stephenhand
Copy link
Author

It looks like the same issue affects updating the target_workers attribute of twilio_taskrouter_workspaces_task_queues_v1 resource in place as well - it looks like it could be affecting a number of resources, making it a more significant issue than initially reported

Is it likely anybody will be able to look into this in the near future?

@childish-sambino
Copy link
Contributor

Bumped internally (DI-2165).

@janorivera
Copy link

Hello, I'm having the same issue. Is there an estimation of when this is going to get fixed?

@janorivera
Copy link

@childish-sambino also just FYI the Terraform provider doesn't seem to detect changes made outside Terraform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug bug in the library
Projects
None yet
Development

No branches or pull requests

4 participants