Skip to content

Commit 862736e

Browse files
Update AWS provider/module and generated content (#919)
Co-authored-by: bendrucker <[email protected]>
1 parent a0abb83 commit 862736e

24 files changed

+77
-13
lines changed

docs/rules/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,6 @@ These rules enforce best practices and naming conventions:
13151315
|aws_storagegateway_cache_invalid_disk_id||
13161316
|aws_storagegateway_cache_invalid_gateway_arn||
13171317
|aws_storagegateway_cached_iscsi_volume_invalid_gateway_arn||
1318-
|aws_storagegateway_cached_iscsi_volume_invalid_network_interface_id||
13191318
|aws_storagegateway_cached_iscsi_volume_invalid_snapshot_id||
13201319
|aws_storagegateway_cached_iscsi_volume_invalid_source_volume_arn||
13211320
|aws_storagegateway_cached_iscsi_volume_invalid_target_name||
@@ -1348,7 +1347,6 @@ These rules enforce best practices and naming conventions:
13481347
|aws_storagegateway_stored_iscsi_volume_invalid_disk_id||
13491348
|aws_storagegateway_stored_iscsi_volume_invalid_gateway_arn||
13501349
|aws_storagegateway_stored_iscsi_volume_invalid_kms_key||
1351-
|aws_storagegateway_stored_iscsi_volume_invalid_network_interface_id||
13521350
|aws_storagegateway_stored_iscsi_volume_invalid_snapshot_id||
13531351
|aws_storagegateway_stored_iscsi_volume_invalid_target_name||
13541352
|aws_storagegateway_tape_pool_invalid_pool_name||

rules/models/aws-sdk-ruby

Submodule aws-sdk-ruby updated 3820 files

rules/models/aws_accessanalyzer_analyzer_invalid_type.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ func NewAwsAccessanalyzerAnalyzerInvalidTypeRule() *AwsAccessanalyzerAnalyzerInv
2929
"ORGANIZATION",
3030
"ACCOUNT_UNUSED_ACCESS",
3131
"ORGANIZATION_UNUSED_ACCESS",
32+
"ACCOUNT_INTERNAL_ACCESS",
33+
"ORGANIZATION_INTERNAL_ACCESS",
3234
},
3335
}
3436
}

rules/models/aws_datasync_location_nfs_invalid_server_hostname.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func NewAwsDatasyncLocationNfsInvalidServerHostnameRule() *AwsDatasyncLocationNf
2727
resourceType: "aws_datasync_location_nfs",
2828
attributeName: "server_hostname",
2929
max: 255,
30-
pattern: regexp.MustCompile(`^(([a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9\-]*[A-Za-z0-9])$`),
30+
pattern: regexp.MustCompile(`^(([a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9\-:]*[A-Za-z0-9])$`),
3131
}
3232
}
3333

@@ -81,7 +81,7 @@ func (r *AwsDatasyncLocationNfsInvalidServerHostnameRule) Check(runner tflint.Ru
8181
if !r.pattern.MatchString(val) {
8282
runner.EmitIssue(
8383
r,
84-
fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(val), `^(([a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9\-]*[A-Za-z0-9])$`),
84+
fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(val), `^(([a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9\-:]*[A-Za-z0-9])$`),
8585
attribute.Expr.Range(),
8686
)
8787
}

rules/models/aws_datasync_location_nfs_invalid_server_hostname_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ resource "aws_datasync_location_nfs" "foo" {
2424
Expected: helper.Issues{
2525
{
2626
Rule: NewAwsDatasyncLocationNfsInvalidServerHostnameRule(),
27-
Message: fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage("nfs^example^com"), `^(([a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9\-]*[A-Za-z0-9])$`),
27+
Message: fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage("nfs^example^com"), `^(([a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9\-:]*[A-Za-z0-9])$`),
2828
},
2929
},
3030
},

