Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

canIpForward field is missing from terraform created template #5285

Closed
jsoref opened this issue Jan 1, 2020 · 11 comments
Closed

canIpForward field is missing from terraform created template #5285

jsoref opened this issue Jan 1, 2020 · 11 comments
Assignees
Labels

Comments

@jsoref
Copy link
Contributor

jsoref commented Jan 1, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • If an issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to "hashibot", a community member has claimed the issue already.

Terraform Version

Terraform v0.12.16
+ provider.google v3.3.0

Affected Resource(s)

  • google_compute_instance_template

Terraform Configuration Files

provider google {
  version = "~> 3.0"
}

resource "google_compute_instance_template" "node" {
  name         = "node"
  machine_type = "n1-standard-1"
  can_ip_forward = false

  disk {
    source_image = "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9"
    disk_size_gb = 10
    disk_type    = "pd-ssd"
    boot         = true
    mode         = "READ_WRITE"
    type         = "PERSISTENT"
    interface    = "SCSI"
  }

  network_interface {
    network = "default"
  }
}

Debug Output

Panic Output

Expected Behavior

A similarly manually created template includes:

properties:
  canIpForward: false

Actual Behavior

plan output:

Terraform will perform the following actions:

  # google_compute_instance_template.node will be created
  + resource "google_compute_instance_template" "node" {
      + can_ip_forward       = false
      + id                   = (known after apply)
      + machine_type         = "n1-standard-1"
      + metadata_fingerprint = (known after apply)
      + name                 = "node"
      + name_prefix          = (known after apply)
      + project              = (known after apply)
      + region               = (known after apply)
      + self_link            = (known after apply)
      + tags_fingerprint     = (known after apply)

      + disk {
          + auto_delete  = true
          + boot         = true
          + device_name  = (known after apply)
          + disk_size_gb = 10
          + disk_type    = "pd-ssd"
          + interface    = "SCSI"
          + mode         = "READ_WRITE"
          + source_image = "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9"
          + type         = "PERSISTENT"
        }

      + network_interface {
          + network            = "default"
          + subnetwork         = (known after apply)
          + subnetwork_project = (known after apply)
        }

      + scheduling {
          + automatic_restart   = (known after apply)
          + on_host_maintenance = (known after apply)
          + preemptible         = (known after apply)
(hg-27) jsoref-lightning:terraform jsoref$

              + key      = (known after apply)
              + operator = (known after apply)
              + values   = (known after apply)
            }
        }
    }

describe output:

creationTimestamp: '2019-12-31T17:42:51.861-08:00'
description: ''
id: '881768886950053876'
kind: compute#instanceTemplate
name: node
properties:
  disks:
  - autoDelete: true
    boot: true
    deviceName: persistent-disk-0
    index: 0
    initializeParams:
      diskSizeGb: '10'
      diskType: pd-ssd
      sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9
    interface: SCSI
    kind: compute#attachedDisk
    mode: READ_WRITE
    type: PERSISTENT
  machineType: n1-standard-1
  metadata:
    fingerprint: JTqYaJW_BVs=
    kind: compute#metadata
  networkInterfaces:
  - kind: compute#networkInterface
    network: ...
  scheduling:
    automaticRestart: true
    onHostMaintenance: MIGRATE
    preemptible: false
selfLink: ...

Steps to Reproduce

  1. terraform apply
  2. gcloud compute instance-templates describe node

Important Factoids

References

@ghost ghost added the bug label Jan 1, 2020
@edwardmedia edwardmedia self-assigned this Jan 2, 2020
@edwardmedia
Copy link
Contributor

@jsoref I see IP forwarding is set to on/off for the template from the GCP Console which correctly reflects the can_ip_forward value when it is set to true/false accordingly. I think this is a correct behavior from terraform's perspective. I do see properties/canIpForward showing up in the gcloud result when it is set to true but not when it is set to false. I agree it is not consistent for this property in the gcloud command. If this is what your issue refer to, I would suggest you file an issue with gcloud. I don't see any issue with the terraform provider, and thus close this issue. If you think this is still an issue, please explain more detail. Thanks

@jsoref
Copy link
Contributor Author

jsoref commented Jan 2, 2020

@edwardmedia: I don't see why this would be a bug in gcloud. I have templates from gcloud where it properly includes canIpForward -- to me, it seems like the terraform provider is doing something wrong.

