@tazbruce/pulumi-quickstart-library
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

pulumi-quickstart-library

This is a Pulumi Component Library built to allow for extremely quick API creation. In particular, this library is designed to provide a fast and simple way to deploy a containerised API to Google Cloud Run, and then expose it to the internet via AWS Api Gateway.

Requirements

Installation

npm install @tazbruce/infra-api-library

Usage

Container Component

Pulumi Config Requirements

  • gcp:project - Google Cloud Project ID
  • gcp:region - Google Cloud Region
  • gcp:credentials - Google Cloud Service Account Credentials
import { ContainerComponent } from '@tazbruce/infra-api-library';

const container = new ContainerComponent("container", {
    environment: environment, // dev, staging, prod
    imageName: imageName, // name of the image to use
    appPath: appPath, // path of the app
    memory: memory, // memory to allocate
    cpu: cpu, // cpu to allocate
    containerPort: containerPort, // port to expose
    concurrency: concurrency, // max concurrent requests
});

Api Component

Pulumi Config Requirements

  • aws:region - AWS Region
  • aws:accessKey - AWS Access Key
  • aws:secretKey - AWS Secret Key
import { ApiComponent } from '@tazbruce/infra-api-library';

const api = new ApiComponent("api", {
    environment: environment, // dev, staging, prod
    imageName: imageName, // name of the image to use
    containerUrl: containerComponent.serviceUrl, // url of the container
    appDomain: appUrl, // domain of the app
    apiDomain: apiDomain, // domain of the api
});

Contributing

See CONTRIBUTING.md for details on how to contribute to this library.

License

This library is licensed under the MIT License. See the LICENSE file.

Reference

Readme

Keywords

none

Package Sidebar

Install

npm i @tazbruce/pulumi-quickstart-library

Weekly Downloads

0

Version

2.0.1

License

MIT

Unpacked Size

13.6 kB

Total Files

8

Last publish

Collaborators

  • tazbruce