Skip to content

Commit 6630a6d

Browse files
committed
Use names.Attr*
1 parent 2ad6a29 commit 6630a6d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

internal/service/s3vectors/index.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (r *indexResource) Schema(ctx context.Context, request resource.SchemaReque
7979
stringplanmodifier.RequiresReplace(),
8080
},
8181
},
82-
"encryption_configuration": framework.ResourceOptionalComputedListOfObjectsAttribute[indexEncryptionConfigurationModel](ctx, 1, nil,
82+
names.AttrEncryptionConfiguration: framework.ResourceOptionalComputedListOfObjectsAttribute[indexEncryptionConfigurationModel](ctx, 1, nil,
8383
listplanmodifier.UseStateForUnknown(),
8484
listplanmodifier.RequiresReplace(),
8585
),

internal/service/s3vectors/index_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func TestAccS3VectorsIndex_encryptionConfigurationAES256(t *testing.T) {
106106
},
107107
},
108108
ConfigStateChecks: []statecheck.StateCheck{
109-
statecheck.ExpectKnownValue(resourceName, tfjsonpath.New("encryption_configuration").AtSliceIndex(0).AtMapKey("sse_type"), tfknownvalue.StringExact(awstypes.SseTypeAes256)),
109+
statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrEncryptionConfiguration).AtSliceIndex(0).AtMapKey("sse_type"), tfknownvalue.StringExact(awstypes.SseTypeAes256)),
110110
},
111111
},
112112
{
@@ -146,8 +146,8 @@ func TestAccS3VectorsIndex_encryptionConfigurationCMK(t *testing.T) {
146146
},
147147
},
148148
ConfigStateChecks: []statecheck.StateCheck{
149-
statecheck.ExpectKnownValue(resourceName, tfjsonpath.New("encryption_configuration").AtSliceIndex(0).AtMapKey("sse_type"), tfknownvalue.StringExact(awstypes.SseTypeAwsKms)),
150-
statecheck.ExpectKnownValue(resourceName, tfjsonpath.New("encryption_configuration").AtSliceIndex(0).AtMapKey("kms_key_arn"), knownvalue.NotNull()),
149+
statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrEncryptionConfiguration).AtSliceIndex(0).AtMapKey("sse_type"), tfknownvalue.StringExact(awstypes.SseTypeAwsKms)),
150+
statecheck.ExpectKnownValue(resourceName, tfjsonpath.New(names.AttrEncryptionConfiguration).AtSliceIndex(0).AtMapKey(names.AttrKMSKeyARN), knownvalue.NotNull()),
151151
},
152152
},
153153
{

0 commit comments

Comments
 (0)