hashicorp / terraform-provider-awscc

Terraform AWS Cloud Control provider
https://registry.terraform.io/providers/hashicorp/awscc/latest/docs
Mozilla Public License 2.0
240 stars 107 forks source link

Lex bot locale disappeared after adding `auto_build_bot_locales = true` #619

Open gevial opened 1 year ago

gevial commented 1 year ago

Community Note

Terraform CLI and Terraform AWS Cloud Control Provider Version

Terraform v1.2.6 on darwin_amd64

Affected Resource(s)

Terraform Configuration Files

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

resource "awscc_lex_bot" "util" {
  name = "Util"
  data_privacy = {
    child_directed = false
  }
  idle_session_ttl_in_seconds = 300
  role_arn                    = aws_iam_role.bots.arn
  bot_locales = [
    {
      locale_id                = "en_GB"
      nlu_confidence_threshold = 0.5
      intents = [
        {
          name = "Greeting"
          sample_utterances = [
            { utterance = "Hi" },
            { utterance = "Hello" },
            { utterance = "Hiya" },
            { utterance = "Hi there" },
            { utterance = "Good morning" },
            { utterance = "Good afternoon" },
            { utterance = "Greetings" },
          ]
        },
        {
          name = "Yes"
          sample_utterances = [
            { utterance = "Yes" },
            { utterance = "Yep" },
            { utterance = "Yeah" },
            { utterance = "Definitely" },
            { utterance = "I think so" },
            { utterance = "Absolutely" },
          ]
        },
        {
          name = "No"
          sample_utterances = [
            { utterance = "No" },
            { utterance = "Nope" },
            { utterance = "That's it" },
            { utterance = "No, thank you" },
            { utterance = "No, thanks" },
          ]
        },
        {
          name                    = "FallbackIntent"
          parent_intent_signature = "AMAZON.FallbackIntent"
        }
      ]
    }
  ]
}

Debug Output

Panic Output

Expected Behavior

Locale is build.

Actual Behavior

Locale disappeared.

Steps to Reproduce

  1. Add auto_build_bot_locales = true to the bot resource above
  2. Run terraform apply

Important Factoids

References

breathingdust commented 1 year ago

Potentially related to #190

ferasawadi commented 1 year ago

found any solution to this?