-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Add Lex intent data source and resource #8917
Add Lex intent data source and resource #8917
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jzbruno I'm working through this PR and have a number of questions around expectations for the Lex intent resource. The combination of the data source along with the resources is proving a bit difficult to review all of the changes. Please take a minute to address the comments so far so than I can continue reviewing.
@nywilken I will look at this tonight. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is off to a good start, @jzbruno. I've added a number of suggestions
aws/resource_aws_lex_intent_test.go
Outdated
// requires a lambda function to test | ||
// dialog_code_hook { | ||
// message_version = "1" | ||
// uri = "arn:aws:lambda:us-east-1:123456789012:function:RetrieveAvailableFlowers" | ||
// } | ||
|
||
fulfillment_activity { | ||
// requires a lambda function to test | ||
// code_hook { | ||
// message_version = "1" | ||
// uri = "arn:aws:lambda:us-east-1:123456789012:function:ProcessFlowerOrder" | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For fields that require a Lambda function, we could just create a dummy Lambda function so that we have an ARN to use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is being problematic. I'll explain when I push the other changes this morning.
Hi @jzbruno. Thanks again for all the work you've put in on the Lex service. Are you still interested in working on this, or are you short on time to work on it? If you'd like, I can pick up the PRs and get them merged in. |
@gdavison I'm working on this today. I may ask for help finishing this and the other 2 PRs. Let's see how far I get. |
Phew, ok! Thanks for the reviews! I have pushed the latest changes, quite a lot of changes :) (mostly for test cases). Here are some notes. Think we are close.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
--- PASS: TestAccAwsLexIntent_disappears (51.98s)
--- PASS: TestAccDataSourceAwsLexIntent_withVersion (62.35s)
--- PASS: TestAccDataSourceAwsLexSlotType_withVersion (63.24s)
--- PASS: TestAccDataSourceAwsLexSlotType_basic (64.29s)
--- PASS: TestAccDataSourceAwsLexIntent_basic (65.33s)
--- PASS: TestAccAwsLexIntent_basic (71.85s)
--- PASS: TestAccAwsLexSlotType_basic (72.88s)
--- PASS: TestAccAwsLexIntent_slotsCustom (89.72s)
--- PASS: TestAccAwsLexIntent_dialogCodeHook (96.35s)
--- PASS: TestAccAwsLexIntent_fulfillmentActivity (96.44s)
--- PASS: TestAccAwsLexIntent_updateWithExternalChange (100.47s)
--- PASS: TestAccAwsLexSlotType_disappears (39.93s)
--- PASS: TestAccAwsLexIntent_confirmationPromptAndRejectionStatement (110.13s)
--- PASS: TestAccAwsLexSlotType_enumerationValues (110.94s)
--- PASS: TestAccAwsLexSlotType_createVersion (112.55s)
--- PASS: TestAccAwsLexIntent_sampleUtterances (113.02s)
--- PASS: TestAccAwsLexSlotType_description (113.73s)
--- PASS: TestAccAwsLexIntent_followUpPrompt (114.68s)
--- PASS: TestAccAwsLexIntent_createVersion (116.21s)
--- PASS: TestAccAwsLexIntent_slots (120.38s)
--- PASS: TestAccAwsLexSlotType_valueSelectionStrategy (61.61s)
--- PASS: TestAccAwsLexSlotType_name (85.81s)
--- PASS: TestAccAwsLexIntent_conclusionStatement (139.21s)
resource.TestCheckResourceAttrPair(dataSourceName, "checksum", resourceName, "checksum"), | ||
resource.TestCheckResourceAttrPair(dataSourceName, "created_date", resourceName, "created_date"), | ||
resource.TestCheckResourceAttrPair(dataSourceName, "description", resourceName, "description"), | ||
resource.TestCheckResourceAttrPair(dataSourceName, "enumeration_value.#", resourceName, "enumeration_value.#"), | ||
resource.TestCheckResourceAttrPair(dataSourceName, "last_updated_date", resourceName, "last_updated_date"), | ||
resource.TestCheckResourceAttrPair(dataSourceName, "name", resourceName, "name"), | ||
resource.TestCheckResourceAttrPair(dataSourceName, "value_selection_strategy", resourceName, "value_selection_strategy"), | ||
resource.TestCheckResourceAttrPair(dataSourceName, "version", resourceName, "version"), | ||
resource.TestCheckResourceAttrPair(dataSourceName, "created_date", resourceName, "created_date"), | ||
testAccCheckResourceAttrRfc3339(dataSourceName, "created_date"), | ||
resource.TestCheckResourceAttrPair(dataSourceName, "last_updated_date", resourceName, "last_updated_date"), | ||
testAccCheckResourceAttrRfc3339(dataSourceName, "last_updated_date"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that you kept this in alphabetical order :)
This has been released in version 3.9.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 for triage. Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Relates #905 and split from PR #2616
Release note for CHANGELOG:
Output from acceptance testing: