Skip to content

Commit d568e6a

Browse files
authored
Merge pull request #47832 from hashicorp/td-bedrock-nova
[bedrock|bedrockagent]: prefer `nova` foundation models
2 parents c444216 + 807fe50 commit d568e6a

24 files changed

Lines changed: 261 additions & 393 deletions

docs/acc-test-environment-variables.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ Environment variables (beyond standard AWS Go SDK ones) used by acceptance testi
112112
| `TF_ACC_ASSUME_ROLE_ARN` | Amazon Resource Name of existing IAM Role to use for limited permissions acceptance testing. |
113113
| `TF_ACC_REQUIRED_TAG_KEY` | Name of the tag key required for the resource being tested as defined in the organizational tagging policy |
114114
| `TF_AWS_BEDROCK_OSS_COLLECTION_NAME` | Name of the OpenSearch Serverless collection to be used with an Amazon Bedrock Knowledge Base. |
115+
| `TF_AWS_BEDROCK_TITAN_MODELS_ALLOWED` | Flag to enable tests which require use of Amazon Titan foundation models. Set to `1` to run tests. |
115116
| `TF_AWS_CONTROLTOWER_CONTROL_OU_NAME` | Organizational unit name to be targeted by the Control Tower control. |
116117
| `TF_AWS_CONTROLTOWER_BASELINE_ENABLE_BASELINE_ARN` | Enable baseline ARN. |
117118
| `TF_AWS_DATAEXCHANGE_DATA_SET_ID` | ID of DataExchange Data Set to use for testing. |

internal/service/bedrock/custom_model.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ import (
5151
// @Testing(serialize=true)
5252
// @Testing(importIgnore="base_model_identifier", plannableImportAction="Replace")
5353
// @Testing(preIdentityVersion="v5.100.0")
54+
// @Testing(preCheckRegion="us-east-1")
55+
// Model availability is region-specific
56+
// @Testing(identityRegionOverrideTest=false)
5457
func newCustomModelResource(context.Context) (resource.ResourceWithConfigure, error) {
5558
r := &customModelResource{}
5659

internal/service/bedrock/custom_model_data_source_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"testing"
88

99
"github.com/aws/aws-sdk-go-v2/service/bedrock"
10+
"github.com/hashicorp/aws-sdk-go-base/v2/endpoints"
1011
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
1112
"github.com/hashicorp/terraform-provider-aws/internal/acctest"
1213
"github.com/hashicorp/terraform-provider-aws/names"
@@ -24,7 +25,11 @@ func testAccCustomModelDataSource_basic(t *testing.T) {
2425
var v bedrock.GetModelCustomizationJobOutput
2526

2627
acctest.Test(ctx, t, resource.TestCase{
27-
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartitionHasService(t, names.BedrockEndpointID) },
28+
PreCheck: func() {
29+
acctest.PreCheck(ctx, t)
30+
acctest.PreCheckPartitionHasService(t, names.BedrockEndpointID)
31+
acctest.PreCheckRegion(t, endpoints.UsEast1RegionID)
32+
},
2833
ErrorCheck: acctest.ErrorCheck(t, names.BedrockServiceID),
2934
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
3035
Steps: []resource.TestStep{

internal/service/bedrock/custom_model_identity_gen_test.go

Lines changed: 13 additions & 136 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)