<blockquote>
<p>I have connected a Kubernetes cluster in Gitlab as a project cluster
<a href="https://gitlab.com/steinKo/gitlabcicd/-/clusters/142291" rel="nofollow noreferrer">https://gitlab.com/steinKo/gitlabcicd/-/clusters/142291</a>
I want to acsess this cluster in Pulumi
Folow thw dcumentaion can I use Look up an Existing ProjectCluster Resource
Could I use the API call</p>
</blockquote>
<pre><code>public static get(name: string, id: Input&lt;ID&gt;, state?: ProjectClusterState, opts?: CustomResourceOptions): ProjectCluster
</code></pre>
<blockquote>
<p>I wrote</p>
</blockquote>
<pre><code>import * as gitlab from &quot;@pulumi/gitlab&quot;;

const cluster = gitlab.get(&quot;gitlabcicd&quot;, ???)
</code></pre>
<blockquote>
<p>Then I get an errormessage : Property get dose not exit
How do I use get API?
Where do I find the id?</p>
</blockquote>

stein korsveien
<p>You can get access to the cluster using the following code:</p>
<pre class="lang-js prettyprint-override"><code>import * as gitlab from &quot;@pulumi/gitlab&quot;;

const projectCluster = gitlab.ProjectCluster.get(&quot;mycluster&quot;, &quot;clusterid&quot;);
</code></pre>
<p>where <code>mycluster</code> is the name you're giving it in your Pulumi program and <code>clusterid</code> is the ID in GitLab of the cluster.</p>
<p>You can get the ID of the cluster using the GitLab API: <a href="https://docs.gitlab.com/ee/api/project_clusters.html" rel="nofollow noreferrer">https://docs.gitlab.com/ee/api/project_clusters.html</a></p>
<p>Please note that this will not allow you to make changes to the cluster (as you're not importing it into the Pulumi program), but it will give you information about the cluster itself.</p>
<p>If you wanted to start managing the cluster in your Pulumi program, then you can import it using the CLI by running this command: <code>pulumi import gitlab:index/projectCluster:ProjectCluster bar projectid:clusterid</code> which will give you the correct code to copy and paste into your Pulumi program at which point you can start managing it.</p>
