@@ -72,6 +72,17 @@ resource "google_dataproc_cluster" "mycluster" {
72
72
gce_cluster_config {
73
73
#network = "${google_compute_network.dataproc_network.name}"
74
74
tags = ["foo", "bar"]
75
+ service_account_scopes = [
76
+ # User supplied scopes
77
+ "https://www.googleapis.com/auth/monitoring",
78
+
79
+ # The following scopes necessary for the cluster to function properly are
80
+ # always added, even if not explicitly specified:
81
+ # useraccounts-ro: https://www.googleapis.com/auth/cloud.useraccounts.readonly
82
+ # storage-rw: https://www.googleapis.com/auth/devstorage.read_write
83
+ # logging-write: https://www.googleapis.com/auth/logging.write
84
+ "useraccounts-ro","storage-rw","logging-write"
85
+ ]
75
86
}
76
87
77
88
# You can define multiple initialization_action blocks
@@ -209,10 +220,11 @@ The `cluster_config.gce_cluster_config` block supports:
209
220
* ` service_account ` - (Optional) The service account to be used by the Node VMs.
210
221
If not specified, the "default" service account is used.
211
222
212
- * ` service_account_scopes ` - (Optional, Computed) The set of Google API scopes to be made available
213
- on all of the node VMs under the `service_account` specified. These can be
214
- either FQDNs, or scope aliases. The following scopes are necessary to ensure
215
- the correct functioning of the cluster:
223
+ * ` service_account_scopes ` - (Optional, Computed) The set of Google API scopes
224
+ to be made available on all of the node VMs under the ` service_account `
225
+ specified. These can be either FQDNs, or scope aliases. The following scopes
226
+ must be set if any other scopes are set. They're necessary to ensure the
227
+ correct functioning ofthe cluster, and are set automatically by the API:
216
228
217
229
* ` useraccounts-ro ` (` https://www.googleapis.com/auth/cloud.useraccounts.readonly ` )
218
230
* ` storage-rw ` (` https://www.googleapis.com/auth/devstorage.read_write ` )
0 commit comments