Skip to content

Commit

Permalink
Update AWS provider/module and generated content (#534)
Browse files Browse the repository at this point in the history
Co-authored-by: bendrucker <bendrucker@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and bendrucker authored Sep 12, 2023
1 parent a497a91 commit a988165
Show file tree
Hide file tree
Showing 17 changed files with 296 additions and 28 deletions.
83 changes: 83 additions & 0 deletions aws/mock/rds.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21.1

require (
github.com/agext/levenshtein v1.2.2 // indirect
github.com/aws/aws-sdk-go v1.44.322
github.com/aws/aws-sdk-go v1.45.7
github.com/dave/dst v0.27.2
github.com/fatih/color v1.13.0 // indirect
github.com/golang/mock v1.6.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki
github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY=
github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=
github.com/aws/aws-sdk-go v1.31.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/aws/aws-sdk-go v1.44.322 h1:7JfwifGRGQMHd99PvfXqxBaZsjuRaOF6e3X9zRx2uYo=
github.com/aws/aws-sdk-go v1.44.322/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/aws-sdk-go v1.45.7 h1:k4QsvWZhm8409TYeRuTV1P6+j3lLKoe+giFA/j3VAps=
github.com/aws/aws-sdk-go v1.45.7/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/dave/dst v0.27.2 h1:4Y5VFTkhGLC1oddtNwuxxe36pnyLxMFXT51FOzH8Ekc=
github.com/dave/dst v0.27.2/go.mod h1:jHh6EOibnHgcUW3WjKHisiooEkYwqpHLBSX1iOBhEyc=
Expand Down
2 changes: 1 addition & 1 deletion rules/models/aws-sdk-go
Submodule aws-sdk-go updated 330 files
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func NewAwsApprunnerConnectionInvalidProviderTypeRule() *AwsApprunnerConnectionI
attributeName: "provider_type",
enum: []string{
"GITHUB",
"BITBUCKET",
},
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func NewAwsCognitoIdentityProviderInvalidProviderNameRule() *AwsCognitoIdentityP
attributeName: "provider_name",
max: 32,
min: 1,
pattern: regexp.MustCompile(`^[\p{L}\p{M}\p{S}\p{N}\p{P}]+$`),
pattern: regexp.MustCompile(`^[\p{L}\p{M}\p{S}\p{N}\p{P}\p{Z}]+$`),
}
}

