Tencent Cloud PostgresSQL Component
简体中文 | English
Using PostgreSQL Component, you can create/update/delete PostgreSQL Instance for Serverless Application conveniently.
1. Install
2. Create
3. Configure
4. Deploy
5. Remove
Install the Serverless Framework globally:
``bash`
$ npm install -g serverless
In project root, create the following simple boilerplate:
`bash`
$ touch serverless.yml
$ touch .env # your Tencent api keys
Add the access keys of a Tencent CAM Role with AdministratorAccess in the .env file, using this format:
``.env
TENCENT_SECRET_ID=XXX
TENCENT_SECRET_KEY=XXX
- If you don't have a Tencent Cloud account, you could sign up first.
`yml`serverless.yml
MyPostgreSQL:
component: '@serverless/tencent-postgresql'
inputs:
region: ap-guangzhou
zone: ap-guangzhou-3
dBInstanceName: serverlessDb
dBVersion: 10.4
dBCharset: UTF8
vpcConfig:
vpcId: 123
subnetId: 123
extranetAccess: false
`bash`
$ sls --debug
> Notice: sls is short for serverless command.
`bash``
$ sls remove --debug
Checkout the Serverless Components repo for more information.