CINXE.COM

Google Cloud (GCP) Classic | Pulumi Registry

<!doctype html><html lang=en-US prefix="og: http://ogp.me/ns#"><head><meta charset=UTF-8><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1"><script>var segmentWriteKey="UK90Ofwacetj5VCPJ7cUgkbNcKLSHO3u",snippetName="C8Y429BDEy/06ujkUhzfL.min.js";window.growthbook_sdk_key="sdk-psPofGr6jFV2ja9O",window.growthbook_decrypt_key="9NsAVMNWaDS+Oky3rhLQ+A==",window.growthbook_dev_mode=!1</script><script src=https://code.jquery.com/jquery-3.6.0.min.js integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin=anonymous referrerpolicy=no-referrer></script><script src=/registry/js/bundle-registry.02b1f6a79a2c288956457a06b8bf2ac78009e38f257cee8641b4250cd6bea6cc.js defer></script><link rel=stylesheet href=/registry/css/bundle-registry.3681ecac9560cb377e30fd50a57e91d631561f3e766a86cdc385650ed931b3b6.css></link> <meta name=google-site-verification content="N-ezSTIu4P3bSc4TqidV4wWCkMzFiMN269ZgDYArGkk"><meta property="og:image" content="https://www.pulumi.com/logos/brand/og-default.png"><meta property="og:type" content="article"><meta property="og:url" content="https://www.pulumi.com/registry/packages/gcp/"><meta property="og:site_name" content="pulumi"><meta name=twitter:image content="https://www.pulumi.com/logos/brand/twitter-summary.png"><meta name=twitter:card content="summary"><meta name=twitter:site content="@PulumiCorp"><meta property="og:title" content="Google Cloud (GCP) Classic"><meta name=description content="Learn how to use Pulumi's GCP Provider to reduce the complexity of managing and provisioning GCP resources."><meta property="og:description" content="Learn how to use Pulumi's GCP Provider to reduce the complexity of managing and provisioning GCP resources."><title>Google Cloud (GCP) Classic | Pulumi Registry</title> <link rel=icon type=image/x-icon href=/images/favicon.ico><link rel=canonical href=https://www.pulumi.com/registry/packages/gcp/><link rel=alternate type=application/rss+xml href=https://www.pulumi.com/blog/rss.xml title="Pulumi Blog"><script src=https://js.sentry-cdn.com/02614bf2f18e4615a73218b810563ced.min.js crossorigin=anonymous></script><script>Sentry.onLoad(function(){Sentry.init({environment:"production",release:"push-d0bd53c4",beforeSend(e){const t=e.request.headers["User-Agent"];return t&&t.match(/Linespider|Yeti/)?null:e}})})</script><script async defer src=https://buttons.github.io/buttons.js></script><script>userAgentBlacklist=["Mozilla/5.0 (compatible; SiteAuditBot/0.97; +http://www.semrush.com/bot.html)","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"],!function(){var n,s,t="analytics",e=window[t]=window[t]||[];if(!e.initialize)if(e.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else if(userAgentBlacklist.includes(navigator.userAgent))console.log("Segment snippet not loaded for user agent: "+navigator.userAgent);else{e.invoked=!0,e.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","screen","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware","register"],e.factory=function(n){return function(){if(window[t].initialized)return window[t][n].apply(window[t],arguments);var o,s=Array.prototype.slice.call(arguments);return["track","screen","alias","group","page","identify"].indexOf(n)>-1&&(o=document.querySelector("link[rel='canonical']"),s.push({__t:"bpc",c:o&&o.getAttribute("href")||void 0,p:location.pathname,u:location.href,s:location.search,t:document.title,r:document.referrer})),s.unshift(n),e.push(s),e}};for(n=0;n<e.methods.length;n++)s=e.methods[n],e[s]=e.factory(s);e.load=function(n,s){var i,o=document.createElement("script");o.type="text/javascript",o.async=!0,o.setAttribute("data-global-segment-analytics-key",t),o.src="https://evs.analytics.pulumi.com/"+snippetName,i=document.getElementsByTagName("script")[0],i.parentNode.insertBefore(o,i),e._loadOptions=s},e._writeKey=segmentWriteKey,e._cdn="https://evs.analytics.pulumi.com",e.SNIPPET_VERSION="5.2.0",e.load(segmentWriteKey),e.page()}}()</script><script>window.consentManagerConfig=function(e){var t=e.React,c=e.inEU,n=t.createElement("span",null,"We use cookies (and other similar technologies) to collect data to improve your experience on our site. By using our website, you諝re agreeing to the collection of data as described in our"," ",t.createElement("a",{href:"/privacy/",target:"_blank"},"Privacy Policy"),"."),s=t.createElement("div",{class:"manage-cookies-btn"},"Manage cookies"),o="Website Data Collection Preferences",i="We use data collected by cookies and JavaScript libraries to improve your browsing experience, analyze site traffic, deliver personalized advertisements, and increase the overall performance of our site.",a="Are you sure you want to cancel?",r="Your preferences have not been saved. By continuing to use our website, you are agreeing to our Website Data Collection Policy.";return{container:"#segment-consent-manager",writeKey:segmentWriteKey,bannerContent:n,bannerSubContent:s,preferencesDialogTitle:o,preferencesDialogContent:i,cancelDialogTitle:a,cancelDialogContent:r,shouldRequireConsent:e.inEU,closeBehavior:e.inEU()?"dismiss":"accept",bannerTextColor:"black",cdnHost:"evs.analytics.pulumi.com",shouldReload:!1}}</script><script src=/js/consent-manager.js defer></script><script src=https://tag.clearbitscripts.com/v1/pk_54e7d7c428c6d5e79098374d93a7b333/tags.js referrerpolicy=strict-origin-when-cross-origin></script><meta name=facebook-domain-verification content="phlf6qes2bxa9ufzk8zt2es0qivg8j"><script>(function(){if(typeof window=="undefined")return;if(typeof window.signals!="undefined")return;var e=document.createElement("script");e.src="https://cdn.cr-relay.com/v1/site/a725b5ba-75f1-44dc-b250-11023fc10b9d/signals.js",e.async=!0,window.signals=Object.assign([],["page","identify","form"].reduce(function(e,t){return e[t]=function(){return signals.push([t,arguments]),signals},e},{})),document.head.appendChild(e)})()</script><script>!function(){var t,n,e=window.reb2b=window.reb2b||[];if(e.invoked)return;e.invoked=!0,e.methods=["identify","collect"],e.factory=function(t){return function(){var n=Array.prototype.slice.call(arguments);return n.unshift(t),e.push(n),e}};for(t=0;t<e.methods.length;t++)n=e.methods[t],e[n]=e.factory(n);e.load=function(e){var n,t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://s3-us-west-2.amazonaws.com/b2bjsstore/b/"+e+"/reb2b.js.gz",n=document.getElementsByTagName("script")[0],n.parentNode.insertBefore(t,n)},e.SNIPPET_VERSION="1.0.1",e.load("Y4O7Z0HKLKNX")}()</script><script async defer src=//cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js></script><script>window.addEventListener("load",function(){anchors&&anchors.add("h1:not(.no-anchor), h2:not(.no-anchor), h3:not(.no-anchor), h4:not(.no-anchor), h5:not(.no-anchor), h6:not(.no-anchor)")})</script></head><body class=section-registry><pulumi-root></pulumi-root><nav class="top-nav-bar docs actually-docs transition-all"><div class=top-nav-container><div class=logo-get-started><div data-track=header-pulumi-logo class="logo-nav-button logo-parent" aria-haspopup=true aria-controls=logo-nav-menu><div class=logo><img src=/images/logo/logo-on-white.svg alt="Pulumi logo"> <i class="fa fa-chevron-down"></i></div><ul id=logo-nav-menu role=menu class="logo-nav-menu hidden"><li role=none><a role=menuitem href=/>Pulumi home</a></li><li role=none><a role=menuitem href=/pricing/>Pricing</a></li><li role=none><a role=menuitem href=/blog/>Blog</a></li><li role=none><a role=menuitem href=/resources/>Events & workshops</a></li></ul></div><div class=get-started><a class=get-started-header-button data-track=get-started-practitioner-nav href=/docs/get-started/>Get Started</a></div></div><div class=nav-items><ul><li class=github-widget><a data-track=header-github-pulumi class=github-button href=https://github.com/pulumi/pulumi data-size=small data-show-count=true aria-label="Star pulumi/pulumi on GitHub">Star</a></li><li class=slack><a data-track=header-slack href=https://slack.pulumi.com/><i class="fab fa-slack"></i> Slack</a></li><li class=docs><a data-track=header-docs href=/docs/><div class="icon icon-16-16 book-outline"></div>Docs</a></li><li class=registry><a data-track=header-registry href=/registry/><div class="icon icon-14-14 packages-outline"></div>Registry</a></li><li class=ai><a data-track=header-ai href=/ai><div class="icon icon-16-16 robot-outline"></div>Pulumi AI</a></li><li><a data-track=header-console href=https://app.pulumi.com/ target=_blank><i class="fa fa-refular fa-user-circle"></i> <pulumi-user-toggle><span slot=signed-in>Pulumi Cloud</span> <span slot=signed-out>Sign In</span></pulumi-user-toggle></a></li></ul></div></div></nav><div class="header-container docs-hero"><span class=hide-on-pinned></span><div class=docs-type-nav-search><div class="docs-type-nav pt-1 overflow-x-scroll"><a class="whitespace-nowrap tab" href=/docs/><img class=tab-icon src=/icons/docs-light.svg> Docs Home </a><a class="whitespace-nowrap tab" href=/docs/iac/><span>Pulumi IaC</span> </a><a class="whitespace-nowrap tab" href=/docs/esc/><span>Pulumi ESC</span> </a><a class="whitespace-nowrap tab" href=/docs/pulumi-cloud/><span>Pulumi Cloud</span> </a><a class=tab-selected href=/registry><span>Packages</span> </a><a class=tab href=/tutorials/><span>Tutorials</span></a></div><div class=docs-search><div id=search data-app-id=P6KICOKU8E data-search-key=9ac9f1177f81bc8cb5f6cf30485e62db data-facets=Docs,Registry data-index=production></div></div><div class=content-width-controls><div id=expand-content-button class="icon icon-18-18 width-expand-18-18 expand-content"></div><div id=collapse-content-button class="icon icon-18-18 width-collapse-18-18 collapse-content hide"></div></div></div></div><main><div class=docs-list-main><div class=docs-main-nav-toggle-wrapper><div class=docs-main-nav-wrapper><div id=docs-main-nav class=docs-main-nav><nav class=main-nav><div class=all-packages-icon-link><a class=all-packages href=/registry><div class="icon icon-14-14 arrow-back-gray-14-14"></div>All packages</a></div><ul><li class="sidenav-topic active"><a href=/registry/packages/gcp/>Overview</a></li><li class=sidenav-topic><a href=/registry/packages/gcp/installation-configuration/>Install & config</a></li><li class=sidenav-topic><a href=/registry/packages/gcp/how-to-guides/>How-to guides <span class=count-badge>29</span></a></li><li class=sidenav-topic><a href=/registry/packages/gcp/api-docs/>API Docs</a></li><pulumi-api-doc-filterable-nav base-directory=/registry/packages/gcp/api-docs/ package-name=gcp></pulumi-api-doc-filterable-nav></ul></nav></div></div><div class=docs-nav-toggle><div class="docs-nav-toggle-icon icon icon-24-24"></div></div></div><div class=docs-main-content-wrapper><div class=docs-main-content><ol class=docs-breadcrumb><li><a data-track=breadcrumb href=/registry/>Packages</a></li><li class=active><a data-track=breadcrumb href=/registry/packages/gcp/>Google Cloud (GCP) Classic</a></li></ol><div id=accordion-package-card class=accordion><div><input type=checkbox id=accordion-checkbox-package-card> <label for=accordion-checkbox-package-card class=show><div class=package-card-top-of-page><div class=img-name-version><div><img onerror='this.classList.add("hidden"),this.parentElement.querySelector(".pkg-fallback-icon").classList.remove("hidden")' class=h-6 src=/logos/pkg/gcp.svg alt="gcp logo"> <i class="fa fa-archive pkg-fallback-icon text-gray-500 hidden" style=font-size:1.5rem></i></div><p>Google Cloud Classic v8.10.0, Nov 20 24</p></div><div class="icon icon-16-16 keyboard-arrow-down-gray"></div></div></label><label for=accordion-checkbox-package-card class=hide><div class=package-card-top-of-page><div class=img-name-version><div><img onerror='this.classList.add("hidden"),this.parentElement.querySelector(".pkg-fallback-icon").classList.remove("hidden")' class=h-6 src=/logos/pkg/gcp.svg alt="gcp logo"> <i class="fa fa-archive pkg-fallback-icon text-gray-500 hidden" style=font-size:1.5rem></i></div><p>Google Cloud Classic v8.10.0, Nov 20 24</p></div><div class="icon icon-16-16 keyboard-arrow-up-gray"></div></div></label><div class="accordion-content flex"><div class=content><div class=package-card><div class=version-info>Google Cloud Classic v8.10.0 published on Wednesday, Nov 20, 2024 by Pulumi</div><div class=package-link><i class="fab fa-github"></i> <a href=https://github.com/pulumi/pulumi-gcp target=_blank rel="noopener noreferrer"><span>pulumi/pulumi-gcp</span> <i class="fas fa-external-link-alt"></i></a></div></div></div></div></div></div><div class=special-h1><h1>Google Cloud (GCP) Classic</h1><div class=h1-gradient></div></div><div class="docs-table-of-contents docs-toc-mobile"><div class=table-of-contents><div class=package-card><div><img onerror='this.classList.add("hidden"),this.parentElement.querySelector(".pkg-fallback-icon").classList.remove("hidden")' class=h-6 src=/logos/pkg/gcp.svg alt="gcp logo"> <i class="fa fa-archive pkg-fallback-icon text-gray-500 hidden" style=font-size:1.5rem></i></div><div class=version-info>Google Cloud Classic v8.10.0 published on Wednesday, Nov 20, 2024 by Pulumi</div><div class=package-link><i class="fab fa-github"></i> <a href=https://github.com/pulumi/pulumi-gcp target=_blank rel="noopener noreferrer"><span>pulumi/pulumi-gcp</span> <i class="fas fa-external-link-alt"></i></a></div></div><div id=accordion-table-of-contents class=accordion><div><input type=checkbox id=accordion-checkbox-table-of-contents> <label for=accordion-checkbox-table-of-contents class=show><div class=heading><div class=icon-heading-wrapper><div class="icon icon-12-12 icon-on-this-page"></div><h2 class=no-anchor>On this page</h2></div><div class="icon icon-18-18 expand-more-18-18"></div></div></label><label for=accordion-checkbox-table-of-contents class=hide><div class=heading><div class=icon-heading-wrapper><div class="icon icon-12-12 icon-on-this-page"></div><h2 class=no-anchor>On this page</h2></div><div class="icon icon-18-18 expand-more-18-18"></div></div></label><div class="accordion-content flex"><div class=content><ul class=table-of-contents-list></ul></div></div></div></div></div><ul class="p-0 list-none table-of-contents-feedback"><li><a data-track=edit-page class="text-gray-600 hover:text-gray-700 text-xs" href=https://github.com/pulumi/pulumi-hugo/edit/master/themes/default/content//registry/packages/gcp target=_blank><i class="fas fa-edit mr-2" style=width:14px></i>Edit this Page</a></li><li><a data-track=request-change class="text-gray-600 hover:text-gray-700 text-xs" href="https://github.com/pulumi/registry/issues/new?body=File: [themes%2fdefault%2fcontent/%2fregistry%2fpackages%2fgcp](https%3a%2f%2fwww.pulumi.com%2fregistry%2fpackages%2fgcp%2f)" target=_blank><i class="far fa-check-square mr-2" style=width:14px></i>Request a Change</a></li></ul><pulumi-top-button></pulumi-top-button></div><section class=docs-content><p>The Google Cloud Platform (GCP) provider for Pulumi can provision many of the cloud resources available in <a href=https://cloud.google.com/>Google Cloud</a>.</p><p>The GCP provider must be configured with credentials to deploy and update resources in Google Cloud; see <a href=./installation-configuration>Installation & Configuration</a> for instructions.</p><p><strong>New to Pulumi and Google Cloud?</strong> <a href=/docs/get-started/gcp>Get started with Google Cloud using our tutorial</a></p><h2 id=example>Example</h2><div><pulumi-chooser type=language options=typescript,python,go,csharp,java,yaml mode><div><pulumi-choosable type=language values=javascript mode><div class=highlight><pre tabindex=0 class=chroma><code class=language-javascript data-lang=javascript><span class=line><span class=cl><span class=kr>const</span> <span class=nx>gcp</span> <span class=o>=</span> <span class=nx>require</span><span class=p>(</span><span class=s2>&#34;@pulumi/gcp&#34;</span><span class=p>)</span> </span></span><span class=line><span class=cl> </span></span><span class=line><span class=cl><span class=kr>const</span> <span class=nx>bucket</span> <span class=o>=</span> <span class=k>new</span> <span class=nx>gcp</span><span class=p>.</span><span class=nx>storage</span><span class=p>.</span><span class=nx>Bucket</span><span class=p>(</span><span class=s2>&#34;my-bucket&#34;</span><span class=p>);</span> </span></span></code></pre></div></pulumi-choosable></div><div><pulumi-choosable type=language values=typescript mode><div class=highlight><pre tabindex=0 class=chroma><code class=language-typescript data-lang=typescript><span class=line><span class=cl><span class=kr>import</span> <span class=o>*</span> <span class=kr>as</span> <span class=nx>gcp</span> <span class=kr>from</span> <span class=s2>&#34;@pulumi/gcp&#34;</span><span class=p>;</span> </span></span><span class=line><span class=cl> </span></span><span class=line><span class=cl><span class=kr>const</span> <span class=nx>bucket</span> <span class=o>=</span> <span class=k>new</span> <span class=nx>gcp</span><span class=p>.</span><span class=nx>storage</span><span class=p>.</span><span class=nx>Bucket</span><span class=p>(</span><span class=s2>&#34;my-bucket&#34;</span><span class=p>);</span> </span></span></code></pre></div></pulumi-choosable></div><div><pulumi-choosable type=language values=python mode><div class=highlight><pre tabindex=0 class=chroma><code class=language-python data-lang=python><span class=line><span class=cl><span class=kn>from</span> <span class=nn>pulumi_gcp</span> <span class=kn>import</span> <span class=n>storage</span> </span></span><span class=line><span class=cl> </span></span><span class=line><span class=cl><span class=n>bucket</span> <span class=o>=</span> <span class=n>storage</span><span class=o>.</span><span class=n>Bucket</span><span class=p>(</span><span class=s1>&#39;my-bucket&#39;</span><span class=p>)</span> </span></span></code></pre></div></pulumi-choosable></div><div><pulumi-choosable type=language values=go mode><div class=highlight><pre tabindex=0 class=chroma><code class=language-go data-lang=go><span class=line><span class=cl><span class=kn>import</span> <span class=p>(</span> </span></span><span class=line><span class=cl> <span class=s>&#34;github.com/pulumi/pulumi/sdk/v3/go/pulumi&#34;</span> </span></span><span class=line><span class=cl> <span class=s>&#34;github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage&#34;</span> </span></span><span class=line><span class=cl><span class=p>)</span> </span></span><span class=line><span class=cl> </span></span><span class=line><span class=cl><span class=kd>func</span> <span class=nf>main</span><span class=p>()</span> <span class=p>{</span> </span></span><span class=line><span class=cl> <span class=nx>pulumi</span><span class=p>.</span><span class=nf>Run</span><span class=p>(</span><span class=kd>func</span><span class=p>(</span><span class=nx>ctx</span> <span class=o>*</span><span class=nx>pulumi</span><span class=p>.</span><span class=nx>Context</span><span class=p>)</span> <span class=kt>error</span> <span class=p>{</span> </span></span><span class=line><span class=cl> <span class=nx>bucket</span><span class=p>,</span> <span class=nx>err</span> <span class=o>:=</span> <span class=nx>storage</span><span class=p>.</span><span class=nf>NewBucket</span><span class=p>(</span><span class=nx>ctx</span><span class=p>,</span> <span class=s>&#34;my-bucket&#34;</span><span class=p>,</span> <span class=kc>nil</span><span class=p>)</span> </span></span><span class=line><span class=cl> <span class=k>if</span> <span class=nx>err</span> <span class=o>!=</span> <span class=kc>nil</span> <span class=p>{</span> </span></span><span class=line><span class=cl> <span class=k>return</span> <span class=nx>err</span> </span></span><span class=line><span class=cl> <span class=p>}</span> </span></span><span class=line><span class=cl> </span></span><span class=line><span class=cl> <span class=k>return</span> <span class=kc>nil</span> </span></span><span class=line><span class=cl> <span class=p>})</span> </span></span><span class=line><span class=cl><span class=p>}</span> </span></span></code></pre></div></pulumi-choosable></div><div><pulumi-choosable type=language values=csharp mode><div class=highlight><pre tabindex=0 class=chroma><code class=language-csharp data-lang=csharp><span class=line><span class=cl><span class=k>using</span> <span class=nn>Pulumi</span><span class=p>;</span> </span></span><span class=line><span class=cl><span class=k>using</span> <span class=nn>Gcp</span> <span class=p>=</span> <span class=n>Pulumi</span><span class=p>.</span><span class=n>Gcp</span><span class=p>;</span> </span></span><span class=line><span class=cl> </span></span><span class=line><span class=cl><span class=k>await</span> <span class=n>Deployment</span><span class=p>.</span><span class=n>RunAsync</span><span class=p>(()</span> <span class=p>=&gt;</span> </span></span><span class=line><span class=cl><span class=p>{</span> </span></span><span class=line><span class=cl> <span class=kt>var</span> <span class=n>bucket</span> <span class=p>=</span> <span class=k>new</span> <span class=n>Gcp</span><span class=p>.</span><span class=n>Storage</span><span class=p>.</span><span class=n>Bucket</span><span class=p>(</span><span class=s>&#34;my-bucket&#34;</span><span class=p>);</span> </span></span><span class=line><span class=cl><span class=p>});</span> </span></span></code></pre></div></pulumi-choosable></div><div><pulumi-choosable type=language values=java mode><div class=highlight><pre tabindex=0 class=chroma><code class=language-java data-lang=java><span class=line><span class=cl><span class=kn>import</span><span class=w> </span><span class=nn>com.pulumi.Context</span><span class=p>;</span><span class=w> </span></span></span><span class=line><span class=cl><span class=w></span><span class=kn>import</span><span class=w> </span><span class=nn>com.pulumi.Pulumi</span><span class=p>;</span><span class=w> </span></span></span><span class=line><span class=cl><span class=w></span><span class=kn>import</span><span class=w> </span><span class=nn>com.pulumi.gcp.storage.Bucket</span><span class=p>;</span><span class=w> </span></span></span><span class=line><span class=cl><span class=w> </span></span></span><span class=line><span class=cl><span class=w></span><span class=kd>public</span><span class=w> </span><span class=kd>class</span> <span class=nc>App</span><span class=w> </span><span class=p>{</span><span class=w> </span></span></span><span class=line><span class=cl><span class=w> </span><span class=kd>public</span><span class=w> </span><span class=kd>static</span><span class=w> </span><span class=kt>void</span><span class=w> </span><span class=nf>main</span><span class=p>(</span><span class=n>String</span><span class=o>[]</span><span class=w> </span><span class=n>args</span><span class=p>)</span><span class=w> </span><span class=p>{</span><span class=w> </span></span></span><span class=line><span class=cl><span class=w> </span><span class=n>Pulumi</span><span class=p>.</span><span class=na>run</span><span class=p>(</span><span class=n>App</span><span class=p>::</span><span class=n>stack</span><span class=p>);</span><span class=w> </span></span></span><span class=line><span class=cl><span class=w> </span><span class=p>}</span><span class=w> </span></span></span><span class=line><span class=cl><span class=w> </span></span></span><span class=line><span class=cl><span class=w> </span><span class=kd>private</span><span class=w> </span><span class=kd>static</span><span class=w> </span><span class=kt>void</span><span class=w> </span><span class=nf>stack</span><span class=p>(</span><span class=n>Context</span><span class=w> </span><span class=n>ctx</span><span class=p>)</span><span class=w> </span><span class=p>{</span><span class=w> </span></span></span><span class=line><span class=cl><span class=w> </span><span class=kd>final</span><span class=w> </span><span class=kd>var</span><span class=w> </span><span class=n>bucket</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=k>new</span><span class=w> </span><span class=n>Bucket</span><span class=p>(</span><span class=s>&#34;my-bucket&#34;</span><span class=p>);</span><span class=w> </span></span></span><span class=line><span class=cl><span class=w> </span><span class=n>ctx</span><span class=p>.</span><span class=na>export</span><span class=p>(</span><span class=s>&#34;bucketName&#34;</span><span class=p>,</span><span class=w> </span><span class=n>bucket</span><span class=p>.</span><span class=na>name</span><span class=p>());</span><span class=w> </span></span></span><span class=line><span class=cl><span class=w> </span><span class=p>}</span><span class=w> </span></span></span><span class=line><span class=cl><span class=w></span><span class=p>}</span><span class=w> </span></span></span></code></pre></div></pulumi-choosable></div><div><pulumi-choosable type=language values=yaml mode><div class=highlight><pre tabindex=0 class=chroma><code class=language-yaml data-lang=yaml><span class=line><span class=cl><span class=nt>resources</span><span class=p>:</span><span class=w> </span></span></span><span class=line><span class=cl><span class=w> </span><span class=nt>my-bucket</span><span class=p>:</span><span class=w> </span></span></span><span class=line><span class=cl><span class=w> </span><span class=nt>type</span><span class=p>:</span><span class=w> </span><span class=l>gcp:storage:Bucket</span><span class=w> </span></span></span></code></pre></div></pulumi-choosable></div></pulumi-chooser></div><p>Visit the <a href=./how-to-guides>How-to Guides</a> to find step-by-step guides for specific scenarios like creating a serverless application using Google Cloud Functions or setting up a Google Kubernetes Engine (GKE) cluster.</p></section></div><div class="docs-table-of-contents docs-toc-desktop"><div class=table-of-contents><div class=package-card><div><img onerror='this.classList.add("hidden"),this.parentElement.querySelector(".pkg-fallback-icon").classList.remove("hidden")' class=h-6 src=/logos/pkg/gcp.svg alt="gcp logo"> <i class="fa fa-archive pkg-fallback-icon text-gray-500 hidden" style=font-size:1.5rem></i></div><div class=version-info>Google Cloud Classic v8.10.0 published on Wednesday, Nov 20, 2024 by Pulumi</div><div class=package-link><i class="fab fa-github"></i> <a href=https://github.com/pulumi/pulumi-gcp target=_blank rel="noopener noreferrer"><span>pulumi/pulumi-gcp</span> <i class="fas fa-external-link-alt"></i></a></div></div><div id=accordion-table-of-contents class=accordion><div><input type=checkbox id=accordion-checkbox-table-of-contents> <label for=accordion-checkbox-table-of-contents class=show><div class=heading><div class=icon-heading-wrapper><div class="icon icon-12-12 icon-on-this-page"></div><h2 class=no-anchor>On this page</h2></div><div class="icon icon-18-18 expand-more-18-18"></div></div></label><label for=accordion-checkbox-table-of-contents class=hide><div class=heading><div class=icon-heading-wrapper><div class="icon icon-12-12 icon-on-this-page"></div><h2 class=no-anchor>On this page</h2></div><div class="icon icon-18-18 expand-more-18-18"></div></div></label><div class="accordion-content flex"><div class=content><ul class=table-of-contents-list></ul></div></div></div></div></div><ul class="p-0 list-none table-of-contents-feedback"><li><a data-track=edit-page class="text-gray-600 hover:text-gray-700 text-xs" href=https://github.com/pulumi/pulumi-hugo/edit/master/themes/default/content//registry/packages/gcp target=_blank><i class="fas fa-edit mr-2" style=width:14px></i>Edit this Page</a></li><li><a data-track=request-change class="text-gray-600 hover:text-gray-700 text-xs" href="https://github.com/pulumi/registry/issues/new?body=File: [themes%2fdefault%2fcontent/%2fregistry%2fpackages%2fgcp](https%3a%2f%2fwww.pulumi.com%2fregistry%2fpackages%2fgcp%2f)" target=_blank><i class="far fa-check-square mr-2" style=width:14px></i>Request a Change</a></li></ul><pulumi-top-button></pulumi-top-button></div></div></div><copilot-sidebar copilot-src="/pulumi-ai/copilot/sidebar?hostApp=docs&apiHost=https%3A%2F%2Fapp.pulumi.com%2Fai"></copilot-sidebar></main><footer class="flex docs-footer"><div class=flex><div class="icon icon-24-24 icon-pulumi-logo"></div><div class=heading><p class=open-source>Pulumi is open source</p><p class=copyright>&copy; Pulumi 2024</p></div></div><ul class=flex><li><a href=/terms-and-conditions/>Terms & conditions</a></li><li><a href=/privacy/>Privacy policy</a></li><li><a href=/acceptable-use/>Acceptable use policy</a></li><li><a href=/trademark/>Trademark usage</a></li><li><a href=/professional-services-agreement/>Professional services agreement</a></li></ul></footer><div id=segment-consent-manager></div></body></html>

Pages: 1 2 3 4 5 6 7 8 9 10