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