Google cloud account variables

Google Cloud Accounts were added in Octopus 2021.2.

Google cloud accounts are included in a project through a project variable of the type Google Cloud Account. Before you create a Google cloud account Variable, you need to create a Google cloud account in Octopus:

Google cloud account variable

The Add Variable window is then displayed and lists all the Google cloud accounts.

Select the Google cloud account you want to access from the project to assign it to the variable:

Google Cloud account variable selection

Google Cloud account variable properties

The Google cloud account variable also exposes the following properties that you can reference in a PowerShell script:

Name and description
The JSON Key for the Google cloud account

Accessing the properties in a script

Each of the above properties can be referenced in PowerShell.

# For an account with a variable name of 'google cloud account'

# Using $OctopusParameters
Write-Host 'GoogleCloudAccount.Id=' $OctopusParameters["google cloud account"]
Write-Host 'GoogleCloudAccount.JsonKey=' $OctopusParameters["google cloud account.JsonKey"]

# Directly as a variable
Write-Host 'GoogleCloudAccount.Id=' #{google cloud account}
Write-Host 'GoogleCloudAccount.JsonKey=' #{google cloud account.JsonKey}

Add a Google cloud account to Octopus

For instructions to set up a Google cloud account in Octopus, see Google Cloud Accounts.

Learn more

Help us continuously improve

Please let us know if you have any feedback about this page.

Send feedback

Page updated on Sunday, January 1, 2023