Skip to content

Commit 19bfd5a

Browse files
Update AWS provider/module and generated content (#454)
Co-authored-by: wata727 <[email protected]>
1 parent 053a8c4 commit 19bfd5a

13 files changed

+148
-25
lines changed

aws/mock/ecs.go

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

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.19
44

55
require (
66
github.com/agext/levenshtein v1.2.2 // indirect
7-
github.com/aws/aws-sdk-go v1.44.204
7+
github.com/aws/aws-sdk-go v1.44.224
88
github.com/dave/dst v0.27.2
99
github.com/fatih/color v1.13.0 // indirect
1010
github.com/golang/mock v1.6.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki
55
github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw=
66
github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
77
github.com/aws/aws-sdk-go v1.31.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
8-
github.com/aws/aws-sdk-go v1.44.204 h1:7/tPUXfNOHB390A63t6fJIwmlwVQAkAwcbzKsU2/6OQ=
9-
github.com/aws/aws-sdk-go v1.44.204/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
8+
github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ=
9+
github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
1010
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
1111
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
1212
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=

rules/models/aws-sdk-go

Submodule aws-sdk-go updated 430 files

rules/models/aws_account_alternate_contact_invalid_email_address.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ func NewAwsAccountAlternateContactInvalidEmailAddressRule() *AwsAccountAlternate
2727
return &AwsAccountAlternateContactInvalidEmailAddressRule{
2828
resourceType: "aws_account_alternate_contact",
2929
attributeName: "email_address",
30-
max: 64,
30+
max: 254,
3131
min: 1,
32-
pattern: regexp.MustCompile(`^[\s]*[\w+=.#!&-]+@[\w.-]+\.[\w]+[\s]*$`),
32+
pattern: regexp.MustCompile(`^[\s]*[\w+=.#|!&-]+@[\w.-]+\.[\w]+[\s]*$`),
3333
}
3434
}
3535

@@ -79,7 +79,7 @@ func (r *AwsAccountAlternateContactInvalidEmailAddressRule) Check(runner tflint.
7979
if len(val) > r.max {
8080
runner.EmitIssue(
8181
r,
82-
"email_address must be 64 characters or less",
82+
"email_address must be 254 characters or less",
8383
attribute.Expr.Range(),
8484
)
8585
}
@@ -93,7 +93,7 @@ func (r *AwsAccountAlternateContactInvalidEmailAddressRule) Check(runner tflint.
9393
if !r.pattern.MatchString(val) {
9494
runner.EmitIssue(
9595
r,
96-
fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(val), `^[\s]*[\w+=.#!&-]+@[\w.-]+\.[\w]+[\s]*$`),
96+
fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(val), `^[\s]*[\w+=.#|!&-]+@[\w.-]+\.[\w]+[\s]*$`),
9797
attribute.Expr.Range(),
9898
)
9999
}

rules/models/aws_instance_invalid_type.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,25 @@ func NewAwsInstanceInvalidTypeRule() *AwsInstanceInvalidTypeRule {
644644
"r6idn.16xlarge",
645645
"r6idn.24xlarge",
646646
"r6idn.32xlarge",
647+
"c7g.metal",
648+
"m7g.medium",
649+
"m7g.large",
650+
"m7g.xlarge",
651+
"m7g.2xlarge",
652+
"m7g.4xlarge",
653+
"m7g.8xlarge",
654+
"m7g.12xlarge",
655+
"m7g.16xlarge",
656+
"m7g.metal",
657+
"r7g.medium",
658+
"r7g.large",
659+
"r7g.xlarge",
660+
"r7g.2xlarge",
661+
"r7g.4xlarge",
662+
"r7g.8xlarge",
663+
"r7g.12xlarge",
664+
"r7g.16xlarge",
665+
"r7g.metal",
647666
},
648667
}
649668
}

rules/models/aws_launch_configuration_invalid_type.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,25 @@ func NewAwsLaunchConfigurationInvalidTypeRule() *AwsLaunchConfigurationInvalidTy
644644
"r6idn.16xlarge",
645645
"r6idn.24xlarge",
646646
"r6idn.32xlarge",
647+
"c7g.metal",
648+
"m7g.medium",
649+
"m7g.large",
650+
"m7g.xlarge",
651+
"m7g.2xlarge",
652+
"m7g.4xlarge",
653+
"m7g.8xlarge",
654+
"m7g.12xlarge",
655+
"m7g.16xlarge",
656+
"m7g.metal",
657+
"r7g.medium",
658+
"r7g.large",
659+
"r7g.xlarge",
660+
"r7g.2xlarge",
661+
"r7g.4xlarge",
662+
"r7g.8xlarge",
663+
"r7g.12xlarge",
664+
"r7g.16xlarge",
665+
"r7g.metal",
647666
},
648667
}
649668
}

rules/models/aws_launch_template_invalid_instance_type.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,25 @@ func NewAwsLaunchTemplateInvalidInstanceTypeRule() *AwsLaunchTemplateInvalidInst
644644
"r6idn.16xlarge",
645645
"r6idn.24xlarge",
646646
"r6idn.32xlarge",
647+
"c7g.metal",
648+
"m7g.medium",
649+
"m7g.large",
650+
"m7g.xlarge",
651+
"m7g.2xlarge",
652+
"m7g.4xlarge",
653+
"m7g.8xlarge",
654+
"m7g.12xlarge",
655+
"m7g.16xlarge",
656+
"m7g.metal",
657+
"r7g.medium",
658+
"r7g.large",
659+
"r7g.xlarge",
660+
"r7g.2xlarge",
661+
"r7g.4xlarge",
662+
"r7g.8xlarge",
663+
"r7g.12xlarge",
664+
"r7g.16xlarge",
665+
"r7g.metal",
647666
},
648667
}
649668
}

rules/models/aws_route53_resolver_firewall_config_invalid_firewall_fail_open.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ func NewAwsRoute53ResolverFirewallConfigInvalidFirewallFailOpenRule() *AwsRoute5
2727
enum: []string{
2828
"ENABLED",
2929
"DISABLED",
30+
"USE_LOCAL_RESOURCE_SETTING",
3031
},
3132
}
3233
}

rules/models/aws_secretsmanager_secret_version_invalid_secret_string.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ type AwsSecretsmanagerSecretVersionInvalidSecretStringRule struct {
1515
resourceType string
1616
attributeName string
1717
max int
18+
min int
1819
}
1920

2021
// NewAwsSecretsmanagerSecretVersionInvalidSecretStringRule returns new rule with default attributes
@@ -23,6 +24,7 @@ func NewAwsSecretsmanagerSecretVersionInvalidSecretStringRule() *AwsSecretsmanag
2324
resourceType: "aws_secretsmanager_secret_version",
2425
attributeName: "secret_string",
2526
max: 65536,
27+
min: 1,
2628
}
2729
}
2830

@@ -76,6 +78,13 @@ func (r *AwsSecretsmanagerSecretVersionInvalidSecretStringRule) Check(runner tfl
7678
attribute.Expr.Range(),
7779
)
7880
}
81+
if len(val) < r.min {
82+
runner.EmitIssue(
83+
r,
84+
"secret_string must be 1 characters or higher",
85+
attribute.Expr.Range(),
86+
)
87+
}
7988
return nil
8089
})
8190
if err != nil {

0 commit comments

Comments
 (0)