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

provider: Fix and enable tfproviderlint S031, S032, and S033 #12234

Merged
merged 2 commits into from
Mar 10, 2020

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Mar 3, 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: #12087
Closes #11869 (fix and enable S031)
Closes #11870 (fix and enable S032)
Closes #11871 (fix and enable S033)

Release note for CHANGELOG:

NONE

Previously:

aws/data_source_aws_cloudhsm2_cluster.go:38:28: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_dynamodb_table.go:149:11: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_dynamodb_table.go:192:30: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_efs_file_system.go:62:24: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_eks_cluster.go:23:29: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_eks_cluster.go:89:18: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_elastic_beanstalk_application.go:29:28: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_elb.go:27:19: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_elb.go:80:20: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lambda_function.go:130:19: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lambda_function.go:144:22: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lambda_function.go:31:26: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lambda_function.go:49:14: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lambda_function.go:81:18: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lambda_layer_version.go:34:27: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lb.go:74:19: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lb_target_group.go:73:18: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lb_target_group.go:95:20: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_mq_broker.go:131:37: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_mq_broker.go:37:21: S031: schema should not only enable Computed and configure MaxItems
aws/resource_aws_api_gateway_account.go:29:25: S031: schema should not only enable Computed and configure MaxItems
aws/resource_aws_cloudhsm2_cluster.go:64:28: S031: schema should not only enable Computed and configure MaxItems
aws/resource_aws_eks_cluster.go:47:29: S031: schema should not only enable Computed and configure MaxItems

aws/data_source_aws_lambda_function.go:31:26: S032: schema should not only enable Computed and configure MinItems

aws/data_source_aws_cloudformation_stack.go:22:21: S033: schema should not only enable Computed and configure StateFunc
aws/data_source_aws_dynamodb_table.go:140:24: S033: schema should not only enable Computed and configure StateFunc
aws/data_source_aws_rds_cluster.go:120:36: S033: schema should not only enable Computed and configure StateFunc

Output from acceptance testing:

--- PASS: TestAccAWSAPIGatewayAccount_basic (116.01s)

--- PASS: TestAccAWSCloudFormationStack_dataSource_basic (74.98s)
--- PASS: TestAccAWSCloudFormationStack_dataSource_yaml (74.96s)

--- PASS: TestAccAWSCloudHsm2Cluster_basic (292.57s)
--- PASS: TestAccAWSCloudHsm2Cluster_Tags (340.49s)

--- PASS: TestAccAWSEksCluster_basic (1204.53s)
--- PASS: TestAccAWSEksCluster_Logging (1300.14s)
--- PASS: TestAccAWSEksCluster_Tags (1280.00s)
--- PASS: TestAccAWSEksCluster_Version (2452.84s)
--- PASS: TestAccAWSEksCluster_VpcConfig_EndpointPrivateAccess (2435.44s)
--- PASS: TestAccAWSEksCluster_VpcConfig_EndpointPublicAccess (1720.71s)
--- PASS: TestAccAWSEksCluster_VpcConfig_PublicAccessCidrs (1587.49s)
--- PASS: TestAccAWSEksCluster_VpcConfig_SecurityGroupIds (1186.78s)
--- PASS: TestAccAWSEksClusterDataSource_basic (1239.69s)

--- PASS: TestAccAwsElasticBeanstalkApplicationDataSource_basic (21.56s)

--- PASS: TestAccDataSourceAWSALBTargetGroup_basic (175.08s)

--- PASS: TestAccDataSourceAwsDynamoDbTable_basic (44.81s)

--- PASS: TestAccDataSourceAwsEfsFileSystem_id (29.06s)
--- PASS: TestAccDataSourceAwsEfsFileSystem_name (28.39s)

--- PASS: TestAccDataSourceAWSELB_basic (53.87s)

