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

aws_lex_bot Unable to update intent version based on slot type dependency #16584

Closed
zach-anthony opened this issue Dec 4, 2020 · 4 comments · Fixed by #20336
Closed

aws_lex_bot Unable to update intent version based on slot type dependency #16584

zach-anthony opened this issue Dec 4, 2020 · 4 comments · Fixed by #20336
Labels
bug Addresses a defect in current functionality. service/lexmodels Issues and PRs that pertain to the lexmodels service.
Milestone

Comments

@zach-anthony
Copy link
Contributor

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 other comments that do not add relevant new information or questions, 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

Terraform CLI and Terraform AWS Provider Version

  • Terraform Version 12.23
  • AWS Provider Version 3.20.0

Affected Resource(s)

  • aws_lex_intent

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

intent.tf

resource "aws_lex_intent" "example_a" {
  name                 = "${local.prefix}_ExampleA"
  create_version       = true

...

slot {
    name        = "slot_a"
    priority    = 1

    slot_constraint   = "Required"
    slot_type         = aws_lex_slot_type.slot_a.name
    slot_type_version = aws_lex_slot_type.slot_a.version

    value_elicitation_prompt {
      max_attempts = 2
      message {
        content      = "optional"
        content_type = "PlainText"
      }
    }
  }

slot_type.tf

resource "aws_lex_slot_type" "slot_a" {
  description              = "Slot A"
  name                     = "${local.prefix}_SlotA"
  value_selection_strategy = "ORIGINAL_VALUE"
  create_version   = true

enumeration_value {
    value = "test"
  }

Debug Output

Expected Behavior

When updating the enumeration value for the Slot Type:

  • A new version of the Slot Type should be created
  • A new version of the Intent which depends on the Slot Type should be created, referring to the new version of the Slot Type
  • A new version of the Bot which depends on the Intent should be created, referring to the new version of the Intent

Actual Behavior

When updating the enumeration value for the Slot Type:

  • A new version of the Slot Type is created
  • A new version of the Intent is not created, the existing version of the Intent refers to the previous version of the Slot Type
  • A new version of the Bot is created but refers to the 'existing' version of the Intent

Steps to Reproduce

  1. terraform apply

References

@ghost ghost added the service/lexmodels Issues and PRs that pertain to the lexmodels service. label Dec 4, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 4, 2020
@anGie44 anGie44 added thinking and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 4, 2020
@nbmustafa
Copy link

Any update on this issue? this is really a show stopper for the Lex bot with terraform.
@jzbruno perhaps you would be able to provide some help on fixing this issue?

@jzbruno
Copy link
Contributor

jzbruno commented Jan 27, 2021

@nashvan Really sorry for the slow response. Unfortunately, I don't think I have time to look into this. From a quick look, I didn't see an obvious reason why this isn't working.

For anyone that may look into it.

  1. Would check if terraform apply is showing a change to the intent, is the resource dependency being captured correctly.
  2. Slot type version is a nested field in the intent, would check if it is being sent on to the AWS API correctly.
  3. Is the AWS API call correct and the API isn't updating it?
  4. Is there possibly a race condition, the call to get the latest version is still showing the old version?

@github-actions
Copy link

This functionality has been released in v3.52.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/lexmodels Issues and PRs that pertain to the lexmodels service.
Projects
None yet
4 participants