Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/serverless-components/tencent-vpc

Tencent Cloud Vpc Serverless Component
https://github.com/serverless-components/tencent-vpc

Last synced: 2 months ago
JSON representation

Tencent Cloud Vpc Serverless Component

Awesome Lists containing this project

README

        

# Tencent Cloud Vpc Component

[简体中文](https://github.com/serverless-components/tencent-vpc/tree/master/README.md) | English

## Introduction

Tencent Cloud Vpc serverless component.

## Content

1. [Install](#1-install)
2. [Create](#2-create)
3. [Configure](#3-configure)
4. [Deploy](#4-deploy)
5. [Remove](#5-Remove)

### 1. Install

Install the Serverless Framework globally:

```bash
$ npm install -g serverless
```

### 2. Create

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](https://console.cloud.tencent.com/cam/capi) 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](https://intl.cloud.tencent.com/register) first.

### 3. Configure

```yml
# 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
```

- [More Options](https://github.com/serverless-components/tencent-vpc/tree/master/docs/configure.md)

### 4. Deploy

```bash
$ sls deploy
```

> Notice: `sls` is short for `serverless` command.

 

### 5. Remove

```bash
$ sls remove
```

### More Components

Checkout the [Serverless Components](https://github.com/serverless/components) repo for more information.