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.
- Node.js
- Pulumi
- Docker
- Google Cloud SDK
- Google Cloud Project
- Google Cloud Service Account
- AWS CLI
- AWS Account
- AWS IAM User
- AWS Route53 Hosted Zone
npm install @tazbruce/infra-api-library
-
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
});
-
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
});
See CONTRIBUTING.md for details on how to contribute to this library.
This library is licensed under the MIT License. See the LICENSE file.