@@ -27,6 +27,11 @@ func (o *rdsOrchestrator) databaseCreate(c buffalo.Context, req *DatabaseCreateR
27
27
if req .Cluster != nil {
28
28
req .Cluster .Tags = normalizeTags (req .Cluster .Tags )
29
29
30
+ // set default storage encryption
31
+ if req .Cluster .StorageEncrypted == nil {
32
+ req .Cluster .StorageEncrypted = aws .Bool (true )
33
+ }
34
+
30
35
// set default subnet group
31
36
if req .Cluster .DBSubnetGroupName == nil {
32
37
req .Cluster .DBSubnetGroupName = aws .String (o .client .DefaultSubnetGroup )
@@ -62,7 +67,7 @@ func (o *rdsOrchestrator) databaseCreate(c buffalo.Context, req *DatabaseCreateR
62
67
MasterUserPassword : req .Cluster .MasterUserPassword ,
63
68
MasterUsername : req .Cluster .MasterUsername ,
64
69
Port : req .Cluster .Port ,
65
- StorageEncrypted : aws . Bool ( true ) ,
70
+ StorageEncrypted : req . Cluster . StorageEncrypted ,
66
71
Tags : toRDSTags (req .Cluster .Tags ),
67
72
VpcSecurityGroupIds : req .Cluster .VpcSecurityGroupIds ,
68
73
}
@@ -89,6 +94,11 @@ func (o *rdsOrchestrator) databaseCreate(c buffalo.Context, req *DatabaseCreateR
89
94
if req .Instance != nil {
90
95
req .Instance .Tags = normalizeTags (req .Instance .Tags )
91
96
97
+ // set default storage encryption
98
+ if req .Instance .StorageEncrypted == nil {
99
+ req .Instance .StorageEncrypted = aws .Bool (true )
100
+ }
101
+
92
102
// set default subnet group
93
103
if req .Instance .DBSubnetGroupName == nil {
94
104
req .Instance .DBSubnetGroupName = aws .String (o .client .DefaultSubnetGroup )
@@ -126,7 +136,7 @@ func (o *rdsOrchestrator) databaseCreate(c buffalo.Context, req *DatabaseCreateR
126
136
MultiAZ : req .Instance .MultiAZ ,
127
137
Port : req .Instance .Port ,
128
138
PubliclyAccessible : aws .Bool (false ),
129
- StorageEncrypted : aws . Bool ( true ) ,
139
+ StorageEncrypted : req . Instance . StorageEncrypted ,
130
140
Tags : toRDSTags (req .Instance .Tags ),
131
141
VpcSecurityGroupIds : req .Instance .VpcSecurityGroupIds ,
132
142
}
0 commit comments