Hi there,
Terraform v0.7.0
cloudflare_record
`* cloudflare_record.sql_redis_sessions_internal: unexpected EOF
2016/08/05 13:37:45 [DEBUG] vertex provider.aws.main (close), got dep: aws_autoscaling_group.ftp_sftp
2016/08/05 13:37:45 [DEBUG] vertex provider.aws.main (close), got dep: aws_security_group.cfg
....
2016/08/05 13:37:45 [DEBUG] vertex provider.aws.main (close), got dep: aws_route_table_association.private_route_table_mon1
2016/08/05 13:37:45 [DEBUG] vertex provider.aws.main (close), got dep: aws_se* cloudflare_record.ssh_bastion_public: connection is shut down
curity_group.prx_elb
`
Terraform should report or execute the plan for cloudflare_records
Any cloudflare_record throws either a "Unexpected EOF" and "connection is shut down" error.
terraform plan or terraform applyHi @catufunwa! I can't reproduce this - normally the connection shut down and Unexpected EOF are the result of the provider crashing, and there will be a more detailed log. Do you have any additional output you can share, or a configuration which demonstrates the problem? Our acceptance tests for CloudFlare have been passing each night, so I'm fairly confident this is an edge case which should be easy enough to clear up once reproduced. Thanks!
I think I have something for you @jen20.
https://gist.github.com/catufunwa/096c9173a9c205190ce75432358d7d8a
I'm also checking out #7570, but the problem seems to still show up.
It also seems to only happen when parallelism is enable. I'm guessing a map doesnt have a mutex on it when writes are happening to it.
I'm having the same problem. Thanks for the tip about parallelism @catufunwa; that gave me a usable workaround.
Seems that the probability of the problem increases with higher parallelism; I get an error some of the time with default parallelism (10), more often when I raise it, and less often when I lower it. My configuration has 4 cloudflare records that are among the first 10 resources configured according to terraform plan.
@ldanz glad it worked for you. I'm also using the -target flag. Not ideal, but it also works.
I am/was having this problem as well (with four Cloudflare records). Using terraform plan -parallelism=1 makes the plan succeed.
Same problem here (v0.7.3) for 6 CF records in a script that ran successfully under v0.6.x.
Limiting parallelism to 1 worked for me. Thanks!
Same problem here (v0.7.3). :(
Error refreshing state: 22 error(s) occurred:
* cloudflare_record.bbox_google_site_verification: unexpected EOF
* cloudflare_record.bbox_mx2: unexpected EOF
* cloudflare_record.bol_mx1: unexpected EOF
* cloudflare_record.bbox_adl: unexpected EOF
* cloudflare_record.bol_google_site_verification: unexpected EOF
* cloudflare_record.bol_mx5: connection is shut down
* cloudflare_record.bbox_mx6: unexpected EOF
* cloudflare_record.bol_mx3: unexpected EOF
* cloudflare_record.bbox_mx5: connection is shut down
* cloudflare_record.bbox_data: unexpected EOF
* cloudflare_record.bol_mx2: connection is shut down
* cloudflare_record.bbox_mx1: connection is shut down
* cloudflare_record.bbox_mx3: connection is shut down
* cloudflare_record.bol_mx6: connection is shut down
* cloudflare_record.bol_mx4: connection is shut down
* cloudflare_record.bbox_mx4: connection is shut down
* cloudflare_record.audio: connection is shut down
* cloudflare_record.bol_www: connection is shut down
* cloudflare_record.bbox_root: connection is shut down
* cloudflare_record.bol_root: connection is shut down
* cloudflare_record.bbox_www: connection is shut down
* cloudflare_record.bbox_search: connection is shut down
tf script:
provider "cloudflare" {
email = "[email protected]"
token = "${var.cloudflare_token}"
}
## biblebox.com
resource "cloudflare_record" "bbox_root" {
domain = "biblebox.com"
name = "biblebox.com"
value = "${aws_elb.site.dns_name}"
type = "CNAME"
proxied = true
}
resource "cloudflare_record" "bbox_www" {
domain = "biblebox.com"
name = "www"
value = "${aws_elb.site.dns_name}"
type = "CNAME"
proxied = true
}
resource "cloudflare_record" "bbox_search" {
domain = "biblebox.com"
name = "search"
value = "${aws_elb.search.dns_name}"
type = "CNAME"
proxied = true
}
resource "cloudflare_record" "bbox_data" {
domain = "biblebox.com"
name = "data"
value = "dm80xpguoqbjk.cloudfront.net"
type = "CNAME"
proxied = true
}
resource "cloudflare_record" "bbox_adl" {
domain = "biblebox.com"
name = "adl"
value = "dm80xpguoqbjk.cloudfront.net"
type = "CNAME"
proxied = true
}
resource "cloudflare_record" "bbox_google_site_verification" {
domain = "biblebox.com"
name = "biblebox.com"
value = "xxxx"
type = "TXT"
}
## bibliaonline.com.br
resource "cloudflare_record" "bol_root" {
domain = "bibliaonline.com.br"
name = "bibliaonline.com.br"
value = "${aws_elb.site.dns_name}"
type = "CNAME"
proxied = true
}
resource "cloudflare_record" "bol_www" {
domain = "bibliaonline.com.br"
name = "www"
value = "${aws_elb.site.dns_name}"
type = "CNAME"
proxied = true
}
resource "cloudflare_record" "bol_google_site_verification" {
domain = "bibliaonline.com.br"
name = "bibliaonline.com.br"
value = "xxxxxx"
type = "TXT"
}
## GMAIL - bibliaonline.com.br
resource "cloudflare_record" "bol_mx1" {
domain = "bibliaonline.com.br"
name = "bibliaonline.com.br"
value = "aspmx.l.google.com"
type = "MX"
priority = 1
}
resource "cloudflare_record" "bol_mx2" {
domain = "bibliaonline.com.br"
name = "bibliaonline.com.br"
value = "alt1.aspmx.l.google.com"
type = "MX"
priority = 5
}
resource "cloudflare_record" "bol_mx3" {
domain = "bibliaonline.com.br"
name = "bibliaonline.com.br"
value = "alt2.aspmx.l.google.com"
type = "MX"
priority = 5
}
resource "cloudflare_record" "bol_mx4" {
domain = "bibliaonline.com.br"
name = "bibliaonline.com.br"
value = "aspmx2.googlemail.com"
type = "MX"
priority = 10
}
resource "cloudflare_record" "bol_mx5" {
domain = "bibliaonline.com.br"
name = "bibliaonline.com.br"
value = "aspmx3.googlemail.com"
type = "MX"
priority = 10
}
resource "cloudflare_record" "bol_mx6" {
domain = "bibliaonline.com.br"
name = "bibliaonline.com.br"
value = "aspmx5.googlemail.com"
type = "MX"
priority = 10
}
## GMAIL - bibebox.com
resource "cloudflare_record" "bbox_mx1" {
domain = "biblebox.com"
name = "biblebox.com"
value = "aspmx.l.google.com"
type = "MX"
priority = 1
}
resource "cloudflare_record" "bbox_mx2" {
domain = "biblebox.com"
name = "biblebox.com"
value = "alt1.aspmx.l.google.com"
type = "MX"
priority = 5
}
resource "cloudflare_record" "bbox_mx3" {
domain = "biblebox.com"
name = "biblebox.com"
value = "alt2.aspmx.l.google.com"
type = "MX"
priority = 5
}
resource "cloudflare_record" "bbox_mx4" {
domain = "biblebox.com"
name = "biblebox.com"
value = "aspmx2.googlemail.com"
type = "MX"
priority = 10
}
resource "cloudflare_record" "bbox_mx5" {
domain = "biblebox.com"
name = "biblebox.com"
value = "aspmx3.googlemail.com"
type = "MX"
priority = 10
}
resource "cloudflare_record" "bbox_mx6" {
domain = "biblebox.com"
name = "biblebox.com"
value = "aspmx5.googlemail.com"
type = "MX"
priority = 10
}
Latest terraform still got this issue, setting -parallelism=1 is the only way to get it reliable working...
I have updated the used client library for cloudflare and rebuilt terraform, this seems to solve the problem so it's possible that a fix like https://github.com/cloudflare/cloudflare-go/issues/88 solved the issue.
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.
Most helpful comment
Latest terraform still got this issue, setting
-parallelism=1is the only way to get it reliable working...