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

invalid UTF-8 error #23300

Closed
kwunlyou opened this issue Sep 23, 2019 · 1 comment · Fixed by #23302
Closed

invalid UTF-8 error #23300

kwunlyou opened this issue Sep 23, 2019 · 1 comment · Fixed by #23302
Assignees

Comments

@kwunlyou
Copy link

Terraform Version

Terraform v0.12.9
+ provider.aws v2.29.0

Terraform Configuration Files

provider "aws" {
    region = "${var.aws_region}"
}

resource "aws_spot_instance_request" "cheap_worker" {
    spot_price = "${var.cheap_worker_spot_price}"
    wait_for_fulfillment = true
    spot_type = "one-time"

    ami = "${var.ami}"
    instance_type = "${var.cheap_worker_instance_type}"
    key_name = "${var.key_name}"

    subnet_id = "subnet-XXX"
    vpc_security_group_ids = ["sg-XXX"]
    associate_public_ip_address = false

    root_block_device {
        volume_type = "gp2"
        volume_size = "${var.cheap_worker_volume_size}"
        delete_on_termination = "true"
    }

    connection {
        user = "ubuntu"
        private_key = "${file("${var.key_path}")}"
        host ="${aws_spot_instance_request.cheap_worker.private_ip}"
    }

    provisioner "local-exec" {
        command = "aws ec2 create-tags --resources ${self.spot_instance_id} --tags Key=Name,Value=${var.cheap_worker_name}"
    }

    provisioner "file" {
        source = "${var.aws_conf_path}"
        destination = "~/.aws/"
    }

    provisioner "file" {
        source = "./files"
        destination = "/tmp/files"
    }

    provisioner "remote-exec" {
        inline = [
            "sleep 30",
            "chmod +x /tmp/files/bootstrap.sh",
            "/tmp/files/bootstrap.sh",
            "git config --global user.name ${var.git_user_name}",
            "git config --global user.email ${var.git_user_email}"
        ]
    }

    tags = {
        Name = "${var.cheap_worker_name}"
    }
}


Debug Output

gist

Crash Output

Error: rpc error: code = Internal desc = grpc: error while marshaling: proto: field "tfplugin5.ProvisionResource.Response.Output" contains invalid UTF-8

Expected Behavior

continue to get the spot instance

Actual Behavior

terminate with errors

Steps to Reproduce

  1. terraform init
  2. terraform apply

Additional Context

References

@hashibot hashibot transferred this issue from hashicorp/terraform Sep 26, 2019
@appilon appilon self-assigned this Nov 6, 2019
@appilon appilon transferred this issue from hashicorp/terraform-plugin-sdk Nov 6, 2019
@appilon appilon removed their assignment Nov 6, 2019
@jbardin jbardin self-assigned this Nov 6, 2019
@ghost
Copy link

ghost commented Mar 29, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

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

Successfully merging a pull request may close this issue.

3 participants