Google Cloud account variables

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
JsonKey
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.

Older versions

  • Google Cloud accounts are available from Octopus Deploy 2021.3 onwards.

Learn more

Help us continuously improve

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

Send feedback

Page updated on Thursday, August 29, 2024