-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
tests/provider: Enable tfproviderlint R004 check #11499
Conversation
… properly set policy in state Found via linting: ``` /Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_s3_bucket.go:36:22: R004: ResourceData.Set() incompatible value type: *github.com/aws/aws-sdk-go/service/s3.GetBucketPolicyOutput 35 pData.Set("bucket", d.Id()) 36 pData.Set("policy", pol) 37 results = append(results, pData) ``` This type of complex import (importing multiple resources) is likely to be removed in a future major version. Output from relevant acceptance testing (other tests do not perform necessary ImportStateCheck to verify complex import): ``` --- PASS: TestAccAWSS3Bucket_Policy (95.74s) ```
f56bdef
to
f417c82
Compare
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 🚀
--- PASS: TestAccAWSS3Bucket_Policy (61.49s)
This has been released in version 2.48.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! |
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! |
Community Note
Closes #9954
Requires:
Release note for CHANGELOG:
The additional
import_aws_s3_bucket.go
fix was the last remaining linter issue:The
aws_s3_bucket
resource implements what we refer to as a "complex" import with multiple resources, which has been discouraged for a long time now and will likely be removed (along with the handful of other resources that do the same) in a future major version of the provider. I found and marked issues related to that with the 3.0.0 milestone for now. The fix, while valid, has little real consequence in practice since import performs an immediate refresh of the relevant Terraform resources immediately after import in recent versions of Terraform unless refresh is explicitly disabled (which is strongly discouraged in the Terraform CLI documentation) so its not really worth a CHANGELOG mention.Output from relevant acceptance testing (other tests do not perform necessary ImportStateCheck to verify the complex import):