Skip to content

Commit 5f37b10

Browse files
authored
update aws-sdk-go submodule (#300)
1 parent 84beea3 commit 5f37b10

9 files changed

+1014
-925
lines changed

rules/models/aws-sdk-go

Submodule aws-sdk-go updated 345 files

rules/models/aws_appsync_function_invalid_request_mapping_template.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
package models
44

55
import (
6+
"fmt"
67
"log"
8+
"regexp"
79

810
hcl "github.com/hashicorp/hcl/v2"
911
"github.com/terraform-linters/tflint-plugin-sdk/tflint"
@@ -15,6 +17,7 @@ type AwsAppsyncFunctionInvalidRequestMappingTemplateRule struct {
1517
attributeName string
1618
max int
1719
min int
20+
pattern *regexp.Regexp
1821
}
1922

2023
// NewAwsAppsyncFunctionInvalidRequestMappingTemplateRule returns new rule with default attributes
@@ -24,6 +27,7 @@ func NewAwsAppsyncFunctionInvalidRequestMappingTemplateRule() *AwsAppsyncFunctio
2427
attributeName: "request_mapping_template",
2528
max: 65536,
2629
min: 1,
30+
pattern: regexp.MustCompile(`^.*$`),
2731
}
2832
}
2933

@@ -70,6 +74,13 @@ func (r *AwsAppsyncFunctionInvalidRequestMappingTemplateRule) Check(runner tflin
7074
attribute.Expr,
7175
)
7276
}
77+
if !r.pattern.MatchString(val) {
78+
runner.EmitIssueOnExpr(
79+
r,
80+
fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(val), `^.*$`),
81+
attribute.Expr,
82+
)
83+
}
7384
return nil
7485
})
7586
})

rules/models/aws_appsync_function_invalid_response_mapping_template.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
package models
44

55
import (
6+
"fmt"
67
"log"
8+
"regexp"
79

810
hcl "github.com/hashicorp/hcl/v2"
911
"github.com/terraform-linters/tflint-plugin-sdk/tflint"
@@ -15,6 +17,7 @@ type AwsAppsyncFunctionInvalidResponseMappingTemplateRule struct {
1517
attributeName string
1618
max int
1719
min int
20+
pattern *regexp.Regexp
1821
}
1922

2023
// NewAwsAppsyncFunctionInvalidResponseMappingTemplateRule returns new rule with default attributes
@@ -24,6 +27,7 @@ func NewAwsAppsyncFunctionInvalidResponseMappingTemplateRule() *AwsAppsyncFuncti
2427
attributeName: "response_mapping_template",
2528
max: 65536,
2629
min: 1,
30+
pattern: regexp.MustCompile(`^.*$`),
2731
}
2832
}
2933

@@ -70,6 +74,13 @@ func (r *AwsAppsyncFunctionInvalidResponseMappingTemplateRule) Check(runner tfli
7074
attribute.Expr,
7175
)
7276
}
77+
if !r.pattern.MatchString(val) {
78+
runner.EmitIssueOnExpr(
79+
r,
80+
fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(val), `^.*$`),
81+
attribute.Expr,
82+
)
83+
}
7384
return nil
7485
})
7586
})

rules/models/aws_appsync_resolver_invalid_request_template.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
package models
44

55
import (
6+
"fmt"
67
"log"
8+
"regexp"
79

810
hcl "github.com/hashicorp/hcl/v2"
911
"github.com/terraform-linters/tflint-plugin-sdk/tflint"
@@ -15,6 +17,7 @@ type AwsAppsyncResolverInvalidRequestTemplateRule struct {
1517
attributeName string
1618
max int
1719
min int
20+
pattern *regexp.Regexp
1821
}
1922

2023
// NewAwsAppsyncResolverInvalidRequestTemplateRule returns new rule with default attributes
@@ -24,6 +27,7 @@ func NewAwsAppsyncResolverInvalidRequestTemplateRule() *AwsAppsyncResolverInvali
2427
attributeName: "request_template",
2528
max: 65536,
2629
min: 1,
30+
pattern: regexp.MustCompile(`^.*$`),
2731
}
2832
}
2933

@@ -70,6 +74,13 @@ func (r *AwsAppsyncResolverInvalidRequestTemplateRule) Check(runner tflint.Runne
7074
attribute.Expr,
7175
)
7276
}
77+
if !r.pattern.MatchString(val) {
78+
runner.EmitIssueOnExpr(
79+
r,
80+
fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(val), `^.*$`),
81+
attribute.Expr,
82+
)
83+
}
7384
return nil
7485
})
7586
})

rules/models/aws_appsync_resolver_invalid_response_template.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
package models
44

55
import (
6+
"fmt"
67
"log"
8+
"regexp"
79

810
hcl "github.com/hashicorp/hcl/v2"
911
"github.com/terraform-linters/tflint-plugin-sdk/tflint"
@@ -15,6 +17,7 @@ type AwsAppsyncResolverInvalidResponseTemplateRule struct {
1517
attributeName string
1618
max int
1719
min int
20+
pattern *regexp.Regexp
1821
}
1922

2023
// NewAwsAppsyncResolverInvalidResponseTemplateRule returns new rule with default attributes
@@ -24,6 +27,7 @@ func NewAwsAppsyncResolverInvalidResponseTemplateRule() *AwsAppsyncResolverInval
2427
attributeName: "response_template",
2528
max: 65536,
2629
min: 1,
30+
pattern: regexp.MustCompile(`^.*$`),
2731
}
2832
}
2933

@@ -70,6 +74,13 @@ func (r *AwsAppsyncResolverInvalidResponseTemplateRule) Check(runner tflint.Runn
7074
attribute.Expr,
7175
)
7276
}
77+
if !r.pattern.MatchString(val) {
78+
runner.EmitIssueOnExpr(
79+
r,
80+
fmt.Sprintf(`"%s" does not match valid pattern %s`, truncateLongMessage(val), `^.*$`),
81+
attribute.Expr,
82+
)
83+
}
7384
return nil
7485
})
7586
})

rules/models/aws_ec2_capacity_reservation_invalid_instance_platform.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ func NewAwsEc2CapacityReservationInvalidInstancePlatformRule() *AwsEc2CapacityRe
3434
"Linux with SQL Server Standard",
3535
"Linux with SQL Server Web",
3636
"Linux with SQL Server Enterprise",
37+
"RHEL with SQL Server Standard",
38+
"RHEL with SQL Server Enterprise",
39+
"RHEL with SQL Server Web",
40+
"RHEL with HA",
41+
"RHEL with HA and SQL Server Standard",
42+
"RHEL with HA and SQL Server Enterprise",
3743
},
3844
}
3945
}

0 commit comments

Comments
 (0)