--- PASS: TestAccDataSourceAWSLambdaFunction_alias (65.51s)
--- PASS: TestAccDataSourceAWSLambdaFunction_basic (49.09s)
--- PASS: TestAccDataSourceAWSLambdaFunction_environment (59.75s)
--- PASS: TestAccDataSourceAWSLambdaFunction_layers (71.91s)
--- PASS: TestAccDataSourceAWSLambdaFunction_version (41.88s)
--- PASS: TestAccDataSourceAWSLambdaFunction_vpc (1838.06s)
--- PASS: TestAccDataSourceAWSLambdaLayerVersion_basic (19.83s)
--- PASS: TestAccDataSourceAWSLambdaLayerVersion_runtime (46.22s)
--- PASS: TestAccDataSourceAWSLambdaLayerVersion_version (35.61s)

--- PASS: TestAccDataSourceAWSLB_basic (211.76s)

--- PASS: TestAccDataSourceAWSMqBroker_basic (1232.73s)

--- PASS: TestAccDataSourceAWSRDSCluster_basic (135.85s)

--- PASS: TestAccDataSourceCloudHsm2Cluster_basic (267.05s)

Reference: #12087
Reference: #11869 (fix and enable S031)
Reference: #11870 (fix and enable S032)
Reference: #11871 (fix and enable S033)

Previously:

```
aws/data_source_aws_cloudhsm2_cluster.go:38:28: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_dynamodb_table.go:149:11: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_dynamodb_table.go:192:30: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_efs_file_system.go:62:24: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_eks_cluster.go:23:29: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_eks_cluster.go:89:18: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_elastic_beanstalk_application.go:29:28: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_elb.go:27:19: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_elb.go:80:20: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lambda_function.go:130:19: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lambda_function.go:144:22: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lambda_function.go:31:26: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lambda_function.go:49:14: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lambda_function.go:81:18: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lambda_layer_version.go:34:27: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lb.go:74:19: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lb_target_group.go:73:18: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_lb_target_group.go:95:20: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_mq_broker.go:131:37: S031: schema should not only enable Computed and configure MaxItems
aws/data_source_aws_mq_broker.go:37:21: S031: schema should not only enable Computed and configure MaxItems
aws/resource_aws_api_gateway_account.go:29:25: S031: schema should not only enable Computed and configure MaxItems
aws/resource_aws_cloudhsm2_cluster.go:64:28: S031: schema should not only enable Computed and configure MaxItems
aws/resource_aws_eks_cluster.go:47:29: S031: schema should not only enable Computed and configure MaxItems

aws/data_source_aws_lambda_function.go:31:26: S032: schema should not only enable Computed and configure MinItems

aws/data_source_aws_cloudformation_stack.go:22:21: S033: schema should not only enable Computed and configure StateFunc
aws/data_source_aws_dynamodb_table.go:140:24: S033: schema should not only enable Computed and configure StateFunc
aws/data_source_aws_rds_cluster.go:120:36: S033: schema should not only enable Computed and configure StateFunc
```

Output from acceptance testing:

