[Bug]: Cycle: module.lex.aws_lexv2models_intent.intents, module.lex.aws_lexv2models_slot.slots #39948
Labels
bug
Addresses a defect in current functionality.
service/lexv2models
Issues and PRs that pertain to the lexv2models service.
Terraform Core Version
v1.9.8
AWS Provider Version
5.73.0
Affected Resource(s)
why after the default slot_priority value in intent is not set when provisioning through terraform? and if explicitly want to set this value, you will encounter circular dependency. When I open the intent in the web console and just try to move the slot, build works as if the value for slot_priority been set.
Expected Behavior
once all these resources are applied successfully. One should be able to build the model without any issue.
Actual Behavior
failed to build the lexv2 model. I were not able to build from aws cli nor using web console.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
all the resources above get provisioned successfully. Then when you build the model either using aws cli or from web console, you will get following error:
"Slot ids [Department] in intent ContactUs don't define a slot priority. Update the intent to add a priority to these slots.”
To address this issue I try to add the slot_priority in the aws_lexv2models_intent resource as follows:
Unfortunately that mean circular dependency. slot resource need intent but now to set this slot_priority field you need slotId causing cycle:
To address this issue, tried to use null_resource to update intent already created with just this slot_priority field. but it seems that it updates everything in the intent and does not preserve the existing values. basically this feels like hack but that requires to get the intent first then update it back with changes.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: