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

Error unexpected EOF occurs when filter, prefix, tags are missing in aws_s3_bucket_metric #21029

Closed
papalagichen opened this issue Apr 16, 2019 · 3 comments

Comments

@papalagichen
Copy link

papalagichen commented Apr 16, 2019

Terraform Version

Terraform v0.11.13
+ provider.aws v1.60.0
+ provider.null v2.1.1
+ provider.template v2.1.1

Terraform Configuration Files

# case 1
resource aws_s3_bucket_metric bucket-metric-prefix-root {
  bucket = "${aws_s3_bucket.bucket.bucket}"
  name = "prefix-root"

  filter {
  }
}

# case 2
resource aws_s3_bucket_metric bucket-metric-prefix-root {
  bucket = "${aws_s3_bucket.bucket.bucket}"
  name = "prefix-root"

  filter {
    prefix = ""
  }
}

Debug Output

Crash Output

Expected Behavior

According to s3_bucket_metric document, filter argument is optional. filter should be ok to be absent. Further, prefix and tags configurations under filter argument are both optional. It should allow filter argument to be empty.

Since AWS S3 allows empty prefix / tags, it makes sense to support empty string in prefix and tags under filter argument.

Actual Behavior

* aws_s3_bucket_metric.bucket-metric-prefix-root: 1 error(s) occurred:

* aws_s3_bucket_metric.bucket-metric-prefix-root: unexpected EOF 

Steps to Reproduce

terraform init
terraform plan
terraform apply

Additional Context

The Terraform command was executed directly from MacOS 10.14.4 with Bash shell 5.0.

References

@apparentlymart
Copy link
Contributor

Hi @papalagichen! Sorry for this strange error.

This particular error message suggests that the AWS provider itself crashed while performing an operation. Normally we see some more details about the crash printed out in that case, but it seems like for some reason the provider exited prematurely without an error this time.

I'm going to ask our bot to move this over to the AWS provider repository since the maintainers of the provider will have a better chance of understanding what's going on here. If it turns out to be a bug in Terraform CLI that a proper error message didn't get printed out to the UI here then we can open a new issue to represent that, but I think the main thing here is to figure out why the AWS provider is exiting ungracefully.

@ghost
Copy link

ghost commented Apr 16, 2019

This issue has been automatically migrated to hashicorp/terraform-provider-aws#8344 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-aws#8344.

@ghost ghost closed this as completed Apr 16, 2019
@ghost
Copy link

ghost commented Jul 26, 2019

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 Jul 26, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants