Skip to content

Resource: awsKendraFaq

Terraform resource for managing an AWS Kendra FAQ.

Example Usage

Basic

/*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.kendraFaq.KendraFaq(this, "example", {
  indexId: "${aws_kendra_index.example.id}",
  name: "Example",
  roleArn: "${aws_iam_role.example.arn}",
  s3Path: {
    bucket: "${aws_s3_bucket.example.id}",
    key: "${aws_s3_object.example.key}",
  },
  tags: {
    Name: "Example Kendra Faq",
  },
});

With File Format

/*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.kendraFaq.KendraFaq(this, "example", {
  fileFormat: "CSV",
  indexId: "${aws_kendra_index.example.id}",
  name: "Example",
  roleArn: "${aws_iam_role.example.arn}",
  s3Path: {
    bucket: "${aws_s3_bucket.example.id}",
    key: "${aws_s3_object.example.key}",
  },
});

With Language Code

/*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.kendraFaq.KendraFaq(this, "example", {
  indexId: "${aws_kendra_index.example.id}",
  languageCode: "en",
  name: "Example",
  roleArn: "${aws_iam_role.example.arn}",
  s3Path: {
    bucket: "${aws_s3_bucket.example.id}",
    key: "${aws_s3_object.example.key}",
  },
});

Argument Reference

The following arguments are required:

  • indexId- (Required, Forces new resource) The identifier of the index for a FAQ.
  • name - (Required, Forces new resource) The name that should be associated with the FAQ.
  • roleArn - (Required, Forces new resource) The Amazon Resource Name (ARN) of a role with permission to access the S3 bucket that contains the FAQs. For more information, see IAM Roles for Amazon Kendra.
  • s3Path - (Required, Forces new resource) The S3 location of the FAQ input data. Detailed below.

The s3Path configuration block supports the following arguments:

  • bucket - (Required, Forces new resource) The name of the S3 bucket that contains the file.
  • key - (Required, Forces new resource) The name of the file.

The following arguments are optional:

  • description - (Optional, Forces new resource) The description for a FAQ.
  • fileFormat - (Optional, Forces new resource) The file format used by the input files for the FAQ. Valid Values are csv, CSV_WITH_HEADER, json.
  • languageCode - (Optional, Forces new resource) The code for a language. This shows a supported language for the FAQ document. English is supported by default. For more information on supported languages, including their codes, see Adding documents in languages other than English.
  • tags - (Optional) Key-value map of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Attributes Reference

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

  • arn - ARN of the FAQ.
  • createdAt - The Unix datetime that the FAQ was created.
  • errorMessage - When the Status field value is failed, this contains a message that explains why.
  • faqId - The identifier of the FAQ.
  • id - The unique identifiers of the FAQ and index separated by a slash (/)
  • status - The status of the FAQ. It is ready to use when the status is ACTIVE.
  • updatedAt - The date and time that the FAQ was last updated.
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

Timeouts

Configuration options:

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

Import

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

$ terraform import aws_kendra_faq.example faq-123456780/idx-8012925589