Fortinet black logo

Administration Guide

Google Cloud Function action

Google Cloud Function action

Google Cloud functions can be called when an automation stitch is triggered. This example uses a Security Rating Summary trigger in the automation stitch.

To configure a Google Cloud function automation stitch in the GUI:
  1. Go to Security Fabric > Automation and click Create New.
  2. Enter the stitch name.
  3. Configure the trigger:
    1. Click Add Trigger.
    2. Click Create and select Security Rating Summary.
    3. Enter the following:

      Name

      auto-google1

      Report

      Security Posture

    4. Click OK.
    5. Select the trigger in the list and click Apply.
  4. Configure the Google Cloud Function action:
    1. Click Add Action.
    2. Click Create and select Google Cloud Function.
    3. Enter the following:

      Name

      google-echo

      URL

      Enter the request API URI

      HTTP header

      echo-header : echo-value

    4. Click OK.
    5. Select the action in the list and click Apply.
  5. Click OK.
To configure a Google Cloud function automation stitch in the CLI:
  1. Create an automation trigger:
    config system automation-trigger
        edit "auto-google1"
            set event-type security-rating-summary
        next
    end
  2. Create an automation action:
    config system automation-action
        edit "google-echo"
            set action-type google-cloud-function
            set uri "us-central1-xxx-xxxxxxx-000-000000.cloudfunctions.net/xxxx-echo"
            set headers "echo-header:echo-value"
        next
    end
  3. Create the automation stitch:
    config system automation-stitch
        edit "auto-google1"
            set trigger "auto-google1"
            set action "google-echo"
        next
    end

When the automation stitch is triggered, the Security Fabric > Automation page shows the stitch trigger time. In Google Cloud, go to Logs to see the function log showing that the configured function was called, executed, and finished:

Google Cloud Function action

Google Cloud functions can be called when an automation stitch is triggered. This example uses a Security Rating Summary trigger in the automation stitch.

To configure a Google Cloud function automation stitch in the GUI:
  1. Go to Security Fabric > Automation and click Create New.
  2. Enter the stitch name.
  3. Configure the trigger:
    1. Click Add Trigger.
    2. Click Create and select Security Rating Summary.
    3. Enter the following:

      Name

      auto-google1

      Report

      Security Posture

    4. Click OK.
    5. Select the trigger in the list and click Apply.
  4. Configure the Google Cloud Function action:
    1. Click Add Action.
    2. Click Create and select Google Cloud Function.
    3. Enter the following:

      Name

      google-echo

      URL

      Enter the request API URI

      HTTP header

      echo-header : echo-value

    4. Click OK.
    5. Select the action in the list and click Apply.
  5. Click OK.
To configure a Google Cloud function automation stitch in the CLI:
  1. Create an automation trigger:
    config system automation-trigger
        edit "auto-google1"
            set event-type security-rating-summary
        next
    end
  2. Create an automation action:
    config system automation-action
        edit "google-echo"
            set action-type google-cloud-function
            set uri "us-central1-xxx-xxxxxxx-000-000000.cloudfunctions.net/xxxx-echo"
            set headers "echo-header:echo-value"
        next
    end
  3. Create the automation stitch:
    config system automation-stitch
        edit "auto-google1"
            set trigger "auto-google1"
            set action "google-echo"
        next
    end

When the automation stitch is triggered, the Security Fabric > Automation page shows the stitch trigger time. In Google Cloud, go to Logs to see the function log showing that the configured function was called, executed, and finished: