1. Packages
  2. Google Cloud Native
  3. Installation & Configuration

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.30.0 published on Friday, Apr 14, 2023 by Pulumi

Google Cloud Native: Installation & Configuration

google-native logo

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.30.0 published on Friday, Apr 14, 2023 by Pulumi

    Installation

    The Google Cloud Native provider is available as a package in all Pulumi languages:

    Configuration

    To provision resources with the Pulumi Google Cloud Provider, you need to have Google credentials.

    When developing locally, we recommend that you install the Google Cloud SDK and then authorize access with a user account. Next, Pulumi requires default application credentials to interact with your Google Cloud resources, so run auth application-default login command to obtain those credentials:

    $ gcloud auth application-default login
    Copy

    To configure Pulumi to interact with your Google Cloud project, set it with the pulumi config command using the project’s ID:

    $ pulumi config set google-native:project your-gcp-project-id
    Copy

    You may also set your Google Cloud Project via environment variable (listed in order of precedence):

    • GOOGLE_PROJECT
    • GOOGLE_CLOUD_PROJECT
    • GCLOUD_PROJECT
    • CLOUDSDK_CORE_PROJECT
    $ export GOOGLE_PROJECT=your-gcp-project-id
    Copy
    If you are using Pulumi in an non-interactive setting (such as a CI/CD system) you will need to configure and use a service account instead.

    Configuration Options

    Use pulumi config set google-native:<option> or pass options to the constructor of new Provider.

    OptionRequired/OptionalDescription
    projectOptionalThe default project for new resources, if one is not specified when creating a resource. This can also be specified using any of the following environment variables (listed in order of precedence): GOOGLE_PROJECT, GOOGLE_CLOUD_PROJECT, GCLOUD_PROJECT, CLOUDSDK_CORE_PROJECT.
    regionOptionalThe region to operate under, if not specified by a given resource. This can also be specified using any of the following environment variables (listed in order of precedence): GOOGLE_REGION, GCLOUD_REGION, CLOUDSDK_COMPUTE_REGION.
    zoneOptionalThe zone to operate under, if not specified by a given resource. This can also be specified using any of the following environment variables (listed in order of precedence): GOOGLE_ZONE, GCLOUD_ZONE, CLOUDSDK_COMPUTE_ZONE.

    Use environment variables

    We recommend using pulumi config for the options above, but you can also set many of the options above as environment variables instead.

    • GOOGLE_PROJECT - The default project for new resources, if one is not specified when creating a resource
    • GOOGLE_REGION - The default region for new resources, if one is not specified when creating a resource
    • GOOGLE_ZONE - The default zone for new resources, if one is not specified when creating a resource.
    google-native logo

    Google Cloud Native is in preview. Google Cloud Classic is fully supported.

    Google Cloud Native v0.30.0 published on Friday, Apr 14, 2023 by Pulumi