Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
1.6 KiB
HTML
Raw Permalink Normal View History

{{ $type := default "gcp" (.Get "type") }}
When developing locally, we recommend that you install the [Google Cloud SDK](https://cloud.google.com/sdk/install) and then [authorize access with a user
account](https://cloud.google.com/sdk/docs/authorizing#authorizing_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:
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="no-select">$ </span>gcloud auth application-default login</code></pre>
</div>
To configure Pulumi to interact with your Google Cloud project, set it with the `pulumi config` command using the project's ID:
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="no-select">$ </span>pulumi config set {{ $type }}:project your-gcp-project-id</code></pre>
</div>
You may also set your Google Cloud Project via environment variable (listed in order of precedence):
<ul>
<li><code class="language-bash" data-lang="bash">GOOGLE_PROJECT</code></li>
<li><code class="language-bash" data-lang="bash">GOOGLE_CLOUD_PROJECT</code></li>
<li><code class="language-bash" data-lang="bash">GCLOUD_PROJECT</code></li>
<li><code class="language-bash" data-lang="bash">CLOUDSDK_CORE_PROJECT</code></li>
</ul>
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="no-select">$ </span>export GOOGLE_PROJECT=your-gcp-project-id</code></pre>
</div>