Skip to content

Commit

Permalink
Merge pull request #25524 from GlennChia/f-aws_kendra_thesaurus-thesa…
Browse files Browse the repository at this point in the history
…urus_id

r/aws_kendra_thesaurus - New attribute thesaurus_id
  • Loading branch information
anGie44 authored Jun 22, 2022
2 parents 7b57099 + 35b3012 commit a823f3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/service/kendra/thesaurus.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ func ResourceThesaurus() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"thesaurus_id": {
Type: schema.TypeString,
Computed: true,
},
"tags": tftags.TagsSchema(),
"tags_all": tftags.TagsSchemaComputed(),
},
Expand Down Expand Up @@ -185,6 +189,7 @@ func resourceThesaurusRead(ctx context.Context, d *schema.ResourceData, meta int
d.Set("name", out.Name)
d.Set("role_arn", out.RoleArn)
d.Set("status", out.Status)
d.Set("thesaurus_id", out.Id)

if err := d.Set("source_s3_path", flattenSourceS3Path(out.SourceS3Path)); err != nil {
return diag.Errorf("setting complex argument: %s", err)
Expand Down
1 change: 1 addition & 0 deletions internal/service/kendra/thesaurus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func testAccThesaurus_basic(t *testing.T) {
resource.TestCheckResourceAttrPair(resourceName, "source_s3_path.0.bucket", "aws_s3_bucket.test", "id"),
resource.TestCheckResourceAttrPair(resourceName, "source_s3_path.0.key", "aws_s3_object.test", "key"),
resource.TestCheckResourceAttrSet(resourceName, "status"),
resource.TestCheckResourceAttrSet(resourceName, "thesaurus_id"),
acctest.MatchResourceAttrRegionalARN(resourceName, "arn", "kendra", regexp.MustCompile(`index/.+/thesaurus/.+$`)),
),
},
Expand Down

0 comments on commit a823f3d

Please sign in to comment.