```
--- PASS: TestAccAWSAPIGatewayAccount_basic (116.01s)

--- PASS: TestAccAWSCloudFormationStack_dataSource_basic (74.98s)
--- PASS: TestAccAWSCloudFormationStack_dataSource_yaml (74.96s)

--- PASS: TestAccAWSCloudHsm2Cluster_basic (292.57s)
--- PASS: TestAccAWSCloudHsm2Cluster_Tags (340.49s)

--- PASS: TestAccAWSEksCluster_basic (1204.53s)
--- PASS: TestAccAWSEksCluster_Logging (1300.14s)
--- PASS: TestAccAWSEksCluster_Tags (1280.00s)
--- PASS: TestAccAWSEksCluster_Version (2452.84s)
--- PASS: TestAccAWSEksCluster_VpcConfig_EndpointPrivateAccess (2435.44s)
--- PASS: TestAccAWSEksCluster_VpcConfig_EndpointPublicAccess (1720.71s)
--- PASS: TestAccAWSEksCluster_VpcConfig_PublicAccessCidrs (1587.49s)
--- PASS: TestAccAWSEksCluster_VpcConfig_SecurityGroupIds (1186.78s)
--- PASS: TestAccAWSEksClusterDataSource_basic (1239.69s)

--- PASS: TestAccAwsElasticBeanstalkApplicationDataSource_basic (21.56s)

--- PASS: TestAccDataSourceAWSALBTargetGroup_basic (175.08s)

--- PASS: TestAccDataSourceAwsDynamoDbTable_basic (44.81s)

--- PASS: TestAccDataSourceAwsEfsFileSystem_id (29.06s)
--- PASS: TestAccDataSourceAwsEfsFileSystem_name (28.39s)

--- PASS: TestAccDataSourceAWSELB_basic (53.87s)

--- PASS: TestAccDataSourceAWSLambdaFunction_alias (65.51s)
--- PASS: TestAccDataSourceAWSLambdaFunction_basic (49.09s)
--- PASS: TestAccDataSourceAWSLambdaFunction_environment (59.75s)
--- PASS: TestAccDataSourceAWSLambdaFunction_layers (71.91s)
--- PASS: TestAccDataSourceAWSLambdaFunction_version (41.88s)
--- PASS: TestAccDataSourceAWSLambdaFunction_vpc (1838.06s)
--- PASS: TestAccDataSourceAWSLambdaLayerVersion_basic (19.83s)
--- PASS: TestAccDataSourceAWSLambdaLayerVersion_runtime (46.22s)
--- PASS: TestAccDataSourceAWSLambdaLayerVersion_version (35.61s)

--- PASS: TestAccDataSourceAWSLB_basic (211.76s)

--- PASS: TestAccDataSourceAWSMqBroker_basic (1232.73s)

--- PASS: TestAccDataSourceAWSRDSCluster_basic (135.85s)

--- PASS: TestAccDataSourceCloudHsm2Cluster_basic (267.05s)
```
@bflad bflad requested a review from a team March 3, 2020 19:08
@ghost ghost added size/S Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/apigateway Issues and PRs that pertain to the apigateway service. service/cloudformation Issues and PRs that pertain to the cloudformation service. service/dynamodb Issues and PRs that pertain to the dynamodb service. service/efs Issues and PRs that pertain to the efs service. service/eks Issues and PRs that pertain to the eks service. service/elasticbeanstalk Issues and PRs that pertain to the elasticbeanstalk service. service/elb Issues and PRs that pertain to the elb service. service/elbv2 Issues and PRs that pertain to the elbv2 service. service/lambda Issues and PRs that pertain to the lambda service. service/mq Issues and PRs that pertain to the mq service. service/rds Issues and PRs that pertain to the rds service. labels Mar 3, 2020
@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Mar 3, 2020
Copy link
Contributor

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@bflad bflad added this to the v2.53.0 milestone Mar 10, 2020
@bflad bflad merged commit e6489e6 into master Mar 10, 2020
@bflad bflad deleted the td-tfproviderlint-S031 branch March 10, 2020 20:18
@ghost
Copy link

ghost commented Mar 12, 2020

This has been released in version 2.53.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 Apr 10, 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 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/apigateway Issues and PRs that pertain to the apigateway service. service/cloudformation Issues and PRs that pertain to the cloudformation service. service/dynamodb Issues and PRs that pertain to the dynamodb service. service/efs Issues and PRs that pertain to the efs service. service/eks Issues and PRs that pertain to the eks service. service/elasticbeanstalk Issues and PRs that pertain to the elasticbeanstalk service. service/elb Issues and PRs that pertain to the elb service. service/elbv2 Issues and PRs that pertain to the elbv2 service. service/lambda Issues and PRs that pertain to the lambda service. service/mq Issues and PRs that pertain to the mq service. service/rds Issues and PRs that pertain to the rds service. size/S Managed by automation to categorize the size of a PR.
Projects
None yet
2 participants