Skip to content

Resource: awsKendraExperience

Terraform resource for managing an AWS Kendra Experience.

Example Usage

Basic Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.kendraExperience.KendraExperience(this, "example", {
  configuration: {
    contentSourceConfiguration: {
      directPutContent: true,
      faqIds: ["${aws_kendra_faq.example.faq_id}"],
    },
    userIdentityConfiguration: {
      identityAttributeName: "12345ec453-1546651e-79c4-4554-91fa-00b43ccfa245",
    },
  },
  description: "My Kendra Experience",
  indexId: "${aws_kendra_index.example.id}",
  name: "example",
  roleArn: "${aws_iam_role.example.arn}",
});

Argument Reference

\~> NOTE: By default of the AWS Kendra API, updates to an existing awsKendraExperience resource (e.g. updating the name) will also update the configurationContentSourceConfigurationDirectPutContent parameter to false if not already provided.

The following arguments are required:

  • indexId - (Required, Forces new resource) The identifier of the index for your Amazon Kendra experience.
  • name - (Required) A name for your Amazon Kendra experience.
  • roleArn - (Required) The Amazon Resource Name (ARN) of a role with permission to access queryApi, querySuggestionsApi, submitFeedbackApi, and awsSso that stores your user and group information. For more information, see IAM roles for Amazon Kendra.

The following arguments are optional:

  • description - (Optional, Forces new resource if removed) A description for your Amazon Kendra experience.
  • configuration - (Optional) Configuration information for your Amazon Kendra experience. Terraform will only perform drift detection of its value when present in a configuration. Detailed below.

configuration

\~> NOTE: By default of the AWS Kendra API, the contentSourceConfigurationDirectPutContent parameter will be set to false if not provided.

The configuration configuration block supports the following arguments:

  • contentSourceConfiguration - (Optional, Required if userIdentityConfiguration not provided) The identifiers of your data sources and FAQs. Or, you can specify that you want to use documents indexed via the batchPutDocumentApi. Terraform will only perform drift detection of its value when present in a configuration. Detailed below.
  • userIdentityConfiguration - (Optional, Required if contentSourceConfiguration not provided) The AWS SSO field name that contains the identifiers of your users, such as their emails. Detailed below.

contentSourceConfiguration

The contentSourceConfiguration configuration block supports the following arguments:

  • dataSourceIds - (Optional) The identifiers of the data sources you want to use for your Amazon Kendra experience. Maximum number of 100 items.
  • directPutContent - (Optional) Whether to use documents you indexed directly using the batchPutDocumentApi. Defaults to false.
  • faqIds - (Optional) The identifier of the FAQs that you want to use for your Amazon Kendra experience. Maximum number of 100 items.

userIdentityConfiguration

The userIdentityConfiguration configuration block supports the following argument:

  • identityAttributeName - (Required) The AWS SSO field name that contains the identifiers of your users, such as their emails.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The unique identifiers of the experience and index separated by a slash (/).
  • arn - ARN of the Experience.
  • endpoints - Shows the endpoint URLs for your Amazon Kendra experiences. The URLs are unique and fully hosted by AWS.
  • endpoint - The endpoint of your Amazon Kendra experience.
  • endpointType - The type of endpoint for your Amazon Kendra experience.
  • experienceId - The unique identifier of the experience.
  • status - The current processing status of your Amazon Kendra experience.

Timeouts

Configuration options:

  • create - (Default 30M)
  • update - (Default 30M)
  • delete - (Default 30M)

Import

Kendra Experience can be imported using the unique identifiers of the experience and index separated by a slash (/) e.g.,

$ terraform import aws_kendra_experience.example 1045d08d-66ef-4882-b3ed-dfb7df183e90/b34dfdf7-1f2b-4704-9581-79e00296845f