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

Amazon S3 Express #34612

Merged
merged 219 commits into from
Nov 29, 2023
Merged

Amazon S3 Express #34612

merged 219 commits into from
Nov 29, 2023

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Nov 28, 2023

Description

Initial support for Amazon S3 Express.

Relations

Closes #34606.

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccS3DirectoryBucket_' PKG=s3          
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20  -run=TestAccS3DirectoryBucket_ -timeout 360m
=== RUN   TestAccS3DirectoryBucket_basic
=== PAUSE TestAccS3DirectoryBucket_basic
=== RUN   TestAccS3DirectoryBucket_disappears
=== PAUSE TestAccS3DirectoryBucket_disappears
=== CONT  TestAccS3DirectoryBucket_basic
=== CONT  TestAccS3DirectoryBucket_disappears
--- PASS: TestAccS3DirectoryBucket_disappears (26.76s)
--- PASS: TestAccS3DirectoryBucket_basic (32.04s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	37.571s
% make testacc TESTARGS='-run=TestAccS3DirectoryBucketsDataSource_' PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20  -run=TestAccS3DirectoryBucketsDataSource_ -timeout 360m
=== RUN   TestAccS3DirectoryBucketsDataSource_basic
=== PAUSE TestAccS3DirectoryBucketsDataSource_basic
=== CONT  TestAccS3DirectoryBucketsDataSource_basic
--- PASS: TestAccS3DirectoryBucketsDataSource_basic (25.68s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	31.271s
% make testacc TESTARGS='-run=_directoryBucket$$' PKG=s3 ACCTEST_PARALLELISM=2 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 2  -run=_directoryBucket$ -timeout 360m
=== RUN   TestAccS3BucketAccelerateConfiguration_directoryBucket
=== PAUSE TestAccS3BucketAccelerateConfiguration_directoryBucket
=== RUN   TestAccS3BucketACL_directoryBucket
=== PAUSE TestAccS3BucketACL_directoryBucket
=== RUN   TestAccS3BucketAnalyticsConfiguration_directoryBucket
=== PAUSE TestAccS3BucketAnalyticsConfiguration_directoryBucket
=== RUN   TestAccS3BucketCORSConfiguration_directoryBucket
=== PAUSE TestAccS3BucketCORSConfiguration_directoryBucket
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_directoryBucket
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_directoryBucket
=== RUN   TestAccS3BucketInventory_directoryBucket
=== PAUSE TestAccS3BucketInventory_directoryBucket
=== RUN   TestAccS3BucketLifecycleConfiguration_directoryBucket
=== PAUSE TestAccS3BucketLifecycleConfiguration_directoryBucket
=== RUN   TestAccS3BucketLogging_directoryBucket
=== PAUSE TestAccS3BucketLogging_directoryBucket
=== RUN   TestAccS3BucketMetric_directoryBucket
=== PAUSE TestAccS3BucketMetric_directoryBucket
=== RUN   TestAccS3BucketNotification_directoryBucket
=== PAUSE TestAccS3BucketNotification_directoryBucket
=== RUN   TestAccS3BucketObjectLockConfiguration_directoryBucket
=== PAUSE TestAccS3BucketObjectLockConfiguration_directoryBucket
=== RUN   TestAccS3BucketOwnershipControls_directoryBucket
=== PAUSE TestAccS3BucketOwnershipControls_directoryBucket
=== RUN   TestAccS3BucketPolicy_directoryBucket
=== PAUSE TestAccS3BucketPolicy_directoryBucket
=== RUN   TestAccS3BucketPublicAccessBlock_directoryBucket
=== PAUSE TestAccS3BucketPublicAccessBlock_directoryBucket
=== RUN   TestAccS3BucketReplicationConfiguration_directoryBucket
=== PAUSE TestAccS3BucketReplicationConfiguration_directoryBucket
=== RUN   TestAccS3BucketRequestPaymentConfiguration_directoryBucket
=== PAUSE TestAccS3BucketRequestPaymentConfiguration_directoryBucket
=== RUN   TestAccS3BucketServerSideEncryptionConfiguration_directoryBucket
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_directoryBucket
=== RUN   TestAccS3BucketVersioning_directoryBucket
=== PAUSE TestAccS3BucketVersioning_directoryBucket
=== RUN   TestAccS3BucketWebsiteConfiguration_directoryBucket
=== PAUSE TestAccS3BucketWebsiteConfiguration_directoryBucket
=== RUN   TestAccS3ObjectCopy_directoryBucket
=== PAUSE TestAccS3ObjectCopy_directoryBucket
=== RUN   TestAccS3ObjectDataSource_directoryBucket
=== PAUSE TestAccS3ObjectDataSource_directoryBucket
=== RUN   TestAccS3Object_directoryBucket
=== PAUSE TestAccS3Object_directoryBucket
=== RUN   TestAccS3ObjectsDataSource_directoryBucket
=== PAUSE TestAccS3ObjectsDataSource_directoryBucket
=== CONT  TestAccS3BucketAccelerateConfiguration_directoryBucket
=== CONT  TestAccS3BucketPolicy_directoryBucket
--- PASS: TestAccS3BucketAccelerateConfiguration_directoryBucket (16.63s)
=== CONT  TestAccS3BucketLifecycleConfiguration_directoryBucket
--- PASS: TestAccS3BucketPolicy_directoryBucket (28.28s)
=== CONT  TestAccS3BucketOwnershipControls_directoryBucket
--- PASS: TestAccS3BucketLifecycleConfiguration_directoryBucket (15.15s)
=== CONT  TestAccS3BucketObjectLockConfiguration_directoryBucket
--- PASS: TestAccS3BucketOwnershipControls_directoryBucket (14.67s)
=== CONT  TestAccS3BucketNotification_directoryBucket
--- PASS: TestAccS3BucketObjectLockConfiguration_directoryBucket (14.67s)
=== CONT  TestAccS3BucketMetric_directoryBucket
--- PASS: TestAccS3BucketNotification_directoryBucket (13.96s)
=== CONT  TestAccS3BucketLogging_directoryBucket
--- PASS: TestAccS3BucketMetric_directoryBucket (14.04s)
=== CONT  TestAccS3BucketWebsiteConfiguration_directoryBucket
--- PASS: TestAccS3BucketWebsiteConfiguration_directoryBucket (14.06s)
=== CONT  TestAccS3ObjectsDataSource_directoryBucket
--- PASS: TestAccS3BucketLogging_directoryBucket (36.48s)
=== CONT  TestAccS3Object_directoryBucket
--- PASS: TestAccS3ObjectsDataSource_directoryBucket (27.46s)
=== CONT  TestAccS3ObjectDataSource_directoryBucket
--- PASS: TestAccS3Object_directoryBucket (29.79s)
=== CONT  TestAccS3ObjectCopy_directoryBucket
--- PASS: TestAccS3ObjectDataSource_directoryBucket (26.35s)
=== CONT  TestAccS3BucketCORSConfiguration_directoryBucket
--- PASS: TestAccS3BucketCORSConfiguration_directoryBucket (13.89s)
=== CONT  TestAccS3BucketInventory_directoryBucket
--- PASS: TestAccS3BucketInventory_directoryBucket (13.85s)
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_directoryBucket
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_directoryBucket (13.24s)
=== CONT  TestAccS3BucketAnalyticsConfiguration_directoryBucket
--- PASS: TestAccS3BucketAnalyticsConfiguration_directoryBucket (13.80s)
=== CONT  TestAccS3BucketRequestPaymentConfiguration_directoryBucket
--- PASS: TestAccS3BucketRequestPaymentConfiguration_directoryBucket (13.39s)
=== CONT  TestAccS3BucketVersioning_directoryBucket
--- PASS: TestAccS3BucketVersioning_directoryBucket (13.11s)
=== CONT  TestAccS3BucketServerSideEncryptionConfiguration_directoryBucket
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_directoryBucket (13.10s)
=== CONT  TestAccS3BucketReplicationConfiguration_directoryBucket
--- PASS: TestAccS3BucketReplicationConfiguration_directoryBucket (18.55s)
=== CONT  TestAccS3BucketPublicAccessBlock_directoryBucket
--- PASS: TestAccS3BucketPublicAccessBlock_directoryBucket (12.97s)
=== CONT  TestAccS3BucketACL_directoryBucket
--- PASS: TestAccS3BucketACL_directoryBucket (12.99s)
--- PASS: TestAccS3ObjectCopy_directoryBucket (27.10s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	457.675s

# Conflicts:
#	go.mod
#	go.sum
#	internal/service/medialive/channel.go
#	internal/service/medialive/service_package_gen.go
#	internal/service/s3/service_package.go
…m/aws/aws-sdk-go-v2/service/s3.ListObjectsV2Output has no field or method RequestCharged)'.
# Conflicts:
#	.ci/.semgrep-service-name0.yml
#	.ci/.semgrep-service-name1.yml
#	.ci/.semgrep-service-name2.yml
#	.ci/.semgrep-service-name3.yml
#	go.mod
#	go.sum
#	internal/service/finspace/kx_cluster.go
% make testacc TESTARGS='-run=TestAccS3DirectoryBucket_' PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20  -run=TestAccS3DirectoryBucket_ -timeout 180m
=== RUN   TestAccS3DirectoryBucket_basic
=== PAUSE TestAccS3DirectoryBucket_basic
=== RUN   TestAccS3DirectoryBucket_disappears
=== PAUSE TestAccS3DirectoryBucket_disappears
=== CONT  TestAccS3DirectoryBucket_basic
=== CONT  TestAccS3DirectoryBucket_disappears
--- PASS: TestAccS3DirectoryBucket_disappears (22.53s)
--- PASS: TestAccS3DirectoryBucket_basic (28.62s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	33.543s
# Conflicts:
#	internal/service/finspace/kx_environment.go
#	internal/service/finspace/sweep.go
#	internal/service/s3/bucket_versioning.go
#	internal/service/s3/exports_test.go
% make testacc TESTARGS='-run=TestAccS3DirectoryBucket_basic' PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20  -run=TestAccS3DirectoryBucket_basic -timeout 360m
=== RUN   TestAccS3DirectoryBucket_basic
=== PAUSE TestAccS3DirectoryBucket_basic
=== CONT  TestAccS3DirectoryBucket_basic
--- PASS: TestAccS3DirectoryBucket_basic (26.67s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	32.363s
% make testacc TESTARGS='-run=TestAccS3BucketPolicy_directoryBucket' PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20  -run=TestAccS3BucketPolicy_directoryBucket -timeout 360m
=== RUN   TestAccS3BucketPolicy_directoryBucket
=== PAUSE TestAccS3BucketPolicy_directoryBucket
=== CONT  TestAccS3BucketPolicy_directoryBucket
--- PASS: TestAccS3BucketPolicy_directoryBucket (25.31s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	30.887s
@ewbankkit

This comment was marked as outdated.

@ewbankkit
Copy link
Contributor Author

Checking for regressions...

 make testacc TESTARGS='-run=TestAccS3Bucket_Basic_basic\|TestAccS3Bucket_Basic_nameGenerated\|TestAccS3Bucket_disappears\|TestAccS3Bucket_Basic_forceDestroy\|TestAccS3BucketPolicy_basic\|TestAccS3Object_\|TestAccS3ObjectCopy_\|TestAccS3ObjectDataSource_' PKG=s3 ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 3  -run=TestAccS3Bucket_Basic_basic\|TestAccS3Bucket_Basic_nameGenerated\|TestAccS3Bucket_disappears\|TestAccS3Bucket_Basic_forceDestroy\|TestAccS3BucketPolicy_basic\|TestAccS3Object_\|TestAccS3ObjectCopy_\|TestAccS3ObjectDataSource_ -timeout 360m
=== RUN   TestAccS3BucketPolicy_basic
=== PAUSE TestAccS3BucketPolicy_basic
=== RUN   TestAccS3Bucket_Basic_basic
=== PAUSE TestAccS3Bucket_Basic_basic
=== RUN   TestAccS3Bucket_Basic_nameGenerated
=== PAUSE TestAccS3Bucket_Basic_nameGenerated
=== RUN   TestAccS3Bucket_Basic_forceDestroy
=== PAUSE TestAccS3Bucket_Basic_forceDestroy
=== RUN   TestAccS3Bucket_Basic_forceDestroyWithEmptyPrefixes
=== PAUSE TestAccS3Bucket_Basic_forceDestroyWithEmptyPrefixes
=== RUN   TestAccS3Bucket_Basic_forceDestroyWithObjectLockEnabled
=== PAUSE TestAccS3Bucket_Basic_forceDestroyWithObjectLockEnabled
=== RUN   TestAccS3Bucket_disappears
=== PAUSE TestAccS3Bucket_disappears
=== RUN   TestAccS3ObjectCopy_basic
=== PAUSE TestAccS3ObjectCopy_basic
=== RUN   TestAccS3ObjectCopy_disappears
=== PAUSE TestAccS3ObjectCopy_disappears
=== RUN   TestAccS3ObjectCopy_tags
=== PAUSE TestAccS3ObjectCopy_tags
=== RUN   TestAccS3ObjectCopy_metadata
=== PAUSE TestAccS3ObjectCopy_metadata
=== RUN   TestAccS3ObjectCopy_grant
=== PAUSE TestAccS3ObjectCopy_grant
=== RUN   TestAccS3ObjectCopy_BucketKeyEnabled_bucket
=== PAUSE TestAccS3ObjectCopy_BucketKeyEnabled_bucket
=== RUN   TestAccS3ObjectCopy_BucketKeyEnabled_object
=== PAUSE TestAccS3ObjectCopy_BucketKeyEnabled_object
=== RUN   TestAccS3ObjectCopy_sourceWithSlashes
=== PAUSE TestAccS3ObjectCopy_sourceWithSlashes
=== RUN   TestAccS3ObjectCopy_checksumAlgorithm
=== PAUSE TestAccS3ObjectCopy_checksumAlgorithm
=== RUN   TestAccS3ObjectCopy_objectLockLegalHold
=== PAUSE TestAccS3ObjectCopy_objectLockLegalHold
=== RUN   TestAccS3ObjectCopy_targetWithMultipleSlashes
=== PAUSE TestAccS3ObjectCopy_targetWithMultipleSlashes
=== RUN   TestAccS3ObjectCopy_targetWithMultipleSlashesMigrated
=== PAUSE TestAccS3ObjectCopy_targetWithMultipleSlashesMigrated
=== RUN   TestAccS3ObjectCopy_directoryBucket
=== PAUSE TestAccS3ObjectCopy_directoryBucket
=== RUN   TestAccS3ObjectDataSource_basic
=== PAUSE TestAccS3ObjectDataSource_basic
=== RUN   TestAccS3ObjectDataSource_basicViaAccessPoint
=== PAUSE TestAccS3ObjectDataSource_basicViaAccessPoint
=== RUN   TestAccS3ObjectDataSource_readableBody
=== PAUSE TestAccS3ObjectDataSource_readableBody
=== RUN   TestAccS3ObjectDataSource_kmsEncrypted
=== PAUSE TestAccS3ObjectDataSource_kmsEncrypted
=== RUN   TestAccS3ObjectDataSource_bucketKeyEnabled
=== PAUSE TestAccS3ObjectDataSource_bucketKeyEnabled
=== RUN   TestAccS3ObjectDataSource_allParams
=== PAUSE TestAccS3ObjectDataSource_allParams
=== RUN   TestAccS3ObjectDataSource_objectLockLegalHoldOff
=== PAUSE TestAccS3ObjectDataSource_objectLockLegalHoldOff
=== RUN   TestAccS3ObjectDataSource_objectLockLegalHoldOn
=== PAUSE TestAccS3ObjectDataSource_objectLockLegalHoldOn
=== RUN   TestAccS3ObjectDataSource_leadingSlash
=== PAUSE TestAccS3ObjectDataSource_leadingSlash
=== RUN   TestAccS3ObjectDataSource_multipleSlashes
=== PAUSE TestAccS3ObjectDataSource_multipleSlashes
=== RUN   TestAccS3ObjectDataSource_singleSlashAsKey
=== PAUSE TestAccS3ObjectDataSource_singleSlashAsKey
=== RUN   TestAccS3ObjectDataSource_checksumMode
=== PAUSE TestAccS3ObjectDataSource_checksumMode
=== RUN   TestAccS3ObjectDataSource_metadata
=== PAUSE TestAccS3ObjectDataSource_metadata
=== RUN   TestAccS3ObjectDataSource_metadataUppercaseKey
=== PAUSE TestAccS3ObjectDataSource_metadataUppercaseKey
=== RUN   TestAccS3ObjectDataSource_directoryBucket
=== PAUSE TestAccS3ObjectDataSource_directoryBucket
=== RUN   TestAccS3Object_basic
=== PAUSE TestAccS3Object_basic
=== RUN   TestAccS3Object_upgradeFromV4
=== PAUSE TestAccS3Object_upgradeFromV4
=== RUN   TestAccS3Object_source
=== PAUSE TestAccS3Object_source
=== RUN   TestAccS3Object_content
=== PAUSE TestAccS3Object_content
=== RUN   TestAccS3Object_etagEncryption
=== PAUSE TestAccS3Object_etagEncryption
=== RUN   TestAccS3Object_contentBase64
=== PAUSE TestAccS3Object_contentBase64
=== RUN   TestAccS3Object_sourceHashTrigger
=== PAUSE TestAccS3Object_sourceHashTrigger
=== RUN   TestAccS3Object_withContentCharacteristics
=== PAUSE TestAccS3Object_withContentCharacteristics
=== RUN   TestAccS3Object_nonVersioned
=== PAUSE TestAccS3Object_nonVersioned
=== RUN   TestAccS3Object_updates
=== PAUSE TestAccS3Object_updates
=== RUN   TestAccS3Object_updateSameFile
=== PAUSE TestAccS3Object_updateSameFile
=== RUN   TestAccS3Object_updatesWithVersioning
=== PAUSE TestAccS3Object_updatesWithVersioning
=== RUN   TestAccS3Object_updatesWithVersioningViaAccessPoint
=== PAUSE TestAccS3Object_updatesWithVersioningViaAccessPoint
=== RUN   TestAccS3Object_kms
=== PAUSE TestAccS3Object_kms
=== RUN   TestAccS3Object_sse
=== PAUSE TestAccS3Object_sse
=== RUN   TestAccS3Object_acl
=== PAUSE TestAccS3Object_acl
=== RUN   TestAccS3Object_metadata
=== PAUSE TestAccS3Object_metadata
=== RUN   TestAccS3Object_storageClass
=== PAUSE TestAccS3Object_storageClass
=== RUN   TestAccS3Object_tags
=== PAUSE TestAccS3Object_tags
=== RUN   TestAccS3Object_tagsLeadingSingleSlash
=== PAUSE TestAccS3Object_tagsLeadingSingleSlash
=== RUN   TestAccS3Object_tagsLeadingMultipleSlashes
=== PAUSE TestAccS3Object_tagsLeadingMultipleSlashes
=== RUN   TestAccS3Object_tagsMultipleSlashes
=== PAUSE TestAccS3Object_tagsMultipleSlashes
=== RUN   TestAccS3Object_DefaultTags_providerOnly
=== PAUSE TestAccS3Object_DefaultTags_providerOnly
=== RUN   TestAccS3Object_DefaultTags_providerAndResource
=== PAUSE TestAccS3Object_DefaultTags_providerAndResource
=== RUN   TestAccS3Object_DefaultTags_providerAndResourceWithOverride
=== PAUSE TestAccS3Object_DefaultTags_providerAndResourceWithOverride
=== RUN   TestAccS3Object_objectLockLegalHoldStartWithNone
=== PAUSE TestAccS3Object_objectLockLegalHoldStartWithNone
=== RUN   TestAccS3Object_objectLockLegalHoldStartWithOn
=== PAUSE TestAccS3Object_objectLockLegalHoldStartWithOn
=== RUN   TestAccS3Object_objectLockRetentionStartWithNone
=== PAUSE TestAccS3Object_objectLockRetentionStartWithNone
=== RUN   TestAccS3Object_objectLockRetentionStartWithSet
=== PAUSE TestAccS3Object_objectLockRetentionStartWithSet
=== RUN   TestAccS3Object_objectBucketKeyEnabled
=== PAUSE TestAccS3Object_objectBucketKeyEnabled
=== RUN   TestAccS3Object_bucketBucketKeyEnabled
=== PAUSE TestAccS3Object_bucketBucketKeyEnabled
=== RUN   TestAccS3Object_defaultBucketSSE
=== PAUSE TestAccS3Object_defaultBucketSSE
=== RUN   TestAccS3Object_ignoreTags
=== PAUSE TestAccS3Object_ignoreTags
=== RUN   TestAccS3Object_checksumAlgorithm
=== PAUSE TestAccS3Object_checksumAlgorithm
=== RUN   TestAccS3Object_keyWithSlashesMigrated
=== PAUSE TestAccS3Object_keyWithSlashesMigrated
=== RUN   TestAccS3Object_directoryBucket
=== PAUSE TestAccS3Object_directoryBucket
=== RUN   TestAccS3Object_DirectoryBucket_DefaultTags_providerOnly
=== PAUSE TestAccS3Object_DirectoryBucket_DefaultTags_providerOnly
=== CONT  TestAccS3BucketPolicy_basic
=== CONT  TestAccS3Object_upgradeFromV4
=== CONT  TestAccS3Object_tagsLeadingSingleSlash
=== NAME  TestAccS3Object_upgradeFromV4
    object_test.go:173: TestStep 1/2 running init: exit status 1
        
        Error: Failed to query available provider packages
        
        Could not retrieve the list of available versions for provider hashicorp/aws:
        no available releases match the given constraints 4.67.0
        
--- FAIL: TestAccS3Object_upgradeFromV4 (10.21s)
=== CONT  TestAccS3ObjectCopy_targetWithMultipleSlashesMigrated
    object_copy_test.go:410: TestStep 1/2 running init: exit status 1
        
        Error: Failed to query available provider packages
        
        Could not retrieve the list of available versions for provider hashicorp/aws:
        no available releases match the given constraints 5.15.0
        
--- FAIL: TestAccS3ObjectCopy_targetWithMultipleSlashesMigrated (1.40s)
=== CONT  TestAccS3Object_basic
--- PASS: TestAccS3BucketPolicy_basic (52.13s)
=== CONT  TestAccS3ObjectDataSource_directoryBucket
--- PASS: TestAccS3Object_basic (46.48s)
=== CONT  TestAccS3ObjectDataSource_metadataUppercaseKey
--- PASS: TestAccS3ObjectDataSource_directoryBucket (29.05s)
=== CONT  TestAccS3ObjectDataSource_metadata
--- PASS: TestAccS3Object_tagsLeadingSingleSlash (112.11s)
=== CONT  TestAccS3ObjectDataSource_checksumMode
--- PASS: TestAccS3ObjectDataSource_metadataUppercaseKey (63.73s)
=== CONT  TestAccS3ObjectDataSource_singleSlashAsKey
--- PASS: TestAccS3ObjectDataSource_metadata (43.50s)
=== CONT  TestAccS3ObjectDataSource_multipleSlashes
--- PASS: TestAccS3ObjectDataSource_singleSlashAsKey (15.23s)
=== CONT  TestAccS3ObjectDataSource_leadingSlash
--- PASS: TestAccS3ObjectDataSource_checksumMode (42.90s)
=== CONT  TestAccS3ObjectDataSource_objectLockLegalHoldOn
--- PASS: TestAccS3ObjectDataSource_multipleSlashes (64.63s)
=== CONT  TestAccS3ObjectDataSource_objectLockLegalHoldOff
--- PASS: TestAccS3ObjectDataSource_leadingSlash (62.96s)
=== CONT  TestAccS3ObjectDataSource_allParams
--- PASS: TestAccS3ObjectDataSource_objectLockLegalHoldOn (47.59s)
=== CONT  TestAccS3ObjectDataSource_bucketKeyEnabled
--- PASS: TestAccS3ObjectDataSource_allParams (31.07s)
=== CONT  TestAccS3ObjectDataSource_kmsEncrypted
--- PASS: TestAccS3ObjectDataSource_objectLockLegalHoldOff (46.83s)
=== CONT  TestAccS3ObjectDataSource_readableBody
--- PASS: TestAccS3ObjectDataSource_bucketKeyEnabled (43.65s)
=== CONT  TestAccS3ObjectDataSource_basicViaAccessPoint
--- PASS: TestAccS3ObjectDataSource_kmsEncrypted (43.24s)
=== CONT  TestAccS3ObjectDataSource_basic
--- PASS: TestAccS3ObjectDataSource_readableBody (42.63s)
=== CONT  TestAccS3ObjectCopy_directoryBucket
--- PASS: TestAccS3ObjectDataSource_basicViaAccessPoint (43.45s)
=== CONT  TestAccS3Object_objectLockRetentionStartWithSet
--- PASS: TestAccS3ObjectCopy_directoryBucket (27.94s)
=== CONT  TestAccS3Object_DirectoryBucket_DefaultTags_providerOnly
--- PASS: TestAccS3ObjectDataSource_basic (42.27s)
=== CONT  TestAccS3Object_directoryBucket
--- PASS: TestAccS3Object_directoryBucket (29.93s)
=== CONT  TestAccS3Object_keyWithSlashesMigrated
    object_test.go:1625: TestStep 1/2 running init: exit status 1
        
        Error: Failed to query available provider packages
        
        Could not retrieve the list of available versions for provider hashicorp/aws:
        no available releases match the given constraints 5.16.0
        
--- FAIL: TestAccS3Object_keyWithSlashesMigrated (1.05s)
=== CONT  TestAccS3Object_checksumAlgorithm
--- PASS: TestAccS3Object_objectLockRetentionStartWithSet (116.86s)
=== CONT  TestAccS3Object_ignoreTags
--- PASS: TestAccS3Object_checksumAlgorithm (65.24s)
=== CONT  TestAccS3Object_defaultBucketSSE
--- PASS: TestAccS3Object_DirectoryBucket_DefaultTags_providerOnly (130.88s)
=== CONT  TestAccS3Object_updateSameFile
--- PASS: TestAccS3Object_defaultBucketSSE (25.33s)
=== CONT  TestAccS3Object_bucketBucketKeyEnabled
--- PASS: TestAccS3Object_ignoreTags (55.03s)
=== CONT  TestAccS3Object_tags
--- PASS: TestAccS3Object_bucketBucketKeyEnabled (29.34s)
=== CONT  TestAccS3Object_objectBucketKeyEnabled
--- PASS: TestAccS3Object_updateSameFile (57.68s)
=== CONT  TestAccS3Object_storageClass
--- PASS: TestAccS3Object_objectBucketKeyEnabled (42.99s)
=== CONT  TestAccS3Object_DefaultTags_providerAndResourceWithOverride
--- PASS: TestAccS3Object_DefaultTags_providerAndResourceWithOverride (54.15s)
=== CONT  TestAccS3Object_metadata
--- PASS: TestAccS3Object_tags (109.93s)
=== CONT  TestAccS3Object_objectLockRetentionStartWithNone
--- PASS: TestAccS3Object_storageClass (135.15s)
=== CONT  TestAccS3Object_objectLockLegalHoldStartWithOn
--- PASS: TestAccS3Object_metadata (89.96s)
=== CONT  TestAccS3Object_objectLockLegalHoldStartWithNone
--- PASS: TestAccS3Object_objectLockRetentionStartWithNone (95.90s)
=== CONT  TestAccS3Object_sourceHashTrigger
--- PASS: TestAccS3Object_objectLockLegalHoldStartWithOn (70.70s)
=== CONT  TestAccS3Object_acl
--- PASS: TestAccS3Object_sourceHashTrigger (68.99s)
=== CONT  TestAccS3Object_updates
--- PASS: TestAccS3Object_objectLockLegalHoldStartWithNone (94.71s)
=== CONT  TestAccS3Object_sse
--- PASS: TestAccS3Object_acl (86.75s)
=== CONT  TestAccS3Object_nonVersioned
    acctest.go:1683: skipping test; environment variable TF_ACC_ASSUME_ROLE_ARN must be set. Usage: Amazon Resource Name (ARN) of existing IAM Role to assume for testing restricted permissions
--- SKIP: TestAccS3Object_nonVersioned (0.00s)
=== CONT  TestAccS3Object_withContentCharacteristics
--- PASS: TestAccS3Object_updates (60.04s)
=== CONT  TestAccS3Object_updatesWithVersioningViaAccessPoint
--- PASS: TestAccS3Object_sse (48.80s)
=== CONT  TestAccS3Object_kms
--- PASS: TestAccS3Object_kms (32.06s)
=== CONT  TestAccS3Object_updatesWithVersioning
--- PASS: TestAccS3Object_withContentCharacteristics (43.92s)
=== CONT  TestAccS3Object_DefaultTags_providerAndResource
--- PASS: TestAccS3Object_updatesWithVersioningViaAccessPoint (77.14s)
=== CONT  TestAccS3Object_DefaultTags_providerOnly
--- PASS: TestAccS3Object_DefaultTags_providerAndResource (56.12s)
=== CONT  TestAccS3Object_tagsMultipleSlashes
--- PASS: TestAccS3Object_updatesWithVersioning (63.01s)
=== CONT  TestAccS3ObjectCopy_tags
--- PASS: TestAccS3Object_DefaultTags_providerOnly (46.59s)
=== CONT  TestAccS3ObjectCopy_sourceWithSlashes
--- PASS: TestAccS3ObjectCopy_tags (92.37s)
=== CONT  TestAccS3ObjectCopy_targetWithMultipleSlashes
--- PASS: TestAccS3ObjectCopy_sourceWithSlashes (68.38s)
=== CONT  TestAccS3ObjectCopy_BucketKeyEnabled_object
--- PASS: TestAccS3Object_tagsMultipleSlashes (107.84s)
=== CONT  TestAccS3ObjectCopy_objectLockLegalHold
--- PASS: TestAccS3ObjectCopy_targetWithMultipleSlashes (45.59s)
=== CONT  TestAccS3ObjectCopy_BucketKeyEnabled_bucket
--- PASS: TestAccS3ObjectCopy_BucketKeyEnabled_object (45.85s)
=== CONT  TestAccS3ObjectCopy_checksumAlgorithm
--- PASS: TestAccS3ObjectCopy_objectLockLegalHold (75.51s)
=== CONT  TestAccS3ObjectCopy_grant
--- PASS: TestAccS3ObjectCopy_BucketKeyEnabled_bucket (47.94s)
=== CONT  TestAccS3Bucket_Basic_forceDestroyWithObjectLockEnabled
=== CONT  TestAccS3ObjectCopy_metadata
--- PASS: TestAccS3ObjectCopy_checksumAlgorithm (67.14s)
--- PASS: TestAccS3ObjectCopy_grant (44.69s)
=== CONT  TestAccS3ObjectCopy_disappears
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithObjectLockEnabled (47.76s)
=== CONT  TestAccS3ObjectCopy_basic
--- PASS: TestAccS3ObjectCopy_metadata (43.42s)
=== CONT  TestAccS3Bucket_Basic_forceDestroy
--- PASS: TestAccS3ObjectCopy_disappears (43.21s)
=== CONT  TestAccS3Bucket_Basic_nameGenerated
--- PASS: TestAccS3ObjectCopy_basic (43.58s)
=== CONT  TestAccS3Bucket_Basic_basic
--- PASS: TestAccS3Bucket_Basic_forceDestroy (42.60s)
=== CONT  TestAccS3Object_content
--- PASS: TestAccS3Bucket_Basic_nameGenerated (31.54s)
=== CONT  TestAccS3Bucket_Basic_forceDestroyWithEmptyPrefixes
--- PASS: TestAccS3Bucket_Basic_basic (32.84s)
=== CONT  TestAccS3Object_etagEncryption
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithEmptyPrefixes (45.68s)
=== CONT  TestAccS3Bucket_disappears
--- PASS: TestAccS3Object_content (49.26s)
=== CONT  TestAccS3Object_contentBase64
--- PASS: TestAccS3Object_etagEncryption (47.21s)
=== CONT  TestAccS3Object_source
--- PASS: TestAccS3Bucket_disappears (37.52s)
=== CONT  TestAccS3Object_tagsLeadingMultipleSlashes
--- PASS: TestAccS3Object_contentBase64 (41.94s)
--- PASS: TestAccS3Object_source (45.09s)
--- PASS: TestAccS3Object_tagsLeadingMultipleSlashes (95.82s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/s3	1375.170s
FAIL
make: *** [testacc] Error 1

Failures are unrelated to this change.

@ewbankkit ewbankkit added new-resource Introduces a new resource. new-data-source Introduces a new data source. labels Nov 28, 2023
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small things. Otherwise, LGTM 🎉

% make testacc TESTARGS='-run=TestAccS3DirectoryBucket_' PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20  -run=TestAccS3DirectoryBucket_ -timeout 360m
=== RUN   TestAccS3DirectoryBucket_basic
=== PAUSE TestAccS3DirectoryBucket_basic
=== RUN   TestAccS3DirectoryBucket_disappears
=== PAUSE TestAccS3DirectoryBucket_disappears
=== CONT  TestAccS3DirectoryBucket_basic
=== CONT  TestAccS3DirectoryBucket_disappears
--- PASS: TestAccS3DirectoryBucket_disappears (95.52s)
--- PASS: TestAccS3DirectoryBucket_basic (99.13s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	101.449s

@@ -158,6 +158,10 @@ func resourceBucketAnalyticsConfigurationPut(ctx context.Context, d *schema.Reso
return conn.PutBucketAnalyticsConfiguration(ctx, input)
}, errCodeNoSuchBucket)

if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "AnalyticsConfiguration is not valid, expected CreateBucketConfiguration") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen error messages change before. AWS says they shouldn't be verbatim relied on. Using the shortest possible matching text might help avoid future problems.

Suggested change
if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "AnalyticsConfiguration is not valid, expected CreateBucketConfiguration") {
if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "Configuration is not valid") {

@@ -107,6 +107,10 @@ func resourceBucketCorsConfigurationCreate(ctx context.Context, d *schema.Resour
return conn.PutBucketCors(ctx, input)
}, errCodeNoSuchBucket)

if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "CORSConfiguration is not valid, expected CreateBucketConfiguration") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Suggested change
if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "CORSConfiguration is not valid, expected CreateBucketConfiguration") {
if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "Configuration is not valid") {

@@ -123,6 +123,10 @@ func resourceBucketIntelligentTieringConfigurationPut(ctx context.Context, d *sc
return conn.PutBucketIntelligentTieringConfiguration(ctx, input)
}, errCodeNoSuchBucket)

if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "IntelligentTieringConfiguration is not valid, expected CreateBucketConfiguration") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Suggested change
if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "IntelligentTieringConfiguration is not valid, expected CreateBucketConfiguration") {
if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "Configuration is not valid") {

@@ -219,6 +219,10 @@ func resourceBucketInventoryPut(ctx context.Context, d *schema.ResourceData, met
return conn.PutBucketInventoryConfiguration(ctx, input)
}, errCodeNoSuchBucket)

