1. Packages
  2. Google Cloud (GCP) Classic
  3. How-to Guides
  4. Google Cloud Functions in Python and Go deployed
Google Cloud Classic v8.10.0 published on Wednesday, Nov 20, 2024 by Pulumi

Google Cloud Functions in Python and Go deployed

gcp logo
Google Cloud Classic v8.10.0 published on Wednesday, Nov 20, 2024 by Pulumi

    View Code Deploy this example with Pulumi

    This example deploys two Google Cloud Functions. “Hello World” functions are implemented in Python and Go. Pulumi program is implemented in Python.

    # Create and configure a new stack
    $ pulumi stack init testing
    $ pulumi config set gcp:project <your-gcp-project>
    $ pulumi config set gcp:region <gcp-region>
    
    # Preview and run the deployment
    $ pulumi up
    Previewing changes:
    ...
    Performing changes:
    ...
    info: 6 changes performed:
        + 6 resources created
    Update duration: 1m14s
    
    # Test it out
    $ curl $(pulumi stack output python_endpoint)
    "Hello World!"
    $ curl $(pulumi stack output go_endpoint)
    "Hello World!"
    
    # Remove the app
    $ pulumi destroy
    
    gcp logo
    Google Cloud Classic v8.10.0 published on Wednesday, Nov 20, 2024 by Pulumi