Beyond that, I'm not a gcloud expert, and it seems more fruitful for a terraform provider expert to talk to a gcloud expert and hash out the inconsistency rather than asking a bug reporter to do so.

I fully expect a gcloud person to say:

Well, I can create templates with canIpForward: false and canIpForward: true, so obviously the other guy is doing something wrong -> Not our fault -> Closed.

@jsoref
Copy link
Contributor Author

jsoref commented Jan 2, 2020

@danawillow: Could you please bring this to the gcloud folks?

@danawillow
Copy link
Contributor

@jsoref, if you run terraform show does it have a value set for can_ip_forward? I also noticed you didn't provide debug logs in your original bug report. If you have those, we can check whether the Terraform provider is sending the correct values along.

We can certainly talk to the gcloud team, but I'd like to know your use case first so the team can accurately assess the priority of the request.

@danawillow danawillow reopened this Jan 2, 2020
@jsoref
Copy link
Contributor Author

jsoref commented Jan 3, 2020

Yes, terraform show includes can_ip_forward.

2020/01/02 19:13:14 [INFO] backend/local: apply calling Apply
2020/01/02 19:13:14 [INFO] terraform: building graph: GraphTypeApply
2020/01/02 19:13:14 [DEBUG] ProviderTransformer: "google_compute_instance_template.node... (prepare state)" (*terraform.NodeApplyableResource) needs provider.google
2020/01/02 19:13:14 [DEBUG] ReferenceTransformer: "google_compute_instance_template.node" references: []
2020/01/02 19:13:14 [DEBUG] ReferenceTransformer: "provider.google" references: []
2020/01/02 19:13:14 [DEBUG] ReferenceTransformer: "google_compute_instance_template.node (prepare state)" references: []
------
  google_compute_instance_template.node - *terraform.NodeApplyableResourceInstance
  google_compute_instance_template.node (prepare state) - *terraform.NodeApplyableResource
  provider.google - *terraform.NodeApplyableProvider
root - terraform.graphNodeRoot
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
  provider.google (close) - *terraform.graphNodeCloseProvider
------
ApplyableProvider
provider.google (close) - *terraform.graphNodeCloseProvider
  google_compute_instance_template.node - *terraform.NodeApplyableResourceInstance
root - terraform.graphNodeRoot
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
  provider.google (close) - *terraform.graphNodeCloseProvider