if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "InventoryConfiguration is not valid, expected CreateBucketConfiguration") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

Suggested change
if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "InventoryConfiguration is not valid, expected CreateBucketConfiguration") {
if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "Configuration is not valid") {

@@ -274,6 +274,10 @@ func resourceBucketLifecycleConfigurationCreate(ctx context.Context, d *schema.R
return conn.PutBucketLifecycleConfiguration(ctx, input)
}, errCodeNoSuchBucket)

if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "LifecycleConfiguration is not valid, expected CreateBucketConfiguration") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

Suggested change
if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "LifecycleConfiguration is not valid, expected CreateBucketConfiguration") {
if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "Configuration is not valid") {

internal/service/s3/directory_bucket.go Show resolved Hide resolved
PreCheck: func() { acctest.PreCheck(ctx, t) },
ErrorCheck: acctest.ErrorCheck(t, names.S3EndpointID),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
// FIXME "Error running post-test destroy, there may be dangling resources: operation error S3: HeadObject, https response error StatusCode: 403, RequestID: 0033eada6b00018c1826f0b80509eee5684ca4b6, HostID: T7lA2Yxglq, api error Forbidden: Forbidden"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have an issue for this?

internal/service/s3/object_test.go Show resolved Hide resolved
@@ -134,6 +134,8 @@ resource "aws_s3_object" "examplebucket_object" {
S3 objects support a [maximum of 10 tags](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html).
If the resource's own `tags` and the provider-level `default_tags` would together lead to more than 10 tags on an S3 object, use the `override_provider` configuration block to suppress any provider-level `default_tags`.

-> S3 objects stored in Amazon S3 Express directory buckets do not support tags, so any provider-level `default_tags` must be ignored.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-> S3 objects stored in Amazon S3 Express directory buckets do not support tags, so any provider-level `default_tags` must be ignored.
-> S3 objects stored in Amazon S3 Express directory buckets do not support tags, so any provider-level `default_tags` will be ignored.

Copy link
Contributor Author

@ewbankkit ewbankkit Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I actually mean must be suppressed as the block of text above is talking about -- I'll address in a follow-up, issue/PR.

@@ -74,6 +74,10 @@ func resourceBucketAccelerateConfigurationCreate(ctx context.Context, d *schema.
return conn.PutBucketAccelerateConfiguration(ctx, input)
}, errCodeNoSuchBucket)

if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "AccelerateConfiguration is not valid, expected CreateBucketConfiguration") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "AccelerateConfiguration is not valid, expected CreateBucketConfiguration") {
if tfawserr.ErrMessageContains(err, errCodeInvalidArgument, "Configuration is not valid") {

@ewbankkit ewbankkit merged commit 4260c30 into main Nov 29, 2023
81 checks passed
@ewbankkit ewbankkit deleted the f-s3-express branch November 29, 2023 00:00
@github-actions github-actions bot added this to the v5.28.0 milestone Nov 29, 2023
github-actions bot pushed a commit that referenced this pull request Nov 29, 2023
Copy link

This functionality has been released in v5.28.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. generators Relates to code generators. github_actions Pull requests that update Github_actions code new-data-source Introduces a new data source. new-resource Introduces a new resource. repository Repository modifications; GitHub Actions, developer docs, issue templates, codeowners, changelog. service/s3control Issues and PRs that pertain to the s3control service. service/s3 Issues and PRs that pertain to the s3 service. size/XL Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Amazon S3 Express One Zone storage class
3 participants