Skip to content

Instantly share code, notes, and snippets.

@jphalip
Created January 25, 2018 19:28
Show Gist options
  • Save jphalip/351366e767697069c808bb885160cc78 to your computer and use it in GitHub Desktop.
Save jphalip/351366e767697069c808bb885160cc78 to your computer and use it in GitHub Desktop.
Terraform error during Dataproc cluster creation
$ terraform apply
google_compute_network.cloud: Refreshing state... (ID: cloud)
google_compute_address.cloud: Refreshing state... (ID: projects/XXXXXXXX/regions/us-central1/addresses/cloud-static-ip)
google_compute_subnetwork.cloud_subnet: Refreshing state... (ID: us-central1/cloud-subnet)
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
+ google_dataproc_cluster.copycluster
id: <computed>
cluster_config.#: "1"
cluster_config.0.bucket: <computed>
cluster_config.0.delete_autogen_bucket: "false"
cluster_config.0.gce_cluster_config.#: "1"
cluster_config.0.gce_cluster_config.0.internal_ip_only: "true"
cluster_config.0.gce_cluster_config.0.service_account_scopes.#: <computed>
cluster_config.0.gce_cluster_config.0.subnetwork: "https://www.googleapis.com/compute/v1/projects/XXXXXXXX/regions/us-central1/subnetworks/cloud-subnet"
cluster_config.0.gce_cluster_config.0.zone: <computed>
cluster_config.0.master_config.#: <computed>
cluster_config.0.preemptible_worker_config.#: <computed>
cluster_config.0.software_config.#: <computed>
cluster_config.0.worker_config.#: <computed>
labels.%: <computed>
name: "copycluster"
project: <computed>
region: "us-central1"
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
google_dataproc_cluster.copycluster: Creating...
cluster_config.#: "" => "1"
cluster_config.0.bucket: "" => "<computed>"
cluster_config.0.delete_autogen_bucket: "" => "false"
cluster_config.0.gce_cluster_config.#: "" => "1"
cluster_config.0.gce_cluster_config.0.internal_ip_only: "" => "true"
cluster_config.0.gce_cluster_config.0.service_account_scopes.#: "" => "<computed>"
cluster_config.0.gce_cluster_config.0.subnetwork: "" => "https://www.googleapis.com/compute/v1/projects/XXXXXXXX/regions/us-central1/subnetworks/cloud-subnet"
cluster_config.0.gce_cluster_config.0.zone: "" => "<computed>"
cluster_config.0.master_config.#: "" => "<computed>"
cluster_config.0.preemptible_worker_config.#: "" => "<computed>"
cluster_config.0.software_config.#: "" => "<computed>"
cluster_config.0.worker_config.#: "" => "<computed>"
labels.%: "" => "<computed>"
name: "" => "copycluster"
project: "" => "<computed>"
region: "" => "us-central1"
Error: Error applying plan:
1 error(s) occurred:
* google_dataproc_cluster.copycluster: 1 error(s) occurred:
* google_dataproc_cluster.copycluster: Error creating Dataproc cluster: googleapi: Error 400: Subnetwork 'cloud-subnet' does not support Private Google Access which is required for Dataproc clusters when 'internal_ip_only' is set to 'true'. Enable Private Google Access on subnetwork 'cloud-subnet' or set 'internal_ip_only' to 'false'., badRequest
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment