2.0.1 • Published 9 days ago

@tazbruce/pulumi-quickstart-library v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 days ago

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

1.0.1

9 days ago

2.0.1

9 days ago

2.0.0

9 days ago

1.0.0

9 months ago