Socket
Socket
Sign inDemoInstall

@serverless/tencent-postgresql

Package Overview
Dependencies
157
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @serverless/tencent-postgresql

Tencent Cloud PostgresSQL Component


Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Install size
30.4 MB
Created
Weekly downloads
 

Readme

Source

腾讯云 PostgreSQL DB 组件

简体中文 | English

简介

通过 PostgreSQL DB 组件,可以快速方便的创建,配置和管理腾讯云的 PostgreSQL 产品。

快速开始

  1. 安装
  2. 配置
  3. 部署
  4. 移除
  5. 账号配置(可选)

1. 安装

通过 npm 全局安装 serverless cli

$ npm install -g serverless

2. 配置

在项目根目录创建 serverless.yml 文件,在其中进行如下配置

$ touch serverless.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

3. 部署

如您的账号未 登录注册 腾讯云,您可以直接通过 微信 扫描命令行中的二维码进行授权登陆和注册。

通过 sls 命令进行部署,并可以添加 --debug 参数查看部署过程中的信息

$ sls --debug

注意: slsserverless 命令的简写。

4. 移除

通过以下命令移除部署的 DB 实例

$ sls remove --debug

5. 账号配置(可选)

当前默认支持 CLI 扫描二维码登录,如您希望配置持久的环境变量/秘钥信息,也可以本地创建 .env 文件

$ touch .env # 腾讯云的配置信息

.env 文件中配置腾讯云的 SecretId 和 SecretKey 信息并保存

如果没有腾讯云账号,可以在此 注册新账号

如果已有腾讯云账号,可以在 API 密钥管理 中获取 SecretIdSecretKey.

# .env
TENCENT_SECRET_ID=123
TENCENT_SECRET_KEY=123

更多组件

可以在 Serverless Components repo 中查询更多组件的信息。

Keywords

FAQs

Last updated on 01 Apr 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc