Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
Pulumi.yaml Remove duplicate template descriptions (#188) Dec 3, 2018
README.md Add 'Deploy with Pulumi' button to examples (#167) Nov 8, 2018
gcpFunction.ts Add a Google Cloud Functions example Jul 29, 2018
index.ts
package.json Reference packages consistently in examples (#224) Feb 7, 2019
tsconfig.json Add a Google Cloud Functions example Jul 29, 2018

README.md

Deploy

GCP Functions

An example Pulumi component that deploys a TypeScript function to Google Cloud Functions.

Running the App

  1. Create a new stack:

    $ pulumi stack init gcp-fn
    
  2. Configure GCP project and region:

    $ pulumi config set gcp:project <projectname> 
    $ pulumi config set gcp:region <region>
    
  3. Restore NPM dependencies:

    $ npm install
    
  4. Run pulumi up to preview and deploy changes:

    $ pulumi up
    Previewing changes:
    ...
    
    Performing changes:
    ...
    info: 6 changes performed:
        + 6 resources created
    Update duration: 39.65130324s
    
  5. Check the deployed function endpoint:

    $ pulumi stack output url
    https://us-central1-pulumi-development.cloudfunctions.net/greeting-function-7f95447
    $ curl "$(pulumi stack output url)"
    Greetings from Google Cloud Functions!
    ...