Skip to content

Commit dd2461d

Browse files
authored
Bump aws-sdk-go submodule and Terraform provider schema (#151)
* Bump aws-sdk-go module * Bump provider schema
1 parent c974c12 commit dd2461d

14 files changed

+49
-20
lines changed

rules/models/aws-sdk-go

Submodule aws-sdk-go updated 402 files

rules/models/aws_appsync_graphql_api_invalid_authentication_type.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ func NewAwsAppsyncGraphqlAPIInvalidAuthenticationTypeRule() *AwsAppsyncGraphqlAP
2727
"AWS_IAM",
2828
"AMAZON_COGNITO_USER_POOLS",
2929
"OPENID_CONNECT",
30+
"AWS_LAMBDA",
3031
},
3132
}
3233
}

rules/models/aws_glue_trigger_invalid_type.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func NewAwsGlueTriggerInvalidTypeRule() *AwsGlueTriggerInvalidTypeRule {
2626
"SCHEDULED",
2727
"CONDITIONAL",
2828
"ON_DEMAND",
29+
"EVENT",
2930
},
3031
}
3132
}

rules/models/aws_instance_invalid_type.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ func NewAwsInstanceInvalidTypeRule() *AwsInstanceInvalidTypeRule {
258258
"g3.8xlarge",
259259
"g3.16xlarge",
260260
"g3s.xlarge",
261+
"g4ad.xlarge",
262+
"g4ad.2xlarge",
261263
"g4ad.4xlarge",
262264
"g4ad.8xlarge",
263265
"g4ad.16xlarge",

rules/models/aws_lambda_permission_invalid_principal.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func NewAwsLambdaPermissionInvalidPrincipalRule() *AwsLambdaPermissionInvalidPri
2323
return &AwsLambdaPermissionInvalidPrincipalRule{
2424
resourceType: "aws_lambda_permission",
2525
attributeName: "principal",
26-
pattern: regexp.MustCompile(`^.*$`),
26+
pattern: regexp.MustCompile(`^[^\s]+$`),
2727
}
2828
}
2929

@@ -59,7 +59,7 @@ func (r *AwsLambdaPermissionInvalidPrincipalRule) Check(runner tflint.Runner) er
5959
if !r.pattern.MatchString(val) {
6060
runner.EmitIssueOnExpr(
6161
r,
62-
fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(val), `^.*$`),
62+
fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(val), `^[^\s]+$`),
6363
attribute.Expr,
6464
)
6565
}

rules/models/aws_lambda_permission_invalid_source_account.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
type AwsLambdaPermissionInvalidSourceAccountRule struct {
1616
resourceType string
1717
attributeName string
18+
max int
1819
pattern *regexp.Regexp
1920
}
2021

@@ -23,6 +24,7 @@ func NewAwsLambdaPermissionInvalidSourceAccountRule() *AwsLambdaPermissionInvali
2324
return &AwsLambdaPermissionInvalidSourceAccountRule{
2425
resourceType: "aws_lambda_permission",
2526
attributeName: "source_account",
27+
max: 12,
2628
pattern: regexp.MustCompile(`^\d{12}$`),
2729
}
2830
}
@@ -56,6 +58,13 @@ func (r *AwsLambdaPermissionInvalidSourceAccountRule) Check(runner tflint.Runner
5658
err := runner.EvaluateExpr(attribute.Expr, &val, nil)
5759

5860
return runner.EnsureNoError(err, func() error {
61+
if len(val) > r.max {
62+
runner.EmitIssueOnExpr(
63+
r,
64+
"source_account must be 12 characters or less",
65+
attribute.Expr,
66+
)
67+
}
5968
if !r.pattern.MatchString(val) {
6069
runner.EmitIssueOnExpr(
6170
r,

rules/models/aws_launch_configuration_invalid_type.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ func NewAwsLaunchConfigurationInvalidTypeRule() *AwsLaunchConfigurationInvalidTy
258258
"g3.8xlarge",
259259
"g3.16xlarge",
260260
"g3s.xlarge",
261+
"g4ad.xlarge",
262+
"g4ad.2xlarge",
261263
"g4ad.4xlarge",
262264
"g4ad.8xlarge",
263265
"g4ad.16xlarge",

rules/models/aws_launch_template_invalid_instance_type.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ func NewAwsLaunchTemplateInvalidInstanceTypeRule() *AwsLaunchTemplateInvalidInst
258258
"g3.8xlarge",
259259
"g3.16xlarge",
260260
"g3s.xlarge",
261+
"g4ad.xlarge",
262+
"g4ad.2xlarge",
261263
"g4ad.4xlarge",
262264
"g4ad.8xlarge",
263265
"g4ad.16xlarge",

rules/models/aws_route53_health_check_invalid_type.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func NewAwsRoute53HealthCheckInvalidTypeRule() *AwsRoute53HealthCheckInvalidType
3030
"TCP",
3131
"CALCULATED",
3232
"CLOUDWATCH_METRIC",
33+
"RECOVERY_CONTROL",
3334
},
3435
}
3536
}

rules/tags/resources.go

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.3
1+
1.0.4

tools/provider-schema/.terraform.lock.hcl

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/provider-schema/provider.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
aws = {
44
source = "hashicorp/aws"
5-
version = "3.48.0"
5+
version = "3.53.0"
66
}
77
}
88
}

tools/provider-schema/schema.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)