Skip to content

Commit

Permalink
Merge pull request #36783 from markoskandylis/feature/bedrockagent-kn…
Browse files Browse the repository at this point in the history
…owledge-base

Feature/bedrockagent knowledge base
  • Loading branch information
ewbankkit authored Apr 24, 2024
2 parents 02b3156 + cf9ed57 commit 2b339c6
Show file tree
Hide file tree
Showing 17 changed files with 1,613 additions and 387 deletions.
7 changes: 7 additions & 0 deletions .changelog/36783.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:new-resource
aws_bedrockagent_knowledge_base
```

```release-note:note
resource/aws_bedrockagent_knowledge_base: Because we cannot easily test this functionality, it is best effort and we ask for community help in testing
```
26 changes: 26 additions & 0 deletions internal/service/bedrockagent/bedrockagent_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package bedrockagent_test

import (
"testing"

"github.com/hashicorp/terraform-provider-aws/internal/acctest"
)

func TestAccBedrockAgent_serial(t *testing.T) {
t.Parallel()

testCases := map[string]map[string]func(t *testing.T){
"KnowledgeBase": {
"basic": testAccKnowledgeBase_basic,
"disappears": testAccKnowledgeBase_disappears,
"rds": testAccKnowledgeBase_rds,
"update": testAccKnowledgeBase_update,
"tags": testAccKnowledgeBase_tags,
},
}

acctest.RunSerialTests2Levels(t, testCases, 0)
}
12 changes: 12 additions & 0 deletions internal/service/bedrockagent/consts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package bedrockagent

import (
"time"
)

const (
propagationTimeout = 2 * time.Minute
)
8 changes: 8 additions & 0 deletions internal/service/bedrockagent/errors.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package bedrockagent

const (
errCodeValidationException = "ValidationException"
)
2 changes: 2 additions & 0 deletions internal/service/bedrockagent/exports_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ var (
ResourceAgent = newAgentResource
ResourceAgentActionGroup = newAgentActionGroupResource
ResourceAgentAlias = newAgentAliasResource
ResourceKnowledgeBase = newKnowledgeBaseResource

FindAgentActionGroupByThreePartKey = findAgentActionGroupByThreePartKey
FindAgentAliasByTwoPartKey = findAgentAliasByTwoPartKey
FindAgentByID = findAgentByID
FindKnowledgeBaseByID = findKnowledgeBaseByID
)
Loading

0 comments on commit 2b339c6

Please sign in to comment.