Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/provider: Enable tfproviderlint R004 check (#11499)
* tests/provider: Enable tfproviderlint R004 check Reference: https://github.com/bflad/tfproviderlint/blob/master/passes/R004/README.md Reference: #9954 * resource/aws_s3_bucket: Fix complex import of aws_s3_bucket_policy to 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) ```
- Loading branch information