Skip to content

Commit 199cc83

Browse files
yugasunYuga Sun
authored andcommitted
fix(cynosdb): set payMode default to 0, post-paid order
1 parent 1996204 commit 199cc83

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/modules/cynosdb/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Cynosdb {
3737
storageLimit = 1000,
3838
instanceCount = 2,
3939
adminPassword,
40-
payMode = 1,
40+
payMode = 0,
4141
timeSpan = 1,
4242
timeUnit = 'm',
4343
autoVoucher = 1,
@@ -75,8 +75,6 @@ class Cynosdb {
7575
StorageLimit: storageLimit,
7676
InstanceCount: instanceCount,
7777
PayMode: payMode,
78-
TimeSpan: timeSpan,
79-
TimeUnit: timeUnit,
8078
AutoVoucher: autoVoucher,
8179
RollbackStrategy: 'noneRollback',
8280
OrderSource: 'serverless',
@@ -87,6 +85,11 @@ class Cynosdb {
8785
SubnetId: vpcConfig.subnetId,
8886
AdminPassword: adminPassword || generatePwd(),
8987
};
88+
// prepay need set timespan 1month
89+
if (payMode === 1) {
90+
dbInputs.TimeSpan = timeSpan;
91+
dbInputs.TimeUnit = timeUnit;
92+
}
9093

9194
clusterDetail = await createCluster(this.capi, dbInputs);
9295
outputs.clusterId = clusterDetail.ClusterId;

0 commit comments

Comments
 (0)