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

Terraform crashed during creating/importing aws_elasticache_replication_group #9656

Closed
bandesz opened this issue Oct 27, 2016 · 6 comments
Closed

Comments

@bandesz
Copy link
Contributor

bandesz commented Oct 27, 2016

Hi there,

Terraform Version

Terraform v0.7.7

Affected Resource(s)

  • aws_elasticache_replication_group

Terraform Configuration Files

resource "aws_elasticache_replication_group" "xxx_redis" {
  replication_group_id = "xxx-redis"
  replication_group_description = "xxx-redis"
  node_type = "${var.node_type}"
  engine_version = "3.2.4"
  number_cache_clusters = "${var.node_count}"
  port = 6379
  parameter_group_name = "default.redis3.2.cluster.on"
  automatic_failover_enabled = true
  subnet_group_name = "${aws_elasticache_subnet_group.xxx_redis.name}"
  security_group_ids = ["${aws_security_group.xxx_redis.id}"]
}

Debug Output

See panic output

Panic Output

https://gist.github.com/bandesz/3ac0cfe33659a562bbb8df9ed4fcc674

Expected Behavior

Terraform should be able to create or import aws_elasticache_replication_group

Actual Behavior

CRASH

Steps to Reproduce

At first terraform apply failed with simply saying EOF error, but the AWS resource itself was created. Then terraform import crashed probably because of the same underlying issue.

@kwilczynski
Copy link
Contributor

@bandesz hi there! I am so sorry that you had a bad experience!

We will look into this.

@kwilczynski
Copy link
Contributor

Relevant part of the crash log:

2016/10/27 17:34:56 [DEBUG] plugin: terraform: panic: runtime error: invalid memory address or nil pointer dereference
2016/10/27 17:34:56 [DEBUG] plugin: terraform: [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x3ed9c0]
2016/10/27 17:34:56 [DEBUG] plugin: terraform:
2016/10/27 17:34:56 [DEBUG] plugin: terraform: goroutine 85 [running]:
2016/10/27 17:34:56 [DEBUG] plugin: terraform: panic(0x24c3860, 0xc420012080)
2016/10/27 17:34:56 [DEBUG] plugin: terraform:  /opt/go/src/runtime/panic.go:500 +0x1a1
2016/10/27 17:34:56 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/builtin/providers/aws.resourceAwsElasticacheReplicationGroupRead(0xc42054bf80, 0x2220fc0, 0xc42048e300, 0x0, 0x21)
2016/10/27 17:34:56 [DEBUG] plugin: terraform:  /opt/gopath/src/github.com/hashicorp/terraform/builtin/providers/aws/resource_aws_elasticache_replication_group.go:241 +0x860
2016/10/27 17:34:56 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/helper/schema.(*Resource).Refresh(0xc4206c0ba0, 0xc4205ba280, 0x2220fc0, 0xc42048e300, 0xc420332d88, 0x1, 0x0)
2016/10/27 17:34:56 [DEBUG] plugin: terraform:  /opt/gopath/src/github.com/hashicorp/terraform/helper/schema/resource.go:259 +0x131
2016/10/27 17:34:56 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/helper/schema.(*Provider).Refresh(0xc4204d8660, 0xc42000b240, 0xc4205ba280, 0x0, 0x18, 0x18)
2016/10/27 17:34:56 [DEBUG] plugin: terraform:  /opt/gopath/src/github.com/hashicorp/terraform/helper/schema/provider.go:203 +0x91
2016/10/27 17:34:56 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Refresh(0xc4206390a0, 0xc4205cc500, 0xc4205cc740, 0x0, 0x0)
2016/10/27 17:34:56 [DEBUG] plugin: terraform:  /opt/gopath/src/github.com/hashicorp/terraform/plugin/resource_provider.go:482 +0x4e
2016/10/27 17:34:56 [DEBUG] plugin: terraform: reflect.Value.call(0xc420486780, 0xc420080270, 0x13, 0x2a8503f, 0x4, 0xc4204c5ee0, 0x3, 0x3, 0x411dde0, 0xc4205adf00, ...)
2016/10/27 17:34:56 [DEBUG] plugin: terraform:  /opt/go/src/reflect/value.go:434 +0x5c8
2016/10/27 17:34:56 [DEBUG] plugin: terraform: reflect.Value.Call(0xc420486780, 0xc420080270, 0x13, 0xc4204c5ee0, 0x3, 0x3, 0xc420681c14, 0xc420568f60, 0xc420568f00)
2016/10/27 17:34:56 [DEBUG] plugin: terraform:  /opt/go/src/reflect/value.go:302 +0xa4
2016/10/27 17:34:56 [DEBUG] plugin: terraform: net/rpc.(*service).call(0xc420484a40, 0xc420484a00, 0xc420616ba8, 0xc42009d800, 0xc42060e620, 0x22231c0, 0xc4205cc500, 0x16, 0x2223200, 0xc4205cc740, ...)
2016/10/27 17:34:56 [DEBUG] plugin: terraform:  /opt/go/src/net/rpc/server.go:383 +0x148
2016/10/27 17:34:56 [DEBUG] plugin: terraform: created by net/rpc.(*Server).ServeCodec

@kwilczynski
Copy link
Contributor

kwilczynski commented Oct 27, 2016

The panic was triggered inside the following block of code:

Update: Correction for the version 0.7.7:

d.Set("port", rgp.NodeGroups[0].PrimaryEndpoint.Port)

@kwilczynski
Copy link
Contributor

@bandesz hi there!

I believe the issue you are seeing has been resolved recently via #9601, and will be included in the upcoming 0.7.8 release - which I believe is due very, very soon.

@stack72
Copy link
Contributor

stack72 commented Oct 27, 2016

@bandesz, @kwilczynski is correct about #9601 :)

Sorry about the hassle here - we will get 0.7.8 released ASAP

Paul

@stack72 stack72 closed this as completed Oct 27, 2016
@ghost
Copy link

ghost commented Apr 21, 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 Apr 21, 2020
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

3 participants