Closed x4team closed 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
I can reproduce this with an updated acceptance test case:
% make testacc TESTARGS='-run=TestAccVPCTrafficMirrorFilterRule_basic' PKG=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run=TestAccVPCTrafficMirrorFilterRule_basic -timeout 180m
=== RUN TestAccVPCTrafficMirrorFilterRule_basic
=== PAUSE TestAccVPCTrafficMirrorFilterRule_basic
=== CONT TestAccVPCTrafficMirrorFilterRule_basic
panic: interface conversion: interface {} is string, not int
goroutine 17226 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/ec2.resourceTrafficMirrorFilterRuleUpdate({0x105a6280, 0xc0045e1620}, 0xc005e13e00, {0xf163540?, 0xc0040a0dd0?})
/Users/ewbankkit/altsrc.2/github.com/terraform-providers/terraform-provider-aws/internal/service/ec2/vpc_traffic_mirror_filter_rule.go:259 +0x1134
github.com/hashicorp/terraform-provider-aws/internal/provider.interceptedHandler[...].func1(0x0?, {0xf163540?, 0xc0040a0dd0?})
/Users/ewbankkit/altsrc.2/github.com/terraform-providers/terraform-provider-aws/internal/provider/intercept.go:111 +0x34b
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0x105a6280?, {0x105a6280?, 0xc0045c9fb0?}, 0xd?, {0xf163540?, 0xc0040a0dd0?})
/Users/ewbankkit/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.27.0/helper/schema/resource.go:762 +0x87
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc001fb7880, {0x105a6280, 0xc0045c9fb0}, 0xc002763d40, 0xc005e13c80, {0xf163540, 0xc0040a0dd0})
/Users/ewbankkit/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.27.0/helper/schema/resource.go:874 +0x845
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc0042656b0, {0x105a6280?, 0xc0045c9ef0?}, 0xc0026d7ae0)
/Users/ewbankkit/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.27.0/helper/schema/grpc_provider.go:1024 +0xe8d
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.muxServer.ApplyResourceChange({0xc00067a510, 0xc0042407e0, 0xc00067a540, 0xc00067a570, {0xc0040aa440, 0x2, 0x2}}, {0x105a6280?, 0xc0045c9c20?}, 0xc0026d7ae0)
/Users/ewbankkit/go/pkg/mod/github.com/hashicorp/terraform-plugin-mux@v0.11.2/tf5muxserver/mux_server_ApplyResourceChange.go:30 +0x139
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0040794a0, {0x105a6280?, 0xc0045c9350?}, 0xc000c700e0)
/Users/ewbankkit/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.18.0/tfprotov5/tf5server/server.go:821 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xee3b780?, 0xc0040794a0}, {0x105a6280, 0xc0045c9350}, 0xc000c70070, 0x0)
/Users/ewbankkit/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.18.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:422 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc004c54b40, {0x105b3380, 0xc005716b60}, 0xc0029977a0, 0xc00067ad80, 0x176f5cc0, 0x0)
/Users/ewbankkit/go/pkg/mod/google.golang.org/grpc@v1.56.1/server.go:1337 +0xdf3
google.golang.org/grpc.(*Server).handleStream(0xc004c54b40, {0x105b3380, 0xc005716b60}, 0xc0029977a0, 0x0)
/Users/ewbankkit/go/pkg/mod/google.golang.org/grpc@v1.56.1/server.go:1714 +0xa36
google.golang.org/grpc.(*Server).serveStreams.func1.1()
/Users/ewbankkit/go/pkg/mod/google.golang.org/grpc@v1.56.1/server.go:959 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
/Users/ewbankkit/go/pkg/mod/google.golang.org/grpc@v1.56.1/server.go:957 +0x18c
FAIL github.com/hashicorp/terraform-provider-aws/internal/service/ec2 52.585s
FAIL
make: *** [testacc] Error 1
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.
Terraform Core Version
1.5.3
AWS Provider Version
5.8.0
Affected Resource(s)
aws_ec2_traffic_mirror_filter_rule
Expected Behavior
Recreate the inbound/output rules with a different "Rule number". For example, from 2 to 1
Actual Behavior
Stack trace from the terraform-provider-aws_v5.8.0_x5 plugin:
panic: interface conversion: interface {} is string, not int
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
1) Create traffic mirror resource "aws_ec2_traffic_mirror_filter" "filter" 2) Create resource "aws_ec2_traffic_mirror_filter_rule" "rule" with igress/egress rules 3) Create resource "aws_ec2_traffic_mirror_target" "target" 4) Create resource "aws_ec2_traffic_mirror_session" "session" 5) Change rule_number to another number (look point 2 - aws_ec2_traffic_mirror_filter_rule) 6) terraform apply
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None