@serverless/tencent-postgresql
v0.1.3
Published
Tencent Cloud PostgresSQL Component
Downloads
8
Maintainers
Readme
Tencent Cloud PostgreSQL Component
简体中文 | English
Introduction
Using PostgreSQL Component, you can create/update/delete PostgreSQL Instance for Serverless Application conveniently.
Content
1. Install
Install the Serverless Framework globally:
$ npm install -g serverless
2. Create
In project root, create the following simple boilerplate:
$ 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.
3. Configure
# 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
4. Deploy
$ sls --debug
Notice:
sls
is short forserverless
command.
5. Remove
$ sls remove --debug
More Components
Checkout the Serverless Components repo for more information.