<p>I am trying to set a non-default Service Account to the node pool that I am creating.</p>
<p>However, every time with the following code, the node pool shows as using the <code>default</code> service account.</p>
<pre><code>resource &quot;google_container_node_pool&quot; &quot;node_pool&quot; {
...
service_account = &quot;myserviceaccount@&lt;id&gt;.iam.gserviceaccount.com&quot;
    oauth_scopes = [
      &quot;https://www.googleapis.com/auth/cloud-platform&quot;
    ]
}
</code></pre>
<p>When I check on the GKE console it shows the Service Account as <code>default</code> rather than my specified account.</p>
<p>I have confirmed in the console, that a node group can be manually created with <code>myserviceaccount</code> set as the Service Account for the node group.  It is only with Terraform this is not working.</p>
<p>How do I set my own service account when creating the node pool?</p>
<p>Any help on this would be greatly appreciated!</p>

fuzzi
<p>It's unclear from your question whether your <code>service_account</code> is, as required, part of the <code>node_config</code> which is part of resource.</p>
<p>See <a href="https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#example-usage---with-a-separately-managed-node-pool-recommended" rel="nofollow noreferrer">example</a></p>
