File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class Cynosdb {
37
37
storageLimit = 1000 ,
38
38
instanceCount = 2 ,
39
39
adminPassword,
40
- payMode = 1 ,
40
+ payMode = 0 ,
41
41
timeSpan = 1 ,
42
42
timeUnit = 'm' ,
43
43
autoVoucher = 1 ,
@@ -75,8 +75,6 @@ class Cynosdb {
75
75
StorageLimit : storageLimit ,
76
76
InstanceCount : instanceCount ,
77
77
PayMode : payMode ,
78
- TimeSpan : timeSpan ,
79
- TimeUnit : timeUnit ,
80
78
AutoVoucher : autoVoucher ,
81
79
RollbackStrategy : 'noneRollback' ,
82
80
OrderSource : 'serverless' ,
@@ -87,6 +85,11 @@ class Cynosdb {
87
85
SubnetId : vpcConfig . subnetId ,
88
86
AdminPassword : adminPassword || generatePwd ( ) ,
89
87
} ;
88
+ // prepay need set timespan 1month
89
+ if ( payMode === 1 ) {
90
+ dbInputs . TimeSpan = timeSpan ;
91
+ dbInputs . TimeUnit = timeUnit ;
92
+ }
90
93
91
94
clusterDetail = await createCluster ( this . capi , dbInputs ) ;
92
95
outputs . clusterId = clusterDetail . ClusterId ;
You can’t perform that action at this time.
0 commit comments