rules/models/aws_datasync_location_smb_invalid_server_hostname.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func NewAwsDatasyncLocationSmbInvalidServerHostnameRule() *AwsDatasyncLocationSm
2727
resourceType: "aws_datasync_location_smb",
2828
attributeName: "server_hostname",
2929
max: 255,
30-
pattern: regexp.MustCompile(`^(([a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9\-]*[A-Za-z0-9])$`),
30+
pattern: regexp.MustCompile(`^(([a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9\-:]*[A-Za-z0-9])$`),
3131
}
3232
}
3333

@@ -81,7 +81,7 @@ func (r *AwsDatasyncLocationSmbInvalidServerHostnameRule) Check(runner tflint.Ru
8181
if !r.pattern.MatchString(val) {
8282
runner.EmitIssue(
8383
r,
84-
fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(val), `^(([a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9\-]*[A-Za-z0-9])$`),
84+
fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(val), `^(([a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9\-:]*[A-Za-z0-9])$`),
8585
attribute.Expr.Range(),
8686
)
8787
}

rules/models/aws_guardduty_member_invalid_email.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
package models
44

55
import (
6+
"fmt"
7+
"regexp"
8+
69
"github.com/terraform-linters/tflint-plugin-sdk/hclext"
710
"github.com/terraform-linters/tflint-plugin-sdk/logger"
811
"github.com/terraform-linters/tflint-plugin-sdk/tflint"
@@ -16,6 +19,7 @@ type AwsGuarddutyMemberInvalidEmailRule struct {
1619
attributeName string
1720
max int
1821
min int
22+
pattern *regexp.Regexp
1923
}
2024

2125
// NewAwsGuarddutyMemberInvalidEmailRule returns new rule with default attributes
@@ -24,7 +28,8 @@ func NewAwsGuarddutyMemberInvalidEmailRule() *AwsGuarddutyMemberInvalidEmailRule
2428
resourceType: "aws_guardduty_member",
2529
attributeName: "email",
2630
max: 64,
27-
min: 1,
31+
min: 6,
32+
pattern: regexp.MustCompile(`^See rules in parameter description$`),
2833
}
2934
}
3035

@@ -78,7 +83,14 @@ func (r *AwsGuarddutyMemberInvalidEmailRule) Check(runner tflint.Runner) error {
7883
if len(val) < r.min {
7984
runner.EmitIssue(
8085
r,
81-
"email must be 1 characters or higher",
86+
"email must be 6 characters or higher",
87+
attribute.Expr.Range(),
88+
)
89+
}
90+
if !r.pattern.MatchString(val) {
91+
runner.EmitIssue(
92+
r,
93+
fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(val), `^See rules in parameter description$`),
8294
attribute.Expr.Range(),
8395
)
8496
}

rules/models/aws_iam_access_key_invalid_status.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ func NewAwsIAMAccessKeyInvalidStatusRule() *AwsIAMAccessKeyInvalidStatusRule {
2727
enum: []string{
2828
"Active",
2929
"Inactive",
30+
"Expired",
3031
},
3132
}
3233
}

rules/models/aws_iam_user_ssh_key_invalid_status.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ func NewAwsIAMUserSSHKeyInvalidStatusRule() *AwsIAMUserSSHKeyInvalidStatusRule {
2727
enum: []string{
2828
"Active",
2929
"Inactive",
30+
"Expired",
3031
},
3132
}
3233
}

rules/models/aws_instance_invalid_type.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,20 @@ func NewAwsInstanceInvalidTypeRule() *AwsInstanceInvalidTypeRule {
970970
"r8gd.48xlarge",
971971
"r8gd.metal-24xl",
972972
"r8gd.metal-48xl",
973+
"c8gn.medium",
974+
"c8gn.large",
975+
"c8gn.xlarge",
976+
"c8gn.2xlarge",
977+
"c8gn.4xlarge",
978+
"c8gn.8xlarge",
979+
"c8gn.12xlarge",
980+
"c8gn.16xlarge",
981+
"c8gn.24xlarge",
982+
"c8gn.48xlarge",
983+
"c8gn.metal-24xl",
984+
"c8gn.metal-48xl",
985+
"f2.6xlarge",
986+
"p6e-gb200.36xlarge",
973987
},
974988
}
975989
}

0 commit comments

Comments
 (0)