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

r/s3_bucket_acl: new resource #22853

Merged
merged 9 commits into from
Feb 5, 2022
Merged

r/s3_bucket_acl: new resource #22853

merged 9 commits into from
Feb 5, 2022

Conversation

anGie44
Copy link
Contributor

@anGie44 anGie44 commented Jan 31, 2022

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates #4418
Relates #20433

Output from acceptance testing:

--- PASS: TestBucketACLParseResourceID (0.00s)
    --- PASS: TestBucketACLParseResourceID/empty_ID (0.00s)
    --- PASS: TestBucketACLParseResourceID/incorrect_format_with_comma_separators (0.00s)
    --- PASS: TestBucketACLParseResourceID/incorrect_format_with_slash_separators (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket_and_acl (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket_and_bucket_owner (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket,_bucket_owner,_and_'private'_acl (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket,_bucket_owner,_and_'public-read'_acl (0.00s)

--- PASS: TestAccS3BucketAcl_ACLToGrant (176.79s)
--- PASS: TestAccS3BucketAcl_basic (102.26s)
--- PASS: TestAccS3BucketAcl_disappears (75.54s)
--- PASS: TestAccS3BucketAcl_grantToACL (177.39s)
--- PASS: TestAccS3BucketAcl_updateACL (177.84s)
--- PASS: TestAccS3BucketAcl_updateGrant (188.08s)

--- PASS: TestAccS3Bucket_Basic_acceleration (166.19s)
--- PASS: TestAccS3Bucket_Basic_basic (95.26s)
--- PASS: TestAccS3Bucket_Basic_emptyString (97.84s)
--- PASS: TestAccS3Bucket_Basic_forceDestroy (81.47s)
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithEmptyPrefixes (80.88s)
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithObjectLockEnabled (73.21s)
--- PASS: TestAccS3Bucket_Basic_generatedName (95.04s)
--- PASS: TestAccS3Bucket_Basic_keyEnabled (99.97s)
--- PASS: TestAccS3Bucket_Basic_namePrefix (95.36s)
--- PASS: TestAccS3Bucket_Basic_requestPayer (167.22s)
--- PASS: TestAccS3Bucket_Basic_shouldFailNotFound (74.23s)
--- PASS: TestAccS3Bucket_Manage_MfaDeleteDisabled (98.79s)
--- PASS: TestAccS3Bucket_Manage_lifecycleBasic (216.92s)
--- PASS: TestAccS3Bucket_Manage_lifecycleExpireMarkerOnly (174.43s)
--- PASS: TestAccS3Bucket_Manage_lifecycleRuleAbortIncompleteMultipartUploadDaysNoExpiration (104.56s)
--- PASS: TestAccS3Bucket_Manage_lifecycleRuleExpirationEmptyBlock (88.45s)
--- PASS: TestAccS3Bucket_Manage_objectLock (119.02s)
--- PASS: TestAccS3Bucket_Manage_versioning (188.42s)
--- PASS: TestAccS3Bucket_Manage_versioningAndMfaDeleteDisabled (100.65s)
--- PASS: TestAccS3Bucket_Manage_versioningDisabled (96.94s)
--- PASS: TestAccS3Bucket_Replication_RTC_valid (211.09s)
--- PASS: TestAccS3Bucket_Replication_basic (279.67s)
--- PASS: TestAccS3Bucket_Replication_expectVersioningValidationError (76.05s)
--- PASS: TestAccS3Bucket_Replication_multipleDestinationsEmptyFilter (167.08s)
--- PASS: TestAccS3Bucket_Replication_multipleDestinationsNonEmptyFilter (45.52s)
--- PASS: TestAccS3Bucket_Replication_ruleDestinationAccessControlTranslation (190.70s)
--- PASS: TestAccS3Bucket_Replication_ruleDestinationAddAccessControlTranslation (185.22s)
--- PASS: TestAccS3Bucket_Replication_schemaV2 (249.94s)
--- PASS: TestAccS3Bucket_Replication_schemaV2SameRegion (101.76s)
--- PASS: TestAccS3Bucket_Replication_twoDestination (150.03s)
--- PASS: TestAccS3Bucket_Replication_withoutPrefix (131.06s)
--- PASS: TestAccS3Bucket_Replication_withoutStorageClass (138.93s)
--- PASS: TestAccS3Bucket_Security_corsDelete (88.02s)
--- PASS: TestAccS3Bucket_Security_corsEmptyOrigin (102.19s)
--- PASS: TestAccS3Bucket_Security_corsUpdate (172.85s)
--- PASS: TestAccS3Bucket_Security_disableDefaultEncryptionWhenDefaultEncryptionIsEnabled (173.41s)
--- PASS: TestAccS3Bucket_Security_enableDefaultEncryptionWhenAES256IsUsed (100.32s)
--- PASS: TestAccS3Bucket_Security_enableDefaultEncryptionWhenTypical (99.19s)
--- PASS: TestAccS3Bucket_Security_logging (105.85s)
--- PASS: TestAccS3Bucket_Security_policy (240.21s)
--- PASS: TestAccS3Bucket_Tags_basic (100.57s)
--- PASS: TestAccS3Bucket_Tags_ignoreTags (154.12s)
--- PASS: TestAccS3Bucket_Tags_withNoSystemTags (312.28s)
--- PASS: TestAccS3Bucket_Tags_withSystemTags (363.75s)
--- PASS: TestAccS3Bucket_Web_redirect (238.31s)
--- PASS: TestAccS3Bucket_Web_routingRules (168.56s)
--- PASS: TestAccS3Bucket_Web_simple (237.33s)

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/cloudwatchlogs service/ec2 Issues and PRs that pertain to the ec2 service. service/ecs Issues and PRs that pertain to the ecs service. service/efs Issues and PRs that pertain to the efs service. service/eks Issues and PRs that pertain to the eks service. service/emr Issues and PRs that pertain to the emr service. service/inspector Issues and PRs that pertain to the inspector service. service/rds Issues and PRs that pertain to the rds service. service/s3 Issues and PRs that pertain to the s3 service. service/ssoadmin Issues and PRs that pertain to the ssoadmin service. sweeper Pertains to changes to or issues with the sweeper. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jan 31, 2022
@anGie44 anGie44 force-pushed the f-s3-bucket-acl-resource branch 2 times, most recently from e5f947a to c84e0ba Compare January 31, 2022 19:12
@github-actions github-actions bot removed sweeper Pertains to changes to or issues with the sweeper. service/meta service/rds Issues and PRs that pertain to the rds service. service/ssoadmin Issues and PRs that pertain to the ssoadmin service. service/ecs Issues and PRs that pertain to the ecs service. service/ec2 Issues and PRs that pertain to the ec2 service. service/emr Issues and PRs that pertain to the emr service. service/inspector Issues and PRs that pertain to the inspector service. labels Jan 31, 2022
@anGie44
Copy link
Contributor Author

anGie44 commented Feb 4, 2022

Output of acceptance tests after rebase/updates:

--- PASS: TestAccS3BucketAcl_ACLToGrant (176.31s)
--- PASS: TestAccS3BucketAcl_basic (100.78s)
--- PASS: TestAccS3BucketAcl_disappears (77.05s)
--- PASS: TestAccS3BucketAcl_grantToACL (179.24s)
--- PASS: TestAccS3BucketAcl_updateACL (176.41s)
--- PASS: TestAccS3BucketAcl_updateGrant (190.74s)

--- PASS: TestAccS3Bucket_Basic_acceleration (171.91s)
--- PASS: TestAccS3Bucket_Basic_basic (94.34s)
--- PASS: TestAccS3Bucket_Basic_emptyString (95.36s)
--- PASS: TestAccS3Bucket_Basic_forceDestroy (79.19s)
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithEmptyPrefixes (79.01s)
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithObjectLockEnabled (79.41s)
--- PASS: TestAccS3Bucket_Basic_generatedName (99.40s)
--- PASS: TestAccS3Bucket_Basic_keyEnabled (99.85s)
--- PASS: TestAccS3Bucket_Basic_namePrefix (96.57s)
--- PASS: TestAccS3Bucket_Basic_requestPayer (164.67s)
--- PASS: TestAccS3Bucket_Basic_shouldFailNotFound (73.71s)
--- PASS: TestAccS3Bucket_Manage_MfaDeleteDisabled (98.63s)
--- PASS: TestAccS3Bucket_Manage_lifecycleBasic (205.80s)
--- PASS: TestAccS3Bucket_Manage_lifecycleExpireMarkerOnly (174.04s)
--- PASS: TestAccS3Bucket_Manage_lifecycleRuleAbortIncompleteMultipartUploadDaysNoExpiration (104.13s)
--- PASS: TestAccS3Bucket_Manage_lifecycleRuleExpirationEmptyBlock (89.02s)
--- PASS: TestAccS3Bucket_Manage_objectLock (115.90s)
--- PASS: TestAccS3Bucket_Manage_versioning (186.95s)
--- PASS: TestAccS3Bucket_Manage_versioningAndMfaDeleteDisabled (100.16s)
--- PASS: TestAccS3Bucket_Manage_versioningDisabled (98.56s)
--- PASS: TestAccS3Bucket_Replication_RTC_valid (204.45s)
--- PASS: TestAccS3Bucket_Replication_basic (267.13s)
--- PASS: TestAccS3Bucket_Replication_expectVersioningValidationError (74.91s)
--- PASS: TestAccS3Bucket_Replication_multipleDestinationsEmptyFilter (167.64s)
--- PASS: TestAccS3Bucket_Replication_multipleDestinationsNonEmptyFilter (167.87s)
--- PASS: TestAccS3Bucket_Replication_ruleDestinationAccessControlTranslation (204.61s)
--- PASS: TestAccS3Bucket_Replication_ruleDestinationAddAccessControlTranslation (201.14s)
--- PASS: TestAccS3Bucket_Replication_schemaV2 (273.82s)
--- PASS: TestAccS3Bucket_Replication_schemaV2SameRegion (103.32s)
--- PASS: TestAccS3Bucket_Replication_twoDestination (47.57s)
--- PASS: TestAccS3Bucket_Replication_withoutPrefix (156.82s)
--- PASS: TestAccS3Bucket_Replication_withoutStorageClass (155.93s)
--- PASS: TestAccS3Bucket_Security_corsDelete (84.97s)
--- PASS: TestAccS3Bucket_Security_corsEmptyOrigin (102.57s)
--- PASS: TestAccS3Bucket_Security_corsUpdate (175.46s)
--- PASS: TestAccS3Bucket_Security_disableDefaultEncryptionWhenDefaultEncryptionIsEnabled (164.60s)
--- PASS: TestAccS3Bucket_Security_enableDefaultEncryptionWhenAES256IsUsed (97.50s)
--- PASS: TestAccS3Bucket_Security_enableDefaultEncryptionWhenTypical (97.83s)
--- PASS: TestAccS3Bucket_Security_logging (104.67s)
--- PASS: TestAccS3Bucket_Security_policy (244.55s)
--- PASS: TestAccS3Bucket_Tags_basic (101.21s)
--- PASS: TestAccS3Bucket_Tags_ignoreTags (151.92s)
--- PASS: TestAccS3Bucket_Tags_withNoSystemTags (321.93s)
--- PASS: TestAccS3Bucket_Tags_withSystemTags (355.61s)

@gdavison gdavison self-assigned this Feb 4, 2022
@anGie44
Copy link
Contributor Author

anGie44 commented Feb 4, 2022

@gdavison i just realized the tests in bucket_test.go need to be updated so will add in commit to do so (they might be failing atm) --- hmm or may they're ok and i'm just looking in the wrong place 😵

@anGie44 anGie44 force-pushed the f-s3-bucket-acl-resource branch 3 times, most recently from a00470c to 4e5b904 Compare February 4, 2022 21:02

// BucketACLParseResourceID is a method for parsing the ID string
// for the bucket name, accountID, and ACL if provided.
func BucketACLParseResourceID(id string) (string, string, string, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe this is too much just to store the optional "acl" ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a regex would be more straightforward for parsing

Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

Looks good! 🚀

--- PASS: TestBucketACLParseResourceID (0.00s)
--- PASS: TestBucketACLParseResourceID/empty_ID (0.00s)
--- PASS: TestBucketACLParseResourceID/incorrect_format_with_comma_separators (0.00s)
--- PASS: TestBucketACLParseResourceID/incorrect_format_with_slash_separators (0.00s)
--- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket (0.00s)
--- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket_and_acl (0.00s)
--- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket_and_bucket_owner (0.00s)
--- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket,_bucket_owner,and'private'_acl (0.00s)
--- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket,_bucket_owner,and'public-read'_acl (0.00s)
--- SKIP: TestAccS3BucketLogging_TargetGrantByEmail (0.00s)
--- SKIP: TestAccS3BucketReplicationConfiguration_existingObjectReplication (0.00s)
--- PASS: TestBucketName (0.00s)
--- PASS: TestBucketRegionalDomainName (0.00s)
--- PASS: TestWebsiteEndpoint (0.00s)
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithEmptyPrefixes (122.24s)
--- PASS: TestAccS3Bucket_Basic_forceDestroy (123.79s)
--- PASS: TestAccS3BucketVersioning_disappears (125.71s)
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithObjectLockEnabled (125.82s)
--- PASS: TestAccS3BucketWebsiteConfiguration_disappears (127.53s)
--- PASS: TestAccS3BucketAccelerateConfiguration_basic (136.28s)
--- PASS: TestAccS3BucketWebsiteConfiguration_Redirect (140.60s)
--- PASS: TestAccS3BucketWebsiteConfiguration_RoutingRules_RedirectOnly (140.63s)
--- PASS: TestAccS3BucketVersioning_MFADelete (141.89s)
--- PASS: TestAccS3BucketVersioning_basic (142.43s)
--- PASS: TestAccS3BucketWebsiteConfiguration_basic (146.32s)
--- PASS: TestAccS3Bucket_Replication_schemaV2SameRegion (148.38s)
--- PASS: TestAccS3Bucket_Manage_objectLock (223.22s)
--- PASS: TestAccS3Bucket_Replication_expectVersioningValidationError (114.60s)
--- PASS: TestAccS3BucketWebsiteConfiguration_RoutingRules_MultipleRules (244.92s)
--- PASS: TestAccS3BucketWebsiteConfiguration_update (251.45s)
--- PASS: TestAccS3Bucket_Manage_lifecycleRuleExpirationEmptyBlock (123.45s)
--- PASS: TestAccS3Bucket_Manage_lifecycleRuleAbortIncompleteMultipartUploadDaysNoExpiration (145.23s)
--- PASS: TestAccS3BucketObject_bucketObjectBucket (289.55s)
--- PASS: TestAccS3BucketVersioning_update (355.35s)
--- PASS: TestAccS3Bucket_Replication_withoutPrefix (243.78s)
--- PASS: TestAccS3Bucket_Replication_withoutStorageClass (248.47s)
--- PASS: TestAccS3Bucket_Replication_twoDestination (242.02s)
--- PASS: TestAccS3Bucket_Replication_multipleDestinationsEmptyFilter (238.18s)
--- PASS: TestAccS3Bucket_Security_corsDelete (135.39s)
--- PASS: TestAccS3Bucket_Security_corsEmptyOrigin (145.23s)
--- PASS: TestAccS3BucketWebsiteConfiguration_RoutingRules_ConditionAndRedirect (390.26s)
--- PASS: TestAccS3Bucket_Replication_multipleDestinationsNonEmptyFilter (249.89s)
--- PASS: TestAccS3Bucket_Manage_lifecycleExpireMarkerOnly (244.20s)
--- PASS: TestAccS3Bucket_Security_logging (163.64s)
--- PASS: TestAccS3Bucket_Manage_versioningAndMfaDeleteDisabled (141.18s)
--- PASS: TestAccS3Bucket_Manage_MfaDeleteDisabled (143.50s)
--- PASS: TestAccS3Bucket_Basic_shouldFailNotFound (101.87s)
--- PASS: TestAccS3Bucket_Manage_versioningDisabled (138.29s)
--- PASS: TestAccS3Bucket_Security_corsUpdate (243.89s)
--- PASS: TestAccS3Bucket_Basic_keyEnabled (145.23s)
--- PASS: TestAccS3Bucket_Security_enableDefaultEncryptionWhenAES256IsUsed (137.50s)
--- PASS: TestAccS3Bucket_Security_enableDefaultEncryptionWhenTypical (147.30s)
--- PASS: TestAccS3Bucket_Replication_ruleDestinationAddAccessControlTranslation (414.39s)
--- PASS: TestAccS3Bucket_Basic_generatedName (140.22s)
--- PASS: TestAccS3Bucket_Replication_ruleDestinationAccessControlTranslation (418.10s)
--- PASS: TestAccS3Bucket_Manage_lifecycleBasic (333.69s)
--- PASS: TestAccS3Bucket_Basic_namePrefix (129.32s)
--- PASS: TestAccS3Bucket_Tags_basic (137.64s)
--- PASS: TestAccS3Bucket_Manage_versioning (220.42s)
--- PASS: TestAccS3Bucket_Security_disableDefaultEncryptionWhenDefaultEncryptionIsEnabled (214.47s)
--- PASS: TestAccS3Bucket_Basic_requestPayer (207.02s)
--- PASS: TestAccS3Bucket_Basic_acceleration (216.54s)
--- PASS: TestAccS3Bucket_Basic_basic (101.36s)
--- PASS: TestAccS3Bucket_Basic_emptyString (103.52s)
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMSWithMasterKeyArn (98.98s)
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMSWithMasterKeyID (104.55s)
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMS (102.83s)
--- PASS: TestAccS3Bucket_Security_policy (273.27s)
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_ApplySEEByDefault_AES256 (102.46s)
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_disappears (87.53s)
--- PASS: TestAccS3Bucket_Replication_RTC_valid (674.17s)
--- PASS: TestAccS3Bucket_Tags_ignoreTags (202.48s)
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_basic (104.67s)
--- PASS: TestAccS3BucketRequestPaymentConfiguration_Basic_Requester (110.77s)
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_BucketKeyEnabled (192.31s)
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_BucketKeyEnabled (195.47s)
--- PASS: TestAccS3BucketRequestPaymentConfiguration_Basic_BucketOwner (111.71s)
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_UpdateSSEAlgorithm (198.63s)
--- PASS: TestAccS3Bucket_Replication_basic (660.27s)
--- PASS: TestAccS3Bucket_Replication_schemaV2 (826.22s)
--- PASS: TestAccS3Bucket_Tags_withNoSystemTags (330.04s)
--- PASS: TestAccS3BucketRequestPaymentConfiguration_update (255.88s)
--- PASS: TestAccS3BucketReplicationConfiguration_disappears (113.07s)
--- PASS: TestAccS3Bucket_Tags_withSystemTags (387.26s)
--- PASS: TestAccS3BucketReplicationConfiguration_schemaV2SameRegion (233.06s)
--- PASS: TestAccS3BucketPublicAccessBlock_Disappears_bucket (32.67s)
--- PASS: TestAccS3BucketPublicAccessBlock_disappears (34.14s)
--- PASS: TestAccS3BucketPublicAccessBlock_restrictPublicBuckets (109.63s)
--- PASS: TestAccS3BucketPublicAccessBlock_ignorePublicACLs (102.35s)
--- PASS: TestAccS3BucketPublicAccessBlock_blockPublicPolicy (95.54s)
--- PASS: TestAccS3BucketPublicAccessBlock_basic (36.05s)
--- PASS: TestAccS3BucketPublicAccessBlock_blockPublicACLs (86.81s)
--- PASS: TestAccS3BucketPolicy_basic (27.04s)
--- PASS: TestAccS3BucketPolicy_policyUpdate (44.76s)
--- PASS: TestAccS3BucketOwnershipControls_Disappears_bucket (20.12s)
--- PASS: TestAccS3BucketOwnershipControls_Rule_objectOwnership (41.75s)
--- PASS: TestAccS3BucketReplicationConfiguration_withoutPrefix (381.86s)
--- PASS: TestAccS3BucketOwnershipControls_disappears (24.12s)
--- PASS: TestAccS3BucketPolicy_IAMRoleOrder_policyDocNotPrincipal (86.07s)
--- PASS: TestAccS3BucketPolicy_IAMRoleOrder_policyDoc (81.29s)
--- PASS: TestAccS3BucketOwnershipControls_basic (31.08s)
--- PASS: TestAccS3BucketReplicationConfiguration_filter_tagFilter (393.57s)
--- PASS: TestAccS3BucketObjectsDataSource_fetchOwner (45.97s)
--- PASS: TestAccS3BucketReplicationConfiguration_schemaV2DestinationMetrics (398.60s)
--- PASS: TestAccS3BucketObjectsDataSource_startAfter (50.91s)
--- PASS: TestAccS3BucketReplicationConfiguration_replicaModifications (389.08s)
--- PASS: TestAccS3BucketReplicationConfiguration_withoutStorageClass (390.36s)
--- PASS: TestAccS3BucketReplicationConfiguration_schemaV2 (391.20s)
--- PASS: TestAccS3BucketReplicationConfiguration_replicationTimeControl (394.13s)
--- PASS: TestAccS3BucketObjectsDataSource_maxKeys (56.89s)
--- PASS: TestAccS3BucketObjectsDataSource_encoded (59.23s)
--- PASS: TestAccS3BucketObjectsDataSource_all (63.80s)
--- PASS: TestAccS3BucketObjectsDataSource_prefixes (68.56s)
--- PASS: TestAccS3BucketReplicationConfiguration_multipleDestinationsNonEmptyFilter (373.46s)
--- PASS: TestAccS3BucketReplicationConfiguration_twoDestination (379.46s)
--- PASS: TestAccS3BucketReplicationConfiguration_multipleDestinationsEmptyFilter (375.49s)
--- PASS: TestAccS3BucketPolicy_IAMRoleOrder_jsonEncode (182.30s)
--- PASS: TestAccS3BucketReplicationConfiguration_filter_andOperator (475.50s)
--- PASS: TestAccS3BucketObject_bucketBucketKeyEnabled (56.56s)
--- PASS: TestAccS3BucketObjectsDataSource_basicViaAccessPoint (83.18s)
--- PASS: TestAccS3BucketObject_defaultBucketSSE (60.49s)
--- PASS: TestAccS3BucketObject_objectBucketKeyEnabled (59.43s)
--- PASS: TestAccS3BucketObjectsDataSource_basic (87.66s)
--- PASS: TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAddAccessControlTranslation (447.70s)
--- PASS: TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAccessControlTranslation (433.25s)
--- PASS: TestAccS3BucketMetric_withFilterPrefixAndSingleTag (124.88s)
--- SKIP: TestAccS3BucketObject_nonVersioned (0.00s)
--- PASS: TestAccS3BucketObject_ignoreTags (130.34s)
--- PASS: TestAccS3BucketReplicationConfiguration_basic (397.65s)
--- PASS: TestAccS3BucketObject_objectLockLegalHoldStartWithOn (130.41s)
--- PASS: TestAccS3BucketObject_sse (88.63s)
--- PASS: TestAccS3BucketObject_kms (92.95s)
--- PASS: TestAccS3BucketObject_objectLockRetentionStartWithNone (193.00s)
--- PASS: TestAccS3BucketObject_withContentCharacteristics (92.01s)
--- PASS: TestAccS3BucketObject_updatesWithVersioningViaAccessPoint (155.62s)
--- PASS: TestAccS3BucketObject_contentBase64 (91.51s)
--- PASS: TestAccS3BucketObject_updatesWithVersioning (160.34s)
--- PASS: TestAccS3BucketObject_objectLockLegalHoldStartWithNone (200.29s)
--- PASS: TestAccS3BucketObject_updateSameFile (152.69s)
--- PASS: TestAccS3BucketObject_noNameNoKey (22.64s)
--- PASS: TestAccS3BucketObject_content (99.96s)
--- PASS: TestAccS3BucketObject_etagEncryption (100.67s)
--- PASS: TestAccS3BucketObject_updates (164.59s)
--- PASS: TestAccS3BucketObject_source (105.11s)
--- PASS: TestAccS3BucketObject_objectLockRetentionStartWithSet (260.74s)
--- PASS: TestAccS3BucketObject_metadata (226.04s)
--- PASS: TestAccS3BucketObject_acl (229.14s)
--- PASS: TestAccS3BucketObject_sourceHashTrigger (168.42s)
--- PASS: TestAccS3BucketObject_empty (100.48s)
--- PASS: TestAccS3BucketObject_tagsMultipleSlashes (275.36s)
--- PASS: TestAccS3BucketObjectDataSource_singleSlashAsKey (84.15s)
--- PASS: TestAccS3BucketObjectLockConfiguration_disappears (92.62s)
--- PASS: TestAccS3BucketObject_tagsLeadingMultipleSlashes (285.15s)
--- PASS: TestAccS3BucketObjectLockConfiguration_basic (107.50s)
--- PASS: TestAccS3BucketObject_tagsLeadingSingleSlash (291.84s)
--- PASS: TestAccS3BucketObjectDataSource_objectLockLegalHoldOff (90.18s)
--- PASS: TestAccS3BucketObjectDataSource_objectLockLegalHoldOn (91.19s)
--- PASS: TestAccS3BucketObjectDataSource_allParams (93.03s)
--- PASS: TestAccS3BucketObject_tags (299.31s)
--- PASS: TestAccS3BucketObjectDataSource_bucketKeyEnabled (91.00s)
--- PASS: TestAccS3BucketObjectDataSource_kmsEncrypted (92.17s)
--- PASS: TestAccS3BucketObjectDataSource_readableBody (89.55s)
--- PASS: TestAccS3BucketMetric_withEmptyFilter (15.34s)
--- PASS: TestAccS3BucketObjectDataSource_basicViaAccessPoint (91.06s)
--- PASS: TestAccS3BucketObjectDataSource_basic (85.85s)
--- PASS: TestAccS3BucketObjectDataSource_multipleSlashes (149.13s)
--- PASS: TestAccS3BucketObjectDataSource_leadingSlash (152.14s)
--- PASS: TestAccS3BucketObjectLockConfiguration_update (174.14s)
--- PASS: TestAccS3BucketNotification_Topic_multiple (97.43s)
--- PASS: TestAccS3BucketNotification_topic (101.01s)
--- PASS: TestAccS3BucketObject_storageClass (366.66s)
--- PASS: TestAccS3BucketNotification_eventbridge (92.32s)
--- PASS: TestAccS3BucketDataSource_website (90.17s)
--- PASS: TestAccS3BucketNotification_LambdaFunctionLambdaFunctionARN_alias (121.13s)
--- PASS: TestAccS3BucketNotification_lambdaFunction (119.34s)
--- PASS: TestAccS3BucketNotification_queue (135.58s)
--- PASS: TestAccS3BucketMetric_basic (92.79s)
--- PASS: TestAccS3BucketLogging_disappears (92.30s)
--- PASS: TestAccS3BucketNotification_update (191.34s)
--- PASS: TestAccS3BucketLogging_basic (109.21s)
--- PASS: TestAccS3BucketMetric_withFilterMultipleTags (159.00s)
--- PASS: TestAccS3BucketMetric_withFilterSingleTag (163.69s)
--- PASS: TestAccS3BucketMetric_withFilterPrefix (156.90s)
--- PASS: TestAccS3BucketMetric_withFilterPrefixAndMultipleTags (158.45s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_disappears (68.32s)
--- PASS: TestAccS3BucketInventory_encryptWithSSEKMS (79.08s)
--- PASS: TestAccS3BucketInventory_encryptWithSSES3 (79.20s)
--- PASS: TestAccS3BucketInventory_basic (81.74s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_basic (74.12s)
--- PASS: TestAccS3BucketLogging_TargetGrantByGroup (223.81s)
--- PASS: TestAccS3BucketLogging_TargetGrantByID (225.14s)
--- PASS: TestAccS3BucketLogging_update (222.70s)
--- PASS: TestAccS3BucketLifecycleConfiguration_RuleExpiration_EmptyBlock (217.33s)
--- PASS: TestAccS3BucketDataSource_basic (47.45s)
--- PASS: TestAccS3BucketCorsConfiguration_MultipleRules (53.01s)
--- PASS: TestAccS3BucketAnalyticsConfiguration_WithStorageClassAnalysis_empty (8.91s)
--- PASS: TestAccS3BucketCorsConfiguration_SingleRule (54.24s)
--- PASS: TestAccS3BucketLifecycleConfiguration_Prefix (218.54s)
--- PASS: TestAccS3BucketCorsConfiguration_disappears (45.67s)
--- PASS: TestAccS3BucketLifecycleConfiguration_NonCurrentVersionTransition (218.73s)
--- PASS: TestAccS3BucketLifecycleConfiguration_NonCurrentVersionExpiration (220.26s)
--- PASS: TestAccS3BucketCorsConfiguration_basic (56.43s)
--- PASS: TestAccS3BucketAnalyticsConfiguration_WithFilter_empty (12.93s)
--- PASS: TestAccS3BucketAnalyticsConfiguration_WithStorageClassAnalysis_full (60.06s)
--- PASS: TestAccS3BucketAnalyticsConfiguration_WithFilter_singleTag (90.17s)
--- PASS: TestAccS3BucketLifecycleConfiguration_disappears (201.46s)
--- PASS: TestAccS3BucketLifecycleConfiguration_MultipleRules (215.97s)
--- PASS: TestAccS3BucketLifecycleConfiguration_RuleAbortIncompleteMultipartUpload (290.05s)
--- PASS: TestAccS3BucketLifecycleConfiguration_basic (206.99s)
--- PASS: TestAccS3BucketAnalyticsConfiguration_WithStorageClassAnalysis_default (66.00s)
--- PASS: TestAccS3BucketLifecycleConfiguration_RuleExpiration_ExpireMarkerOnly (283.26s)
--- PASS: TestAccS3BucketLifecycleConfiguration_FilterWithPrefix (261.46s)
--- PASS: TestAccS3BucketAcl_disappears (61.83s)
--- PASS: TestAccS3BucketCorsConfiguration_update (152.32s)
--- PASS: TestAccS3BucketAnalyticsConfiguration_basic (82.25s)
--- PASS: TestAccS3BucketLifecycleConfiguration_DisableRule (293.36s)
--- PASS: TestAccS3BucketAnalyticsConfiguration_WithFilter_remove (121.26s)
--- PASS: TestAccS3BucketAccelerateConfiguration_disappears (70.53s)
--- PASS: TestAccS3BucketAnalyticsConfiguration_WithFilter_multipleTags (121.58s)
--- PASS: TestAccS3BucketAnalyticsConfiguration_WithFilter_prefixAndTags (124.53s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_Filter (257.36s)
--- PASS: TestAccS3BucketAcl_basic (80.47s)
--- PASS: TestAccS3BucketAcl_ACLToGrant (130.26s)
--- PASS: TestAccS3BucketAnalyticsConfiguration_WithFilter_prefix (121.91s)
--- PASS: TestAccS3BucketAnalyticsConfiguration_removed (109.89s)
--- PASS: TestAccS3BucketAcl_grantToACL (113.32s)
--- PASS: TestAccS3BucketAcl_updateACL (110.20s)
--- PASS: TestAccS3BucketAcl_updateGrant (114.03s)
--- PASS: TestAccS3BucketAccelerateConfiguration_update (93.02s)
--- PASS: TestAccS3BucketAnalyticsConfiguration_updateBasic (127.34s)


// BucketACLParseResourceID is a method for parsing the ID string
// for the bucket name, accountID, and ACL if provided.
func BucketACLParseResourceID(id string) (string, string, string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a regex would be more straightforward for parsing

website/docs/r/s3_bucket_acl.html.markdown Show resolved Hide resolved
@anGie44 anGie44 force-pushed the f-s3-bucket-acl-resource branch 2 times, most recently from b60ea68 to 0a1c397 Compare February 5, 2022 01:46
@anGie44
Copy link
Contributor Author

anGie44 commented Feb 5, 2022

Output of acceptance tests:

--- PASS: TestBucketACLParseResourceID (0.01s)
    --- PASS: TestBucketACLParseResourceID/empty_ID (0.00s)
    --- PASS: TestBucketACLParseResourceID/incorrect_bucket_and_account_ID_format_with_slash_separator (0.00s)
    --- PASS: TestBucketACLParseResourceID/incorrect_bucket,_account_ID,_and_ACL_format_with_slash_separators (0.00s)
    --- PASS: TestBucketACLParseResourceID/incorrect_bucket,_account_ID,_and_ACL_format_with_mixed_separators (0.00s)
    --- PASS: TestBucketACLParseResourceID/incorrect_bucket,_ACL,_and_account_ID_format (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket_that_has_hyphens (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket_that_has_dot_and_hyphens (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket_that_has_dots,_hyphen,_and_numbers (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket_and_acl (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket_and_acl_that_has_hyphens (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket_that_has_dot,_hyphen,_and_number_and_acl_that_has_hyphens (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket_and_bucket_owner (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket_that_has_dot,_hyphen,_and_number_and_bucket_owner (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket,_bucket_owner,_and_acl (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket,_bucket_owner,_and_acl_that_has_hyphens (0.00s)
    --- PASS: TestBucketACLParseResourceID/valid_ID_with_bucket_that_has_dot,_hyphen,_and_numbers,_bucket_owner,_and_acl_that_has_hyphens (0.00s)

--- PASS: TestAccS3BucketAcl_disappears (23.83s)
--- PASS: TestAccS3BucketAcl_basic (33.79s)
--- PASS: TestAccS3BucketAcl_updateACL (57.52s)
--- PASS: TestAccS3BucketAcl_grantToACL (58.68s)
--- PASS: TestAccS3BucketAcl_ACLToGrant (59.76s)
--- PASS: TestAccS3BucketAcl_updateGrant (62.28s)

@anGie44 anGie44 merged commit cf6dd26 into main Feb 5, 2022
@anGie44 anGie44 deleted the f-s3-bucket-acl-resource branch February 5, 2022 02:19
github-actions bot pushed a commit that referenced this pull request Feb 5, 2022
@github-actions
Copy link

This functionality has been released in v4.0.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!

@github-actions
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 May 21, 2022
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. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/s3 Issues and PRs that pertain to the s3 service. size/XL Managed by automation to categorize the size of a PR. 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.

2 participants