Expand Down Expand Up @@ -90,7 +90,7 @@ func (r *AwsCognitoIdentityProviderInvalidProviderNameRule) Check(runner tflint.
if !r.pattern.MatchString(val) {
runner.EmitIssue(
r,
fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(val), `^[\p{L}\p{M}\p{S}\p{N}\p{P}]+$`),
fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(val), `^[\p{L}\p{M}\p{S}\p{N}\p{P}\p{Z}]+$`),
attribute.Expr.Range(),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resource "aws_cognito_identity_provider" "foo" {
Expected: helper.Issues{
{
Rule: NewAwsCognitoIdentityProviderInvalidProviderNameRule(),
Message: fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(" "), `^[\p{L}\p{M}\p{S}\p{N}\p{P}]+$`),
Message: fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(" "), `^[\p{L}\p{M}\p{S}\p{N}\p{P}\p{Z}]+$`),
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func NewAwsEcsAccountSettingDefaultInvalidNameRule() *AwsEcsAccountSettingDefaul
"containerInsights",
"fargateFIPSMode",
"tagResourceAuthorization",
"fargateTaskRetirementWaitPeriod",
},
}
}
Expand Down
61 changes: 61 additions & 0 deletions rules/models/aws_gamelift_fleet_invalid_ec2_instance_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,67 @@ func NewAwsGameliftFleetInvalidEc2InstanceTypeRule() *AwsGameliftFleetInvalidEc2
"r5d.12xlarge",
"r5d.16xlarge",
"r5d.24xlarge",
"m6g.medium",
"m6g.large",
"m6g.xlarge",
"m6g.2xlarge",
"m6g.4xlarge",
"m6g.8xlarge",
"m6g.12xlarge",
"m6g.16xlarge",
"c6g.medium",
"c6g.large",
"c6g.xlarge",
"c6g.2xlarge",
"c6g.4xlarge",
"c6g.8xlarge",
"c6g.12xlarge",
"c6g.16xlarge",
"r6g.medium",
"r6g.large",
"r6g.xlarge",
"r6g.2xlarge",
"r6g.4xlarge",
"r6g.8xlarge",
"r6g.12xlarge",
"r6g.16xlarge",
"c6gn.medium",
"c6gn.large",
"c6gn.xlarge",
"c6gn.2xlarge",
"c6gn.4xlarge",
"c6gn.8xlarge",
"c6gn.12xlarge",
"c6gn.16xlarge",
"c7g.medium",
"c7g.large",
"c7g.xlarge",
"c7g.2xlarge",
"c7g.4xlarge",
"c7g.8xlarge",
"c7g.12xlarge",
"c7g.16xlarge",
"r7g.medium",
"r7g.large",
"r7g.xlarge",
"r7g.2xlarge",
"r7g.4xlarge",
"r7g.8xlarge",
"r7g.12xlarge",
"r7g.16xlarge",
"m7g.medium",
"m7g.large",
"m7g.xlarge",
"m7g.2xlarge",
"m7g.4xlarge",
"m7g.8xlarge",
"m7g.12xlarge",
"m7g.16xlarge",
"g5g.xlarge",
"g5g.2xlarge",
"g5g.4xlarge",
"g5g.8xlarge",
"g5g.16xlarge",
},
}
}
Expand Down
40 changes: 40 additions & 0 deletions rules/models/aws_instance_invalid_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,46 @@ func NewAwsInstanceInvalidTypeRule() *AwsInstanceInvalidTypeRule {
"m7i-flex.2xlarge",
"m7i-flex.4xlarge",
"m7i-flex.8xlarge",
"m7a.medium",
"m7a.large",
"m7a.xlarge",
"m7a.2xlarge",
"m7a.4xlarge",
"m7a.8xlarge",
"m7a.12xlarge",
"m7a.16xlarge",
"m7a.24xlarge",
"m7a.32xlarge",
"m7a.48xlarge",
"m7a.metal-48xl",
"hpc7a.12xlarge",
"hpc7a.24xlarge",
"hpc7a.48xlarge",
"hpc7a.96xlarge",
"c7gd.medium",
"c7gd.large",
"c7gd.xlarge",
"c7gd.2xlarge",
"c7gd.4xlarge",
"c7gd.8xlarge",
"c7gd.12xlarge",
"c7gd.16xlarge",
"m7gd.medium",
"m7gd.large",
"m7gd.xlarge",
"m7gd.2xlarge",
"m7gd.4xlarge",
"m7gd.8xlarge",
"m7gd.12xlarge",
"m7gd.16xlarge",
"r7gd.medium",
"r7gd.large",
"r7gd.xlarge",
"r7gd.2xlarge",
"r7gd.4xlarge",
"r7gd.8xlarge",
"r7gd.12xlarge",
"r7gd.16xlarge",
},
}
}
Expand Down
40 changes: 40 additions & 0 deletions rules/models/aws_launch_configuration_invalid_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,46 @@ func NewAwsLaunchConfigurationInvalidTypeRule() *AwsLaunchConfigurationInvalidTy
"m7i-flex.2xlarge",
"m7i-flex.4xlarge",
"m7i-flex.8xlarge",
"m7a.medium",
"m7a.large",
"m7a.xlarge",
"m7a.2xlarge",
"m7a.4xlarge",
"m7a.8xlarge",
"m7a.12xlarge",
"m7a.16xlarge",
"m7a.24xlarge",
"m7a.32xlarge",
"m7a.48xlarge",
"m7a.metal-48xl",
"hpc7a.12xlarge",
"hpc7a.24xlarge",
"hpc7a.48xlarge",
"hpc7a.96xlarge",
"c7gd.medium",
"c7gd.large",
"c7gd.xlarge",
"c7gd.2xlarge",
"c7gd.4xlarge",
"c7gd.8xlarge",
"c7gd.12xlarge",
"c7gd.16xlarge",
"m7gd.medium",
"m7gd.large",
"m7gd.xlarge",
"m7gd.2xlarge",
"m7gd.4xlarge",
"m7gd.8xlarge",
"m7gd.12xlarge",
"m7gd.16xlarge",
"r7gd.medium",
"r7gd.large",
"r7gd.xlarge",
"r7gd.2xlarge",
"r7gd.4xlarge",
"r7gd.8xlarge",
"r7gd.12xlarge",
"r7gd.16xlarge",
},
}
}
Expand Down
40 changes: 40 additions & 0 deletions rules/models/aws_launch_template_invalid_instance_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,46 @@ func NewAwsLaunchTemplateInvalidInstanceTypeRule() *AwsLaunchTemplateInvalidInst
"m7i-flex.2xlarge",
"m7i-flex.4xlarge",
"m7i-flex.8xlarge",
"m7a.medium",
"m7a.large",
"m7a.xlarge",
"m7a.2xlarge",
"m7a.4xlarge",
"m7a.8xlarge",
"m7a.12xlarge",
"m7a.16xlarge",
"m7a.24xlarge",
"m7a.32xlarge",
"m7a.48xlarge",
"m7a.metal-48xl",
"hpc7a.12xlarge",
"hpc7a.24xlarge",
"hpc7a.48xlarge",
"hpc7a.96xlarge",
"c7gd.medium",
"c7gd.large",
"c7gd.xlarge",
"c7gd.2xlarge",
"c7gd.4xlarge",
"c7gd.8xlarge",
"c7gd.12xlarge",
"c7gd.16xlarge",
"m7gd.medium",
"m7gd.large",
"m7gd.xlarge",
"m7gd.2xlarge",
"m7gd.4xlarge",
"m7gd.8xlarge",
"m7gd.12xlarge",
"m7gd.16xlarge",
"r7gd.medium",
"r7gd.large",
"r7gd.xlarge",
"r7gd.2xlarge",
"r7gd.4xlarge",
"r7gd.8xlarge",
"r7gd.12xlarge",
"r7gd.16xlarge",
},
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func NewAwsSsoadminPermissionSetInlinePolicyInvalidInlinePolicyRule() *AwsSsoadm
return &AwsSsoadminPermissionSetInlinePolicyInvalidInlinePolicyRule{
resourceType: "aws_ssoadmin_permission_set_inline_policy",
attributeName: "inline_policy",
max: 10240,
max: 32768,
min: 1,
pattern: regexp.MustCompile(`^[\x{0009}\x{000A}\x{000D}\x{0020}-\x{00FF}]+$`),
}
Expand Down Expand Up @@ -76,7 +76,7 @@ func (r *AwsSsoadminPermissionSetInlinePolicyInvalidInlinePolicyRule) Check(runn
if len(val) > r.max {
runner.EmitIssue(
r,
"inline_policy must be 10240 characters or less",
"inline_policy must be 32768 characters or less",
attribute.Expr.Range(),
)
}
Expand Down
Loading

0 comments on commit a988165

Please sign in to comment.