Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/bedrockagent knowledge base #36783

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
44987a5
Initial commit of the resource
markoskandylis Apr 1, 2024
4ee120c
Workign with tests
markoskandylis Apr 2, 2024
e0d6acc
First test mostly succesfull
markoskandylis Apr 3, 2024
f3b9b29
First test pass
markoskandylis Apr 3, 2024
19ea995
Changes with autoflex
markoskandylis Apr 4, 2024
c7c2048
Expanding tests
markoskandylis Apr 7, 2024
5fd886c
Added tests and document
markoskandylis Apr 8, 2024
b1ab82b
Added changelog
markoskandylis Apr 8, 2024
cdfc21e
Added Created at and updated at
markoskandylis Apr 9, 2024
1e4038c
Merge branch 'main' into HEAD
ewbankkit Apr 12, 2024
5599753
r/aws_bedrockagent_knowledge_base: Cosmetics.
ewbankkit Apr 12, 2024
6012564
Fix terrafmt error.
ewbankkit Apr 12, 2024
77f6803
'resource.ParallelTest' -> 'resource.Test'.
ewbankkit Apr 12, 2024
01b262c
r/aws_bedrockagent_knowledge_base: IAM propagation.
ewbankkit Apr 12, 2024
4bc59b6
r/aws_bedrockagent_knowledge_base: Tidy up acceptance tests.
ewbankkit Apr 12, 2024
3bd5e52
Merge branch 'main' into HEAD
ewbankkit Apr 19, 2024
f80f056
Adding RDS test with local exec
markoskandylis Apr 21, 2024
7fd8086
Fixed document error
markoskandylis Apr 21, 2024
752b675
Adding the RDS test
markoskandylis Apr 22, 2024
1094a8c
Addin g RDS tests
markoskandylis Apr 23, 2024
8f16e76
Fixed region error
markoskandylis Apr 23, 2024
a3a5a65
Merge branch 'main' into HEAD
ewbankkit Apr 24, 2024
d3b8308
Fix providerlint 'AT004: provider declaration should be omitted'.
ewbankkit Apr 24, 2024
cf9ed57
r/aws_bedrockagent_knowledge_base: Skip acceptance tests.
ewbankkit Apr 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading