$ terraform -v
Terraform v0.13.5
provider "aws" {
version = "3.13.0"
region = var.aws_region
}
resource "aws_mq_broker" "broker" {
}
aws_mq_brokeraws_mq_broker.broker: Refreshing state... [id=broker-staging] [32/1443]
Error: rpc error: code = Unavailable desc = transport is closing
panic: runtime error: invalid memory address or nil pointer dereference
2020-11-05T14:44:05.016Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x42755e3]
2020-11-05T14:44:05.016Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5:
2020-11-05T14:44:05.016Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: goroutine 56 [running]:
2020-11-05T14:44:05.016Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsMqBrokerRead(0xc000e24f00, 0x530bee0, 0xc0013d9180, 0xa0c0290, 0x604acb0)
2020-11-05T14:44:05.016Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go:378 +0xbe3
2020-11-05T14:44:05.016Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc000610a50, 0x6a89a00, 0xc000eecb40, 0xc000e24f00, 0x530bee0, 0xc0013d9180, 0x0, 0x0, 0x0)
2020-11-05T14:44:05.016Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:280 +0x88
2020-11-05T14:44:05.016Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000610a50, 0x6a89a00, 0xc000eecb40, 0xc001354310, 0x530bee0, 0xc0013d9180, 0xc001550198, 0x0, 0x0, 0x0)
2020-11-05T14:44:05.016Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:554 +0x1c2
2020-11-05T14:44:05.016Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: github.com/hashicorp/terraform-plugin-sdk/v2/internal/helper/plugin.(*GRPCProviderServer).ReadResource(0xc000d77a40, 0x6a89a00, 0xc000eecb40, 0xc000e00cc0, 0xc000d77a40, 0xc000d77a50, 0x604aca0)
2020-11-05T14:44:05.016Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/internal/helper/plugin/grpc_provider.go:572 +0x42f
2020-11-05T14:44:05.016Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfplugin5._Provider_ReadResource_Handler.func1(0x6a89a00, 0xc000eecb40, 0x5ce7d20, 0xc000e00cc0, 0xc000eecb40, 0x5492960, 0xc000e00c01, 0xc0012103a0)
2020-11-05T14:44:05.016Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3276 +0x86
2020-11-05T14:44:05.017Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: github.com/hashicorp/terraform-plugin-sdk/v2/plugin.Serve.func3.1(0x6a89ac0, 0xc000e1f920, 0x5ce7d20, 0xc000e00cc0, 0xc001210380, 0xc0012103a0, 0xc001007ba0, 0x4927f8, 0x5b390e0, 0xc000e1f920)
2020-11-05T14:44:05.017Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/plugin/serve.go:76 +0x87
2020-11-05T14:44:05.017Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfplugin5._Provider_ReadResource_Handler(0x5dcb7c0, 0xc000d77a40, 0x6a89ac0, 0xc000e1f920, 0xc000e00c60, 0xc001418ee0, 0x6a89ac0, 0xc000e1f920, 0xc000e3e160, 0x15c)
2020-11-05T14:44:05.017Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3278 +0x14b
2020-11-05T14:44:05.017Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: google.golang.org/grpc.(*Server).processUnaryRPC(0xc000dca700, 0x6aacf40, 0xc001ae4000, 0xc000e0bd00, 0xc000c4e9f0, 0xa084bd0, 0x0, 0x0, 0x0)
2020-11-05T14:44:05.017Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:1171 +0x50a
2020-11-05T14:44:05.017Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: google.golang.org/grpc.(*Server).handleStream(0xc000dca700, 0x6aacf40, 0xc001ae4000, 0xc000e0bd00, 0x0)
2020-11-05T14:44:05.017Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:1494 +0xccd
2020-11-05T14:44:05.017Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000c461e0, 0xc000dca700, 0x6aacf40, 0xc001ae4000, 0xc000e0bd00)
2020-11-05T14:44:05.017Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:834 +0xa1
2020-11-05T14:44:05.017Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: created by google.golang.org/grpc.(*Server).serveStreams.func1
2020-11-05T14:44:05.017Z [DEBUG] plugin.terraform-provider-aws_v3.13.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:832 +0x204
2020/11/05 14:44:05 [ERROR] eval: *terraform.EvalRefresh, err: rpc error: code = Unavailable desc = transport is closing
2020/11/05 14:44:05 [ERROR] eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/11/05 14:44:05 [TRACE] [walkImport] Exiting eval tree: import aws_mq_broker.broker result
2020/11/05 14:44:05 [TRACE] vertex "import aws_mq_broker.broker result": visit complete
2020/11/05 14:44:05 [TRACE] vertex "aws_mq_broker.broker (import id \"broker-staging\")": dynamic subgraph encountered errors
2020/11/05 14:44:05 [TRACE] vertex "aws_mq_broker.broker (import id \"broker-staging\")": visit complete
2020/11/05 14:44:05 [TRACE] vertex "aws_mq_broker.broker (import id \"broker-staging\")": dynamic subgraph encountered errors
2020/11/05 14:44:05 [TRACE] vertex "aws_mq_broker.broker (import id \"broker-staging\")": visit complete
2020/11/05 14:44:05 [TRACE] dag/walk: upstream of "provider[\"registry.terraform.io/hashicorp/aws\"] (close)" errored, so skipping
2020/11/05 14:44:05 [TRACE] dag/walk: upstream of "root" errored, so skipping
2020-11-05T14:44:05.020Z [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2020-11-05T14:44:05.020Z [DEBUG] plugin: plugin process exited: path=.terraform/plugins/registry.terraform.io/hashicorp/aws/3.13.0/linux_amd64/terraform-provider-aws_v3.13.0_x5 pid=29581 error="exit status 2"
2020-11-05T14:44:05.067Z [DEBUG] plugin: plugin exited
Import AWS MQ broker configuration
Crash
Although I'm using terragrunt, it also happens if I use terraform instead.
terraform import aws_mq_broker.broker broker-stagingBroker engine RabbitMQ version 3.8.6.
Same error, different components:
ah, it seems related to https://github.com/hashicorp/terraform-provider-aws/issues/16030
This is because RabbitMQ does not use the Configurations.Current and thats not accessible when trying to use it. This should be solved by #16030 as mentioned.
Right, I will be fixing it to be:
if out.Configurations != nil {
err = d.Set("configuration", flattenMqConfigurationId(out.Configurations.Current))
if err != nil {
return err
}
}
Right now AWS has another issue with RabbitMQ that causes a constant update to users, so I am going to wait till they fix their API and then submit the PR.
Most helpful comment
Right, I will be fixing it to be:
Right now AWS has another issue with RabbitMQ that causes a constant update to users, so I am going to wait till they fix their API and then submit the PR.