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

New Resource: aws_s3control_bucket_lifecycle_configuration #15604

Merged
merged 4 commits into from
Oct 28, 2020

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Oct 12, 2020

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

Reference: aws/aws-sdk-go#3591
Reference: #15412
Requires #15468
Requires #15510
Closes #15415

Release note for CHANGELOG:

* **New Resource:** `aws_s3control_bucket_lifecycle_configuration`

Output from acceptance testing (note everything except AbortIncompleteMultipartUpload was tested before losing Outpost access):

--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_basic (59.06s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_disappears (59.96s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Expiration_Date (70.35s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Expiration_Days (57.63s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Filter_Prefix (64.31s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Filter_Tags (62.22s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Id (73.91s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Status (65.70s)

@bflad bflad added new-resource Introduces a new resource. service/s3control Issues and PRs that pertain to the s3control service. labels Oct 12, 2020
@bflad bflad requested a review from a team October 12, 2020 17:12
@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels Oct 12, 2020
@bflad bflad force-pushed the f-aws_s3control_lifecycle_configuration branch from 35bae7c to 2572c32 Compare October 12, 2020 17:29
Reference: #15412
Reference: #15415

Output from acceptance testing (note everything except AbortIncompleteMultipartUpload was tested before losing Outpost access):

```
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_basic (59.06s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_disappears (59.96s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Expiration_Date (70.35s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Expiration_Days (57.63s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Filter_Prefix (64.31s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Filter_Tags (62.22s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Id (73.91s)
--- PASS: TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Status (65.70s)
```
@bflad bflad force-pushed the f-aws_s3control_lifecycle_configuration branch from 2572c32 to 736ca48 Compare October 16, 2020 19:12
Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

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

LGTM -- just a couple small q's and noting updating an existing tags key:value pair may be affected by the open issue in the AWS SDK(aws/aws-sdk-go#3591)

}

func TestAccAWSS3ControlBucketLifecycleConfiguration_Rule_Expiration_ExpiredObjectDeleteMarker(t *testing.T) {
TestAccSkip(t, "S3 on Outposts does not error or save it in the API when receiving this parameter")
Copy link
Contributor

Choose a reason for hiding this comment

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

given this behavior - should this be documented in the resource docs for users?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hopefully my out of band answer sufficed here, but we can certainly add this post merge if necessary. 👍

Comment on lines +63 to +74
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
value := v.(string)

_, err := time.Parse("2006-01-02", value)

if err != nil {
errors = append(errors, fmt.Errorf("%q should be in YYYY-MM-DD date format", value))
}

return
},
},
Copy link
Contributor

Choose a reason for hiding this comment

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

could also live in validators.go ? or possibly getting too large to keep populating ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Partially related to #8424 -- although in this case its something that would ultimately be a good candidate for there (or a similar shared location) if it had more usage than just here and the aws_s3_bucket resource. 👍

bflad added 3 commits October 27, 2020 17:33

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@bflad bflad added this to the v3.13.0 milestone Oct 28, 2020
@bflad bflad merged commit 8a420bb into master Oct 28, 2020
@bflad bflad deleted the f-aws_s3control_lifecycle_configuration branch October 28, 2020 13:16
bflad added a commit that referenced this pull request Oct 28, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@ghost
Copy link

ghost commented Oct 29, 2020

This has been released in version 3.13.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 for triage. Thanks!

@ghost
Copy link

ghost commented Nov 27, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Nov 27, 2020
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/s3control Issues and PRs that pertain to the s3control service. size/XXL 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.

New Resource: aws_s3control_bucket_lifecycle_configuration
2 participants