-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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_lifecycle_configuration: make new_noncurrent_versions
arguments nullable ints to prevent drift and fix other nullable int args (filter.object_size_greater_than
and filter.object_size_less_than
)
#23441
r/s3_bucket_lifecycle_configuration: make new_noncurrent_versions
arguments nullable ints to prevent drift and fix other nullable int args (filter.object_size_greater_than
and filter.object_size_less_than
)
#23441
Conversation
9ee9a58
to
6640adc
Compare
b433c1b
to
e40d97e
Compare
…uments nullable ints
e40d97e
to
4b0c7f7
Compare
a4b7856
to
57e2c5d
Compare
new_noncurrent_versions
arguments nullablenew_noncurrent_versions
arguments nullable int to prevent drift
new_noncurrent_versions
arguments nullable int to prevent driftnew_noncurrent_versions
arguments nullable int to prevent drift and fix other nullable int args
new_noncurrent_versions
arguments nullable int to prevent drift and fix other nullable int argsnew_noncurrent_versions
arguments nullable ints to prevent drift and fix other nullable int args
new_noncurrent_versions
arguments nullable ints to prevent drift and fix other nullable int argsnew_noncurrent_versions
arguments nullable ints to prevent drift and fix other nullable int args (filter.object_size_greater_than
and filte.object_size_less_than
)
new_noncurrent_versions
arguments nullable ints to prevent drift and fix other nullable int args (filter.object_size_greater_than
and filte.object_size_less_than
)new_noncurrent_versions
arguments nullable ints to prevent drift and fix other nullable int args (filter.object_size_greater_than
and filter.object_size_less_than
)
@@ -164,9 +164,9 @@ func ResourceBucketLifecycleConfiguration() *schema.Resource { | |||
Elem: &schema.Resource{ | |||
Schema: map[string]*schema.Schema{ | |||
"newer_noncurrent_versions": { | |||
Type: schema.TypeInt, | |||
Type: nullable.TypeNullableInt, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only potential "problem" I see is that this could change user expectations when using the value as an output variable. Previously was null
or 0
, now it will be the empty String when not configured
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTS=TestAccS3BucketLifecycleConfiguration_ 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='TestAccS3BucketLifecycleConfiguration_' -timeout 180m
=== RUN TestAccS3BucketLifecycleConfiguration_basic
=== PAUSE TestAccS3BucketLifecycleConfiguration_basic
=== RUN TestAccS3BucketLifecycleConfiguration_disappears
=== PAUSE TestAccS3BucketLifecycleConfiguration_disappears
=== RUN TestAccS3BucketLifecycleConfiguration_filterWithPrefix
=== PAUSE TestAccS3BucketLifecycleConfiguration_filterWithPrefix
=== RUN TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeGreaterThan
=== PAUSE TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeGreaterThan
=== RUN TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeLessThan
=== PAUSE TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeLessThan
=== RUN TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeRange
=== PAUSE TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeRange
=== RUN TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeRangeAndPrefix
=== PAUSE TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeRangeAndPrefix
=== RUN TestAccS3BucketLifecycleConfiguration_disableRule
=== PAUSE TestAccS3BucketLifecycleConfiguration_disableRule
=== RUN TestAccS3BucketLifecycleConfiguration_multipleRules
=== PAUSE TestAccS3BucketLifecycleConfiguration_multipleRules
=== RUN TestAccS3BucketLifecycleConfiguration_nonCurrentVersionExpiration
=== PAUSE TestAccS3BucketLifecycleConfiguration_nonCurrentVersionExpiration
=== RUN TestAccS3BucketLifecycleConfiguration_nonCurrentVersionTransition
=== PAUSE TestAccS3BucketLifecycleConfiguration_nonCurrentVersionTransition
=== RUN TestAccS3BucketLifecycleConfiguration_prefix
=== PAUSE TestAccS3BucketLifecycleConfiguration_prefix
=== RUN TestAccS3BucketLifecycleConfiguration_Filter_Tag
=== PAUSE TestAccS3BucketLifecycleConfiguration_Filter_Tag
=== RUN TestAccS3BucketLifecycleConfiguration_RuleExpiration_expireMarkerOnly
=== PAUSE TestAccS3BucketLifecycleConfiguration_RuleExpiration_expireMarkerOnly
=== RUN TestAccS3BucketLifecycleConfiguration_RuleExpiration_emptyBlock
=== PAUSE TestAccS3BucketLifecycleConfiguration_RuleExpiration_emptyBlock
=== RUN TestAccS3BucketLifecycleConfiguration_ruleAbortIncompleteMultipartUpload
=== PAUSE TestAccS3BucketLifecycleConfiguration_ruleAbortIncompleteMultipartUpload
=== RUN TestAccS3BucketLifecycleConfiguration_TransitionDate_standardIa
=== PAUSE TestAccS3BucketLifecycleConfiguration_TransitionDate_standardIa
=== RUN TestAccS3BucketLifecycleConfiguration_TransitionDate_intelligentTiering
=== PAUSE TestAccS3BucketLifecycleConfiguration_TransitionDate_intelligentTiering
=== RUN TestAccS3BucketLifecycleConfiguration_TransitionStorageClassOnly_intelligentTiering
=== PAUSE TestAccS3BucketLifecycleConfiguration_TransitionStorageClassOnly_intelligentTiering
=== RUN TestAccS3BucketLifecycleConfiguration_TransitionZeroDays_intelligentTiering
=== PAUSE TestAccS3BucketLifecycleConfiguration_TransitionZeroDays_intelligentTiering
=== RUN TestAccS3BucketLifecycleConfiguration_TransitionUpdateBetweenDaysAndDate_intelligentTiering
=== PAUSE TestAccS3BucketLifecycleConfiguration_TransitionUpdateBetweenDaysAndDate_intelligentTiering
=== RUN TestAccS3BucketLifecycleConfiguration_EmptyFilter_NonCurrentVersions
=== PAUSE TestAccS3BucketLifecycleConfiguration_EmptyFilter_NonCurrentVersions
=== CONT TestAccS3BucketLifecycleConfiguration_basic
=== CONT TestAccS3BucketLifecycleConfiguration_prefix
=== CONT TestAccS3BucketLifecycleConfiguration_TransitionDate_intelligentTiering
--- PASS: TestAccS3BucketLifecycleConfiguration_prefix (196.44s)
=== CONT TestAccS3BucketLifecycleConfiguration_TransitionDate_standardIa
--- PASS: TestAccS3BucketLifecycleConfiguration_basic (196.59s)
=== CONT TestAccS3BucketLifecycleConfiguration_ruleAbortIncompleteMultipartUpload
--- PASS: TestAccS3BucketLifecycleConfiguration_TransitionDate_intelligentTiering (196.72s)
=== CONT TestAccS3BucketLifecycleConfiguration_RuleExpiration_emptyBlock
--- PASS: TestAccS3BucketLifecycleConfiguration_TransitionDate_standardIa (203.33s)
=== CONT TestAccS3BucketLifecycleConfiguration_RuleExpiration_expireMarkerOnly
--- PASS: TestAccS3BucketLifecycleConfiguration_ruleAbortIncompleteMultipartUpload (274.62s)
=== CONT TestAccS3BucketLifecycleConfiguration_Filter_Tag
--- PASS: TestAccS3BucketLifecycleConfiguration_Filter_Tag (193.57s)
=== CONT TestAccS3BucketLifecycleConfiguration_TransitionUpdateBetweenDaysAndDate_intelligentTiering
--- PASS: TestAccS3BucketLifecycleConfiguration_RuleExpiration_expireMarkerOnly (274.80s)
=== CONT TestAccS3BucketLifecycleConfiguration_EmptyFilter_NonCurrentVersions
--- PASS: TestAccS3BucketLifecycleConfiguration_EmptyFilter_NonCurrentVersions (194.69s)
=== CONT TestAccS3BucketLifecycleConfiguration_TransitionZeroDays_intelligentTiering
--- PASS: TestAccS3BucketLifecycleConfiguration_TransitionUpdateBetweenDaysAndDate_intelligentTiering (330.38s)
=== CONT TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeRangeAndPrefix
--- PASS: TestAccS3BucketLifecycleConfiguration_TransitionZeroDays_intelligentTiering (195.27s)
=== CONT TestAccS3BucketLifecycleConfiguration_TransitionStorageClassOnly_intelligentTiering
--- PASS: TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeRangeAndPrefix (193.34s)
=== CONT TestAccS3BucketLifecycleConfiguration_multipleRules
--- PASS: TestAccS3BucketLifecycleConfiguration_TransitionStorageClassOnly_intelligentTiering (194.33s)
=== CONT TestAccS3BucketLifecycleConfiguration_nonCurrentVersionExpiration
--- PASS: TestAccS3BucketLifecycleConfiguration_multipleRules (194.74s)
=== CONT TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeGreaterThan
=== CONT TestAccS3BucketLifecycleConfiguration_RuleExpiration_emptyBlock
bucket_lifecycle_configuration_test.go:560: Step 1/2 error: Error running apply: exit status 1
Error: error creating S3 Lifecycle Configuration for bucket (tf-acc-test-4136263110565261398): RequestCanceled: request context canceled
caused by: context deadline exceeded
with aws_s3_bucket_lifecycle_configuration.test,
on terraform_plugin_test.tf line 11, in resource "aws_s3_bucket_lifecycle_configuration" "test":
11: resource "aws_s3_bucket_lifecycle_configuration" "test" {
--- FAIL: TestAccS3BucketLifecycleConfiguration_RuleExpiration_emptyBlock (1211.21s)
=== CONT TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeRange
--- PASS: TestAccS3BucketLifecycleConfiguration_nonCurrentVersionExpiration (194.02s)
=== CONT TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeLessThan
--- PASS: TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeGreaterThan (194.11s)
=== CONT TestAccS3BucketLifecycleConfiguration_disableRule
--- PASS: TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeRange (195.00s)
=== CONT TestAccS3BucketLifecycleConfiguration_nonCurrentVersionTransition
--- PASS: TestAccS3BucketLifecycleConfiguration_Filter_ObjectSizeLessThan (193.46s)
=== CONT TestAccS3BucketLifecycleConfiguration_filterWithPrefix
--- PASS: TestAccS3BucketLifecycleConfiguration_nonCurrentVersionTransition (193.10s)
=== CONT TestAccS3BucketLifecycleConfiguration_disappears
--- PASS: TestAccS3BucketLifecycleConfiguration_disappears (55.10s)
--- PASS: TestAccS3BucketLifecycleConfiguration_disableRule (328.46s)
--- PASS: TestAccS3BucketLifecycleConfiguration_filterWithPrefix (277.21s)
FAIL
FAIL github.com/hashicorp/terraform-provider-aws/internal/service/s3 1927.228s
FAIL
make: *** [testacc] Error 1
The failure is unrelated to this change.
Running that test again in isolation just to make sure:
% make testacc TESTS=TestAccS3BucketLifecycleConfiguration_RuleExpiration_emptyBlock 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='TestAccS3BucketLifecycleConfiguration_RuleExpiration_emptyBlock' -timeout 180m
=== RUN TestAccS3BucketLifecycleConfiguration_RuleExpiration_emptyBlock
=== PAUSE TestAccS3BucketLifecycleConfiguration_RuleExpiration_emptyBlock
=== CONT TestAccS3BucketLifecycleConfiguration_RuleExpiration_emptyBlock
--- PASS: TestAccS3BucketLifecycleConfiguration_RuleExpiration_emptyBlock (194.85s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/s3 198.567s
This functionality has been released in v4.5.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! |
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. |
Community Note
Closes #23375
Closes #23575
Description
filter.object_size_greater_than
andfilter.object_size_less_than
arguments is updated to account for theirnullable.TypeNullableInt
typesnew_noncurrent_versions
infilter.noncurrent_version_expiration
andfilter.noncurrent_version_transition
are updated tonullable.TypeNullableInt
type to prevent diff when the API sends back nullOutput from acceptance testing:
To validate the example given in #23375:
rule.noncurrent_version_transition.newer_noncurrent_versions
when previously terraform was trying to updatenull
->0