------
2020/01/02 19:13:14 [DEBUG] Starting graph walk: walkApply
2020-01-02T19:13:14.239-0500 [INFO]  plugin: configuring client automatic mTLS
2020-01-02T19:13:14.269-0500 [DEBUG] plugin: starting plugin: path=$TEST/terraform/.terraform/plugins/darwin_amd64/terraform-provider-google_v3.3.0_x5 args=[$TEST/terraform/.terraform/plugins/darwin_amd64/terraform-provider-google_v3.3.0_x5]
2020-01-02T19:13:14.275-0500 [DEBUG] plugin: plugin started: path=$TEST/terraform/.terraform/plugins/darwin_amd64/terraform-provider-google_v3.3.0_x5 pid=53779
2020-01-02T19:13:14.275-0500 [DEBUG] plugin: waiting for RPC address: path=$TEST/terraform/.terraform/plugins/darwin_amd64/terraform-provider-google_v3.3.0_x5
2020-01-02T19:13:14.292-0500 [INFO]  plugin.terraform-provider-google_v3.3.0_x5: configuring server automatic mTLS: timestamp=2020-01-02T19:13:14.291-0500
2020-01-02T19:13:14.320-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: plugin address: address=/var/folders/r3/n29fz25x72x191fdv6mhhr3m0000gp/T/plugin336005310 network=unix timestamp=2020-01-02T19:13:14.319-0500
2020-01-02T19:13:14.320-0500 [DEBUG] plugin: using plugin: version=5
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Authenticating using DefaultClient...
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO]   -- Scopes: [https://www.googleapis.com/auth/compute https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/ndev.clouddns.readwrite https://www.googleapis.com/auth/devstorage.full_control https://www.googleapis.com/auth/userinfo.email]
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating GCE client for path https://www.googleapis.com/compute/v1/projects/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating GCE Beta client for path https://www.googleapis.com/compute/beta/projects/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating GKE client for path https://container.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating GKE Beta client for path https://container.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud DNS client for path https://www.googleapis.com/dns/v1/projects/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud DNS Beta client for path https://www.googleapis.com/dns/v1beta2/projects/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud KMS client for path https://cloudkms.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Stackdriver Logging client for path https://logging.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Storage client for path https://www.googleapis.com/storage/v1/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google SqlAdmin client for path https://www.googleapis.com/sql/v1beta4/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Pubsub client for path https://pubsub.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Dataflow client for path https://dataflow.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud ResourceManager client for path https://cloudresourcemanager.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud ResourceManager V client for path https://cloudresourcemanager.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud Runtimeconfig client for path https://runtimeconfig.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud IAM client for path https://iam.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud IAMCredentials client for path https://iamcredentials.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud Service Management client for path https://servicemanagement.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud Service Usage client for path https://serviceusage.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud Billing client for path https://cloudbilling.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud Build client for path https://cloudbuild.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud BigQuery client for path https://www.googleapis.com/bigquery/v2/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud CloudFunctions Client for path https://cloudfunctions.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud BigtableAdmin for path https://bigtableadmin.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud Source Repo client for path https://sourcerepo.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud Spanner client for path https://spanner.googleapis.com/
2020-01-02T19:13:14.403-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud Dataproc client for path https://dataproc.googleapis.com/
2020-01-02T19:13:14.404-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud Dataproc Beta client for path https://dataproc.googleapis.com/
2020-01-02T19:13:14.404-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Filestore client for path https://file.googleapis.com/
2020-01-02T19:13:14.404-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud IoT Core client for path https://cloudiot.googleapis.com/
2020-01-02T19:13:14.404-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating App Engine client for path https://appengine.googleapis.com/
2020-01-02T19:13:14.404-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Cloud Composer client for path https://composer.googleapis.com/
2020-01-02T19:13:14.404-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Service Networking client for path https://servicenetworking.googleapis.com/
2020-01-02T19:13:14.404-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [INFO] Instantiating Google Cloud Storage Transfer client for path https://storagetransfer.googleapis.com/
2020/01/02 19:13:14 [WARN] Provider "google" produced an invalid plan for google_compute_instance_template.node, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .disk[0].auto_delete: planned value cty.True does not match config value cty.NullVal(cty.Bool)
      - .scheduling: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
2020/01/02 19:13:14 [TRACE] <root>: eval: *terraform.EvalCheckPlannedChange
google_compute_instance_template.node: Creating...
2020/01/02 19:13:14 [DEBUG] google_compute_instance_template.node: applying the planned Create change
2020/01/02 19:13:14 [TRACE] GRPCProvider: ApplyResourceChange
2020-01-02T19:13:14.415-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [DEBUG] setting computed for "scheduling" from ComputedKeys
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:14 [DEBUG] Google API Request Details:
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: ---[ REQUEST ]---------------------------------------
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: POST /compute/beta/projects/$PROJECT/global/instanceTemplates?alt=json&prettyPrint=false HTTP/1.1
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Host: www.googleapis.com
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: User-Agent: google-api-go-client/0.5 HashiCorp Terraform/0.12.16 (+https://www.terraform.io) Terraform Plugin SDK/1.4.0 terraform-provider-google/3.3.0
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Content-Length: 488
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Content-Type: application/json
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Goog-Api-Client: gl-go/1.11.0 gdcl/20191007
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Accept-Encoding: gzip
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: {
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "name": "node",
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "properties": {
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   "disks": [
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:    {
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "autoDelete": true,
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "boot": true,
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "initializeParams": {
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:      "diskSizeGb": "10",
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:      "diskType": "pd-ssd",
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:      "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9"
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     },
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "interface": "SCSI",
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "mode": "READ_WRITE",
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "type": "PERSISTENT"
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:    }
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   ],
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   "machineType": "n1-standard-1",
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   "metadata": {},
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   "networkInterfaces": [
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:    {
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "network": "projects/$PROJECT/global/networks/default"
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:    }
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   ],
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   "scheduling": {
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:    "onHostMaintenance": "MIGRATE"
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   },
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   "tags": {}
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  }
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: }
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:
2020-01-02T19:13:14.416-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: -----------------------------------------------------
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:16 [DEBUG] Google API Response Details:
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: ---[ RESPONSE ]--------------------------------------
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: HTTP/2.0 200 OK
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Alt-Svc: quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Cache-Control: no-cache, no-store, max-age=0, must-revalidate
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Content-Type: application/json; charset=UTF-8
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Date: Fri, 03 Jan 2020 00:13:16 GMT
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Expires: Mon, 01 Jan 1990 00:00:00 GMT
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Pragma: no-cache
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Server: GSE
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Vary: Origin
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Vary: X-Origin
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Content-Type-Options: nosniff
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Frame-Options: SAMEORIGIN
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Xss-Protection: 1; mode=block
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: {
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "kind": "compute#operation",
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "id": "54554663867070964",
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "name": "operation-1578010394739-59b312d07c1c6-25b8f5d8-50fb4485",
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "operationType": "compute.instanceTemplates.insert",
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "targetLink": "https://www.googleapis.com/compute/beta/projects/$PROJECT/global/instanceTemplates/node",
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "targetId": "8465852787113277940",
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "status": "RUNNING",
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "user": "$ACCOUNT@$PROJECT.iam.gserviceaccount.com",
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "progress": 0,
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "insertTime": "2020-01-02T16:13:16.090-08:00",
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "startTime": "2020-01-02T16:13:16.106-08:00",
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "selfLink": "https://www.googleapis.com/compute/beta/projects/$PROJECT/global/operations/operation-1578010394739-59b312d07c1c6-25b8f5d8-50fb4485"
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: }
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: -----------------------------------------------------
2020-01-02T19:13:16.260-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:16 [DEBUG] Waiting for state to become: [DONE]
2020-01-02T19:13:16.261-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:16 [DEBUG] Google API Request Details:
2020-01-02T19:13:16.261-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: ---[ REQUEST ]---------------------------------------
2020-01-02T19:13:16.261-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: GET /compute/v1/projects/$PROJECT/global/operations/operation-1578010394739-59b312d07c1c6-25b8f5d8-50fb4485?alt=json&prettyPrint=false HTTP/1.1
2020-01-02T19:13:16.261-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Host: www.googleapis.com
2020-01-02T19:13:16.261-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: User-Agent: google-api-go-client/0.5 HashiCorp Terraform/0.12.16 (+https://www.terraform.io) Terraform Plugin SDK/1.4.0 terraform-provider-google/3.3.0
2020-01-02T19:13:16.261-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Goog-Api-Client: gl-go/1.11.0 gdcl/20191007
2020-01-02T19:13:16.261-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Accept-Encoding: gzip
2020-01-02T19:13:16.261-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:
2020-01-02T19:13:16.261-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:
2020-01-02T19:13:16.261-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: -----------------------------------------------------
2020-01-02T19:13:16.524-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:16 [DEBUG] Google API Response Details:
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: ---[ RESPONSE ]--------------------------------------
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: HTTP/2.0 200 OK
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Alt-Svc: quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Cache-Control: private
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Content-Type: application/json; charset=UTF-8
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Date: Fri, 03 Jan 2020 00:13:16 GMT
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Etag: t0vTLPUrz9fmf4eHCY_1dKFxcOs=/WiPykp_wAsHhBNIInax9fE4Feco=
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Server: ESF
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Vary: Origin
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Vary: X-Origin
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Vary: Referer
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Content-Type-Options: nosniff
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Frame-Options: SAMEORIGIN
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Xss-Protection: 0
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: {
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "id": "54554663867070964",
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "name": "operation-1578010394739-59b312d07c1c6-25b8f5d8-50fb4485",
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "operationType": "compute.instanceTemplates.insert",
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "targetLink": "https://www.googleapis.com/compute/v1/projects/$PROJECT/global/instanceTemplates/node",
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "targetId": "8465852787113277940",
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "status": "RUNNING",
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "user": "$ACCOUNT@$PROJECT.iam.gserviceaccount.com",
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "progress": 0,
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "insertTime": "2020-01-02T16:13:16.090-08:00",
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "startTime": "2020-01-02T16:13:16.106-08:00",
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "selfLink": "https://www.googleapis.com/compute/v1/projects/$PROJECT/global/operations/operation-1578010394739-59b312d07c1c6-25b8f5d8-50fb4485",
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "kind": "compute#operation"
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: }
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: -----------------------------------------------------
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:16 [DEBUG] Got RUNNING while polling for operation operation-1578010394739-59b312d07c1c6-25b8f5d8-50fb4485's status
2020-01-02T19:13:16.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:16 [TRACE] Waiting 2s before next try
2020-01-02T19:13:18.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:18 [DEBUG] Google API Request Details:
2020-01-02T19:13:18.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: ---[ REQUEST ]---------------------------------------
2020-01-02T19:13:18.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: GET /compute/v1/projects/$PROJECT/global/operations/operation-1578010394739-59b312d07c1c6-25b8f5d8-50fb4485?alt=json&prettyPrint=false HTTP/1.1
2020-01-02T19:13:18.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Host: www.googleapis.com
2020-01-02T19:13:18.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: User-Agent: google-api-go-client/0.5 HashiCorp Terraform/0.12.16 (+https://www.terraform.io) Terraform Plugin SDK/1.4.0 terraform-provider-google/3.3.0
2020-01-02T19:13:18.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Goog-Api-Client: gl-go/1.11.0 gdcl/20191007
2020-01-02T19:13:18.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Accept-Encoding: gzip
2020-01-02T19:13:18.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:
2020-01-02T19:13:18.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:
2020-01-02T19:13:18.525-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: -----------------------------------------------------
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:18 [DEBUG] Google API Response Details:
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: ---[ RESPONSE ]--------------------------------------
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: HTTP/2.0 200 OK
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Alt-Svc: quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Cache-Control: private
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Content-Type: application/json; charset=UTF-8
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Date: Fri, 03 Jan 2020 00:13:18 GMT
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Etag: ZeNjFy4yA7JLivW0qeDJtqPWKXI=/mUqtSEaabRyOO0iZOyniKfiLUZs=
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Server: ESF
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Vary: Origin
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Vary: X-Origin
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Vary: Referer
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Content-Type-Options: nosniff
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Frame-Options: SAMEORIGIN
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Xss-Protection: 0
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: {
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "id": "54554663867070964",
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "name": "operation-1578010394739-59b312d07c1c6-25b8f5d8-50fb4485",
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "operationType": "compute.instanceTemplates.insert",
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "targetLink": "https://www.googleapis.com/compute/v1/projects/$PROJECT/global/instanceTemplates/node",
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "targetId": "8465852787113277940",
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "status": "DONE",
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "user": "$ACCOUNT@$PROJECT.iam.gserviceaccount.com",
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "progress": 100,
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "insertTime": "2020-01-02T16:13:16.090-08:00",
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "startTime": "2020-01-02T16:13:16.106-08:00",
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "endTime": "2020-01-02T16:13:16.698-08:00",
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "selfLink": "https://www.googleapis.com/compute/v1/projects/$PROJECT/global/operations/operation-1578010394739-59b312d07c1c6-25b8f5d8-50fb4485",
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "kind": "compute#operation"
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: }
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: -----------------------------------------------------
2020-01-02T19:13:18.687-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:18 [DEBUG] Got DONE while polling for operation operation-1578010394739-59b312d07c1c6-25b8f5d8-50fb4485's status
2020-01-02T19:13:18.688-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:18 [DEBUG] Google API Request Details:
2020-01-02T19:13:18.688-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: ---[ REQUEST ]---------------------------------------
2020-01-02T19:13:18.688-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: GET /compute/beta/projects/$PROJECT/global/instanceTemplates/node?alt=json&prettyPrint=false HTTP/1.1
2020-01-02T19:13:18.688-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Host: www.googleapis.com
2020-01-02T19:13:18.688-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: User-Agent: google-api-go-client/0.5 HashiCorp Terraform/0.12.16 (+https://www.terraform.io) Terraform Plugin SDK/1.4.0 terraform-provider-google/3.3.0
2020-01-02T19:13:18.688-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Goog-Api-Client: gl-go/1.11.0 gdcl/20191007
2020-01-02T19:13:18.688-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Accept-Encoding: gzip
2020-01-02T19:13:18.688-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:
2020-01-02T19:13:18.688-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:
2020-01-02T19:13:18.688-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: -----------------------------------------------------
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: 2020/01/02 19:13:18 [DEBUG] Google API Response Details:
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: ---[ RESPONSE ]--------------------------------------
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: HTTP/2.0 200 OK
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Alt-Svc: quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Cache-Control: private
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Content-Type: application/json; charset=UTF-8
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Date: Fri, 03 Jan 2020 00:13:18 GMT
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Etag: acL6-7bAqxGCFVRBEhjVQARJb_o=/4Uch_tOjnjWIfHd5J3rDZNuCpFQ=
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Server: ESF
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Vary: Origin
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Vary: X-Origin
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: Vary: Referer
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Content-Type-Options: nosniff
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Frame-Options: SAMEORIGIN
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: X-Xss-Protection: 0
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: {
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "id": "8465852787113277940",
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "creationTimestamp": "2020-01-02T16:13:15.907-08:00",
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "name": "node",
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "description": "",
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "properties": {
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   "tags": {},
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   "machineType": "n1-standard-1",
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   "networkInterfaces": [
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:    {
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "network": "https://www.googleapis.com/compute/beta/projects/$PROJECT/global/networks/default",
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "kind": "compute#networkInterface"
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:    }
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   ],
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   "disks": [
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:    {
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "type": "PERSISTENT",
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "mode": "READ_WRITE",
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "deviceName": "persistent-disk-0",
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "index": 0,
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "boot": true,
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "initializeParams": {
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:      "sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9",
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:      "diskSizeGb": "10",
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:      "diskType": "pd-ssd"
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     },
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "autoDelete": true,
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "interface": "SCSI",
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:     "kind": "compute#attachedDisk"
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:    }
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   ],
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   "metadata": {
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:    "fingerprint": "JTqYaJW_BVs=",
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:    "kind": "compute#metadata"
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   },
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   "scheduling": {
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:    "onHostMaintenance": "MIGRATE",
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:    "automaticRestart": true,
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:    "preemptible": false
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:   }
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  },
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "selfLink": "https://www.googleapis.com/compute/beta/projects/$PROJECT/global/instanceTemplates/node",
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5:  "kind": "compute#instanceTemplate"
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: }
2020-01-02T19:13:18.858-0500 [DEBUG] plugin.terraform-provider-google_v3.3.0_x5: -----------------------------------------------------
2020/01/02 19:13:18 [WARN] Provider "google" produced an unexpected new value for google_compute_instance_template.node, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .description: was null, but now cty.StringVal("")
      - .min_cpu_platform: was null, but now cty.StringVal("")
      - .instance_description: was null, but now cty.StringVal("")
      - .network_interface[0].network: was cty.StringVal("default"), but now cty.StringVal("https://www.googleapis.com/compute/v1/projects/$PROJECT/global/networks/default")
      - .network_interface[0].network_ip: was null, but now cty.StringVal("")
      - .disk[0].disk_name: was null, but now cty.StringVal("")
      - .disk[0].source: was null, but now cty.StringVal("")
      - .disk[0].source_image: was cty.StringVal("https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9"), but now cty.StringVal("projects/debian-cloud/global/images/family/debian-9")
2020/01/02 19:13:18 [TRACE] <root>: eval: *terraform.EvalMaybeTainted
2020/01/02 19:13:18 [TRACE] <root>: eval: *terraform.EvalWriteState
2020/01/02 19:13:18 [TRACE] EvalWriteState: recording 0 dependencies for google_compute_instance_template.node
2020/01/02 19:13:18 [TRACE] EvalWriteState: writing current state object for google_compute_instance_template.node
google_compute_instance_template.node: Creation complete after 5s [id=projects/$PROJECT/global/instanceTemplates/node]
2020-01-02T19:13:18.886-0500 [DEBUG] plugin: plugin process exited: path=$TEST/terraform/.terraform/plugins/darwin_amd64/terraform-provider-google_v3.3.0_x5 pid=53779
2020-01-02T19:13:18.886-0500 [DEBUG] plugin: plugin exited
2020/01/02 19:13:18 [TRACE] [walkApply] Exiting eval tree: provider.google (close)

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

So, no, it doesn't appear that the property is included.

Which makes this the opposite of #5295 where the interface is forcibly included and can't be omitted.

@jsoref
Copy link
Contributor Author

jsoref commented Jan 3, 2020

I have one more bug to file in these fun adventures...
source_image lines change in plan output when I make an unrelated change to metadata.

          ~ source_image =

"projects/$PROJECT/global/images/family/$IMAGE" -> "https://www.googleapis.com/compute/v1/projects/$PROJECT/global/images/family/$IMAGE"

#5299

@danawillow
Copy link
Contributor

Cool, the last one is unrelated to this specific issue so it should be filed separately.

I'd like to repeat my question about your use case. It would be helpful to know what you expect and why so we can try to solve your issue in the best way possible. My guess is that gcloud just doesn't show default values if they weren't set explicitly, which seems reasonable.

@jsoref
Copy link
Contributor Author

jsoref commented Jan 3, 2020

Generally, I expect to have the same behavior as I get from using gcloud/google console.

Since the templates I created using those (I'm not sure which of the two) included the canIpForward: false marker, it doesn't make sense to me that terraform can't produce the same output.

I'm trying to migrate from manually created things to terraform managed things, but if I can't produce something that's fairly identical, I don't have much faith that my replacements are equivalent.


I made the mistake of changing the device_name and that broke my VMs horribly. I've spent the last hour or so getting them happy w/ the new config, but each small deviation is expensive. -- And while that break was easy to recognize up front, smaller things might not be apparent at the same point.

@ghost ghost removed the waiting-response label Jan 3, 2020
@jsoref
Copy link
Contributor Author

jsoref commented Jan 3, 2020

Note: if I explicitly set something in terraform, I expect it to be persisted.

If I don't set it, my preference is for it not to be persisted. Between how terraform handles this field and how it handles the interface: SCSI field, it's violating both ways.

@danawillow
Copy link
Contributor

In case you find it interesting (@edwardmedia you probably will!), here's some context as to what's going on and why. There are three different places that this field gets handled:

  1. The google provider code
  2. The GCP client library (some of our resources send HTTP requests directly, but this one uses the golang client library)
  3. gcloud, when asking to describe the resource

The thing that makes this field interesting is that it's set to the server-side default value, which also happens to be the zero value in go (false, since it's a boolean).

So let's start with what happens provider-side. We have three options for how to read the values that are set in the config: d.Get, d.GetOk, and d.GetOkExists. The first one returns the value of the field, the second returns the value of the field and whether or not it's set to the zero value, and the third returns the value of the field and whether or not it's set in the user's config. A few years ago, the only options were d.Get and d.GetOk, which meant that we had no way to tell whether a field was set to the zero value or unset. So in a case like this, we would have no way to know whether this field was unset or if it was explicitly set to false.

Next up, let's talk about what happens in the client libraries. If a field with a zero value is set on a field, it by default does not get included in the request that is sent to server. If we want to send it explicitly, we have to set something called ForceSendFields. We often set this in update requests for boolean values (to ensure that we can change them to false), but usually don't bother when the default for the field is the zero value of it anyway.

Last, we can talk about what happens when you run gcloud describe. gcloud sends a GET request for the resource to its GCP API. In our experience, different APIs respond differently when fields have been explicitly set or implicitly set to the default value. Some APIs will return every field no matter what, and others won't return it if it was implicitly set to the default. The compute API (or at the very least, the InstanceTemplate resource) does the latter, so when gcloud parses the response, it doesn't print the value. The client libraries, however, parse the response back into a go struct, which has no concept of "unset" for primitive types, so by the time it reaches the provider, we see the value as "false". This is why terraform show showed the value as being false even though it wasn't returned in the API response.


If we wanted to make it so that gcloud explicitly showed the value when set to false in a user's terraform config, we could do so by using a combination of GetOkExists and ForceSendFields to make sure the value is explicitly sent instead of relying on the default. However, ensuring that behavior across all resources would be a long and tedious process, and would take time away from our team's focus on ensuring high GCP resource coverage and few bugs, and I don't think it's worth pursuing. As @edwardmedia noted, viewing a resource created this way in the cloud console does show it as having canIpForward as false.

I have a few recommendations of what you can do instead. One would be to recognize default values in your validation- if a default for a value is false, then recognizing that it being persisted as false and it being unset are the same. Secondly, consider using a testing framework for Terraform (https://github.com/gruntwork-io/terratest is one example and they list some others in their repo). Lastly, and in my opinion the most important, would be to test the behavior of the resources you create instead of only testing their values- does the instance template do what you need it to do? If so, then your config was probably right (this feels similar to the common testing best practice of testing behavior instead of implementation).

Hope this helps!

@ghost
Copy link

ghost commented Feb 3, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Feb 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants