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

aws_s3_bucket: Fix can not use days = 0 with lifecycle transition. #957

Merged
merged 1 commit into from
Jun 25, 2017

Conversation

kjmkznr
Copy link
Contributor

@kjmkznr kjmkznr commented Jun 23, 2017

Add validate function in S3 bucket lifecycle's days attributes.

Put Bucket lifecycle

Type: Nonnegative Integer when used with Transition, Positive Integer when used with Expiration.

Test

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSS3Bucket_Lifecycle'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSS3Bucket_Lifecycle -timeout 120m
=== RUN   TestAccAWSS3Bucket_Lifecycle
--- PASS: TestAccAWSS3Bucket_Lifecycle (74.01s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       74.026s

Fixes: #952

Transition's days can use non-negative integer value.

Fixes: hashicorp#952
@radeksimko radeksimko added the bug Addresses a defect in current functionality. label Jun 25, 2017
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

✅ relevant debug log (credit goes to @devonbleak )
✅ simplest fix
✅ relevant tests covering bugfix
✅ mentioned how to run those tests
✅ reasonable commit message, single commit

This is perfect PR & issue, pleasure to pull in, thanks @kjmkznr!

btw. In cases like this I tend to run all resource-level relevant acceptance tests, just to be on the safe side (i.e. all of S3 bucket), but they all pass anyway, so 👌

@radeksimko radeksimko merged commit a0e9d6a into hashicorp:master Jun 25, 2017
@kjmkznr kjmkznr deleted the b-aws-s3-lifecycle-days branch June 25, 2017 15:28
@ghost
Copy link

ghost commented Apr 12, 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 and limited conversation to collaborators Apr 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

S3 lifecycle_rule transition with days = 0 has MalformedXML
2 participants