Closed mohan-reviewer1 closed 3 months ago
Voting for Prioritization
Volunteering to Work on This Issue
@justinretzolk will it take time fix this issue?
Hey @mohan-reviewer1 👋 - Thanks for the report.
The inconsistent result after apply is caused by AWS returning a default configuration for value_elicitation_setting.prompt_specification.prompt_attempt_specification
which the provider cannot currently suppress differences for.
Updating the configuration to contain the appropriate prompt_attempt_specification
blocks should allow the apply operation to complete successfully. Here is an example similar to the configuration above (I’ve reduced the number of retry attempts to 1, as each retry will have a corresponding attempt specification block and I wanted to keep the example small-ish).
resource "aws_lexv2models_slot" "test" {
bot_id = aws_lexv2models_bot.test.id
bot_version = aws_lexv2models_bot_locale.test.bot_version
intent_id = aws_lexv2models_intent.test.intent_id
name = "jb-test"
locale_id = aws_lexv2models_bot_locale.test.locale_id
value_elicitation_setting {
slot_constraint = "Required"
prompt_specification {
allow_interrupt = true
max_retries = 1
message_selection_strategy = "Random"
message_group {
message {
plain_text_message {
value = "What is your favorite color?"
}
}
}
# Match AWS defaults for "Initial"
prompt_attempts_specification {
allow_interrupt = true
map_block_key = "Initial"
allowed_input_types {
allow_audio_input = true
allow_dtmf_input = true
}
audio_and_dtmf_input_specification {
start_timeout_ms = 4000
audio_specification {
end_timeout_ms = 640
max_length_ms = 15000
}
dtmf_specification {
deletion_character = "*"
end_character = "#"
end_timeout_ms = 5000
max_length = 513
}
}
text_input_specification {
start_timeout_ms = 30000
}
}
# Match AWS defaults for "Retry1"
prompt_attempts_specification {
allow_interrupt = true
map_block_key = "Retry1"
allowed_input_types {
allow_audio_input = true
allow_dtmf_input = true
}
audio_and_dtmf_input_specification {
start_timeout_ms = 4000
audio_specification {
end_timeout_ms = 640
max_length_ms = 15000
}
dtmf_specification {
deletion_character = "*"
end_character = "#"
end_timeout_ms = 5000
max_length = 513
}
}
text_input_specification {
start_timeout_ms = 30000
}
}
}
}
}
The aws_lexv2models_intent
registry documentation includes an example which describes this behavior for the confirmation_setting
block on that resource. I'll be opening a PR shortly to add a similar example for aws_lexv2models_slot
.
I'm proposing we close this issue pending those documentation changes, and leave #35346 to cover the broader feature request for handling suppression of default prompt_attempts_specification
values returned by AWS. Any suppression logic implemented on the aws_lexv2models_intent
resource should be translatable to aws_lexv2models_slot
as the schema definitions for prompt_specification
are identical.
[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.
Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.
This functionality has been released in v5.66.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!
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.
Terraform Core Version
1.3.6
AWS Provider Version
5.44.0
Affected Resource(s)
aws_lexv2models_slot
Expected Behavior
Would expect that a slot with an elicitation prompt would be created after converting the block:
Actual Behavior
The Error message pasted below is shown. I'm not able apply
Relevant Error/Panic Output Snippet
Terraform Configuration Files
awslexv2bot.zip
Steps to Reproduce
terraform init terraform plan
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None