Skip to content

Latest commit

 

History

History
executable file
·
82 lines (55 loc) · 1.8 KB

README.en.md

File metadata and controls

executable file
·
82 lines (55 loc) · 1.8 KB

Tencent Cloud Vpc Component

简体中文 | English

Introduction

Tencent Cloud Vpc serverless component.

Content

  1. Install
  2. Create
  3. Configure
  4. Deploy
  5. Remove

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
org: orgDemo # (optional) serverless dashboard org. default is the first org you created during signup.
app: appDemo # (optional) serverless dashboard app. default is the same as the name property.
stage: dev # (optional) serverless dashboard stage. default is dev.

component: vpc # (required) name of the component. In that case, it's vpc.
name: vpcDemo # (required) name of your vpc component instance.

inputs:
  region: ap-guangzhou
  zone: ap-guangzhou-2
  vpcName: serverless
  subnetName: serverless

4. Deploy

$ sls deploy

Notice: sls is short for serverless command.

 

5. Remove

$ sls remove

More Components

Checkout the Serverless Components repo for more information.