{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/18300","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/18300/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/18300/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/18300/events","html_url":"https://github.com/hashicorp/terraform/issues/18300","id":334318385,"node_id":"MDU6SXNzdWUzMzQzMTgzODU=","number":18300,"title":"File provisioning failed","user":{"login":"mingrammer","id":6178510,"node_id":"MDQ6VXNlcjYxNzg1MTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6178510?v=4","gravatar_id":"","url":"https://api.github.com/users/mingrammer","html_url":"https://github.com/mingrammer","followers_url":"https://api.github.com/users/mingrammer/followers","following_url":"https://api.github.com/users/mingrammer/following{/other_user}","gists_url":"https://api.github.com/users/mingrammer/gists{/gist_id}","starred_url":"https://api.github.com/users/mingrammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mingrammer/subscriptions","organizations_url":"https://api.github.com/users/mingrammer/orgs","repos_url":"https://api.github.com/users/mingrammer/repos","events_url":"https://api.github.com/users/mingrammer/events{/privacy}","received_events_url":"https://api.github.com/users/mingrammer/received_events","type":"User","site_admin":false},"labels":[{"id":127939518,"node_id":"MDU6TGFiZWwxMjc5Mzk1MTg=","url":"https://api.github.com/repos/hashicorp/terraform/labels/provider/aws","name":"provider/aws","color":"bfdadc","default":false},{"id":85946961,"node_id":"MDU6TGFiZWw4NTk0Njk2MQ==","url":"https://api.github.com/repos/hashicorp/terraform/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-21T02:50:23Z","updated_at":"2018-06-21T11:53:11Z","closed_at":null,"author_association":"NONE","body":"### Terraform Version\r\n\r\n```\r\nTerraform v0.11.7\r\n+ provider.aws v1.23.0\r\n```\r\n\r\n### Terraform Configuration Files\r\n<!--\r\nPaste the relevant parts of your Terraform configuration between the ``` marks below.\r\n\r\nFor large Terraform configs, please use a service like Dropbox and share a link to the ZIP file. For security, you can also encrypt the files using our GPG public key.\r\n-->\r\n\r\n```hcl\r\nresource \"aws_instance\" \"dev-server\" {\r\n  ami                    = \"${var.ami}\"\r\n  instance_type          = \"t2.small\"\r\n  key_name               = \"my-key-name\"\r\n  vpc_security_group_ids = [\"${aws_security_group.sg-office-only.id}\"]\r\n  subnet_id              = \"${aws_subnet.dev-server-subnet.id}\"\r\n\r\n  connection {\r\n    type        = \"ssh\"\r\n    user        = \"ubuntu\"\r\n    private_key = \"${file(\"~/.ssh/my-key-name.pem\")}\"\r\n  }\r\n\r\n  provisioner \"remote-exec\" {\r\n    inline = \"export GITHUB_TOKEN=${var.github_token}\"\r\n  }\r\n\r\n  provisioner \"remote-exec\" {\r\n    script = \"scripts/install_setup.sh\"\r\n  }\r\n\r\n  provisioner \"file\" {\r\n    source      = \"files/\"\r\n    destination = \"/tmp\"\r\n  }\r\n\r\n  provisioner \"file\" {\r\n    source      = \"data/dump.sql\"\r\n    destination = \"/tmp\"\r\n  }\r\n\r\n  provisioner \"remote-exec\" {\r\n    scripts = [\r\n      \"scripts/config_setup.sh\",\r\n      \"scripts/mysql_setup.sh\",\r\n      \"scripts/project_setup.sh\",\r\n      \"scripts/run.sh\",\r\n    ]\r\n  }\r\n}\r\n```\r\n\r\n### Debug Output\r\n\r\n```\r\naws_instance.dev-server: Provisioning with 'file'...\r\n2018-06-21T11:39:16.750+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] connecting to TCP connection for SSH\r\n2018-06-21T11:39:16.755+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] handshaking with SSH\r\n2018-06-21T11:39:16.821+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] Telling SSH config to forward to agent\r\n2018-06-21T11:39:16.821+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] Setting up a session to request agent forwarding\r\n2018-06-21T11:39:16.821+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] opening new ssh session\r\n2018-06-21T11:39:16.898+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [INFO] agent forwarding enabled\r\n2018-06-21T11:39:16.898+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] Uploading dir 'files/' to '/tmp'\r\n2018-06-21T11:39:16.898+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] opening new ssh session\r\n2018-06-21T11:39:16.909+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] Starting remote scp process:  scp -rvt /tmp\r\n2018-06-21T11:39:16.915+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] Started SCP session, beginning transfers...\r\n2018-06-21T11:39:16.915+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] SCP: starting directory upload: config\r\n2018-06-21T11:39:16.917+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] Beginning file upload...\r\n2018-06-21T11:39:16.923+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] SCP: starting directory upload: nginx\r\n2018-06-21T11:39:16.927+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] Beginning file upload...\r\n2018-06-21T11:39:16.933+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] Beginning file upload...\r\n2018-06-21T11:39:16.939+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] SCP: starting directory upload: php-fpm\r\n2018-06-21T11:39:16.941+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] Beginning file upload...\r\n2018-06-21T11:39:16.945+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] SCP session complete, closing stdin pipe.\r\n2018-06-21T11:39:16.945+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] Waiting for SSH session to complete.\r\n2018-06-21T11:39:16.956+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [ERROR] scp stderr: \"Sink: D0755 0 config\\nSink: C0644 341 hosts\\nSink: D0755 0 nginx\\nSink: C0644 1011 dev-server-fpm.conf\\nSink: C0644 766 nginx.conf\\nSink: E\\nSink: D0755 0 php-fpm\\nSink: C0644 12941 php-fpm.conf\\nSink: E\\nSink: E\\n\"\r\naws_instance.dev-server: Provisioning with 'file'...\r\n2018-06-21T11:39:16.957+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] connecting to TCP connection for SSH\r\n2018-06-21T11:39:16.962+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:16 [DEBUG] handshaking with SSH\r\n2018-06-21T11:39:17.010+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:17 [DEBUG] Telling SSH config to forward to agent\r\n2018-06-21T11:39:17.010+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:17 [DEBUG] Setting up a session to request agent forwarding\r\n2018-06-21T11:39:17.010+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:17 [DEBUG] opening new ssh session\r\n2018-06-21T11:39:17.084+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:17 [INFO] agent forwarding enabled\r\n2018-06-21T11:39:17.084+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:17 [DEBUG] opening new ssh session\r\n2018-06-21T11:39:17.093+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:17 [DEBUG] Starting remote scp process:  scp -vt /\r\n2018-06-21T11:39:17.099+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:17 [DEBUG] Started SCP session, beginning transfers...\r\n2018-06-21T11:39:17.099+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:17 [DEBUG] Copying input data into temporary file so we can read the length\r\n2018-06-21T11:39:17.151+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:17 [DEBUG] Beginning file upload...\r\n2018-06-21T11:39:17.171+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:17 [DEBUG] SCP session complete, closing stdin pipe.\r\n2018/06/21 11:39:17 [ERROR] root: eval: *terraform.EvalApplyProvisioners, err: Upload failed: Process exited with status 1\r\n2018-06-21T11:39:17.171+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:17 [DEBUG] Waiting for SSH session to complete.\r\n2018/06/21 11:39:17 [ERROR] root: eval: *terraform.EvalSequence, err: Upload failed: Process exited with status 1\r\n2018/06/21 11:39:17 [TRACE] [walkApply] Exiting eval tree: aws_instance.dev-server\r\n2018/06/21 11:39:17 [TRACE] dag/walk: upstream errored, not walking \"provisioner.file (close)\"\r\n2018/06/21 11:39:17 [TRACE] dag/walk: upstream errored, not walking \"provisioner.remote-exec (close)\"\r\n2018-06-21T11:39:17.171+0900 [DEBUG] plugin.terraform: file-provisioner (internal) 2018/06/21 11:39:17 [ERROR] Process exited with status 1\r\n2018/06/21 11:39:17 [TRACE] dag/walk: upstream errored, not walking \"aws_eip.ip\"\r\n2018/06/21 11:39:17 [TRACE] dag/walk: upstream errored, not walking \"provider.aws (close)\"\r\n2018/06/21 11:39:17 [TRACE] dag/walk: upstream errored, not walking \"meta.count-boundary (count boundary fixup)\"\r\n2018/06/21 11:39:17 [TRACE] dag/walk: upstream errored, not walking \"root\"\r\n2018/06/21 11:39:17 [TRACE] Preserving existing state lineage \"f6356c09-e953-7086-c9c4-9c312bc6148b\"\r\n2018/06/21 11:39:17 [TRACE] Preserving existing state lineage \"f6356c09-e953-7086-c9c4-9c312bc6148b\"\r\n2018/06/21 11:39:17 [TRACE] Preserving existing state lineage \"f6356c09-e953-7086-c9c4-9c312bc6148b\"\r\n\r\n2018/06/21 11:39:17 [DEBUG] plugin: waiting for all plugin processes to complete...\r\nError: Error applying plan:\r\n\r\n1 error(s) occurred:\r\n\r\n* aws_instance.dev-server: Upload failed: Process exited with status 1\r\n```\r\n\r\n### Expected Behavior\r\n\r\nThe second file also should be uploaded without fail.\r\n\r\n### Actual Behavior\r\n\r\nFirst `file` provisioning works well, but second `file` provisioning failed with following error message.\r\n\r\n```\r\n2018/06/21 11:39:17 [DEBUG] plugin: waiting for all plugin processes to complete...\r\nError: Error applying plan:\r\n\r\n1 error(s) occurred:\r\n\r\n* aws_instance.dev-server: Upload failed: Process exited with status 1\r\n```\r\n\r\n### Steps to Reproduce\r\n\r\n1. `terraform init`\r\n2. `terraform apply` <-\r\n\r\n### Additional Context\r\n\r\nFirst files are just small configuration files. But `data/dump.sql` has about 11MB (It is just SQL file which was dumped from my own mysql).\r\n\r\nIs there file size limit?"},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/399077301","html_url":"https://github.com/hashicorp/terraform/issues/18300#issuecomment-399077301","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/18300","id":399077301,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTA3NzMwMQ==","user":{"login":"tombuildsstuff","id":666005,"node_id":"MDQ6VXNlcjY2NjAwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/666005?v=4","gravatar_id":"","url":"https://api.github.com/users/tombuildsstuff","html_url":"https://github.com/tombuildsstuff","followers_url":"https://api.github.com/users/tombuildsstuff/followers","following_url":"https://api.github.com/users/tombuildsstuff/following{/other_user}","gists_url":"https://api.github.com/users/tombuildsstuff/gists{/gist_id}","starred_url":"https://api.github.com/users/tombuildsstuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tombuildsstuff/subscriptions","organizations_url":"https://api.github.com/users/tombuildsstuff/orgs","repos_url":"https://api.github.com/users/tombuildsstuff/repos","events_url":"https://api.github.com/users/tombuildsstuff/events{/privacy}","received_events_url":"https://api.github.com/users/tombuildsstuff/received_events","type":"User","site_admin":false},"created_at":"2018-06-21T11:53:11Z","updated_at":"2018-06-21T11:53:11Z","author_association":"MEMBER","body":"hey @mingrammer \r\n\r\nSorry I noticed I've mis-tagged this - this should be opened on this repository and not the AWS repo - apologies for the confusion, I'll re-open this."}}
{"actor":{"display_login":"tombuildsstuff"}}