File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ These rules warn of possible errors that can occur at `terraform apply`. Rules m
11
11
| aws_alb_invalid_security_group| ✔|
12
12
| aws_alb_invalid_subnet| ✔|
13
13
| aws_db_instance_invalid_db_subnet_group| ✔|
14
+ | aws_db_instance_invalid_engine||
14
15
| aws_db_instance_invalid_option_group| ✔|
15
16
| aws_db_instance_invalid_parameter_group| ✔|
16
17
| aws_db_instance_invalid_type||
@@ -52,6 +53,7 @@ These rules warn of possible errors that can occur at `terraform apply`. Rules m
52
53
These rules suggest to better ways.
53
54
54
55
- [ aws_instance_previous_type] ( aws_instance_previous_type.md )
56
+ - [ aws_db_instance_invalid_engine] ( aws_db_instance_invalid_engine.md )
55
57
- [ aws_db_instance_previous_type] ( aws_db_instance_previous_type.md )
56
58
- [ aws_db_instance_default_parameter_group] ( aws_db_instance_default_parameter_group.md )
57
59
- [ aws_elasticache_cluster_previous_type] ( aws_elasticache_cluster_previous_type.md )
Original file line number Diff line number Diff line change
1
+ # aws_db_instance_invalid_engine
2
+
3
+ Disallow using invalid engine name.
4
+
5
+ ## Example
6
+
7
+ ``` hcl
8
+ resource "aws_db_instance" "default" {
9
+ allocated_storage = 20
10
+ engine = "mysql57" // invalid engine name!
11
+ engine_version = "5.7"
12
+ instance_class = "db.t2.micro"
13
+ name = "mydb"
14
+ username = "foo"
15
+ password = "bar"
16
+ db_subnet_group_name = "my_database_subnet_group"
17
+ parameter_group_name = "default.mysql5.6"
18
+ }
19
+ ```
20
+
21
+ ```
22
+ $ tflint
23
+ 1 issue(s) found:
24
+
25
+ Warning: "mysql57" is invalid engine. (aws_db_invalid_engine)
26
+
27
+ on template.tf line 3:
28
+ 3: engine = "mysql57" // invalid engine name!
29
+
30
+ ```
31
+
32
+ ## Why
33
+
34
+ Apply will fail. (Plan will succeed with the invalid value though)
35
+
36
+ ## How To Fix
37
+
38
+ Select valid engine name according to the [ document] ( https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-engine-versions.html#options )
You can’t perform that action at this time.
0 commit comments