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

[Bug]: Create aws LBListener panic #1399

Closed
1 task done
towithyou opened this issue Jul 15, 2024 · 3 comments
Closed
1 task done

[Bug]: Create aws LBListener panic #1399

towithyou opened this issue Jul 15, 2024 · 3 comments
Labels
bug Something isn't working needs:triage

Comments

@towithyou
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

elbv2.aws.upbound.io/v1beta1
elbv2.aws.upbound.io/v1beta2

Resource MRs required to reproduce the bug

apiVersion: elbv2.aws.upbound.io/v1beta1
kind: LB
metadata:
name: crossplane-nlb
spec:
providerConfigRef:
name: group-infra-provider-config
forProvider:
internal: true
loadBalancerType: network
ipAddressType: ipv4
name: crossplane-nlb
region: ap-southeast-1
securityGroups:
- sg-067182781584bd2ea
subnets:
- subnet-0a1f18da9xxxxx
- subnet-067b89eb4xxxxx
- subnet-09281a937xxxxx
tags:
Environment: Test
Cluster: sg-staging

apiVersion: elbv2.aws.upbound.io/v1beta1
kind: LBTargetGroup
metadata:
name: crossplane-target-group
spec:
providerConfigRef:
name: group-infra-provider-config
forProvider:
name: crossplane-target-group
port: 80
protocol: TCP
region: ap-southeast-1
targetType: instance
vpcId: vpc-00e214aab07xxxxx
tags:
Name: crossplane-target-group
Cluster: sg-staging

apiVersion: elbv2.aws.upbound.io/v1beta1
kind: LBTargetGroupAttachment
metadata:
name: crossplane-target-group-attachment
spec:
providerConfigRef:
name: group-infra-provider-config
forProvider:
port: 80
region: ap-southeast-1
targetGroupArnRef:
name: crossplane-target-group
targetId: i-091205be5cxxxxx

apiVersion: elbv2.aws.upbound.io/v1beta1
kind: LBListener
metadata:
name: crossplane-listener
spec:
providerConfigRef:
name: group-infra-provider-config
forProvider:
defaultAction:
- type: forward
targetGroupArnRef:
name: crossplane-target-group

loadBalancerArnRef:
  name: crossplane-nlb
port: 8080
protocol: TCP
region: ap-southeast-1
tags:
  Name: crossplane-listener
  Cluster: sg-staging

Steps to Reproduce

Create aws LBListener panic

What happened?

Create aws LBListener panic

Relevant Error Output Snippet

# k logs -f provider-aws-elbv2-8b9ad017c2ca-787b9f8bcf-q859b
{"level":"info","ts":"2024-07-15T09:31:13Z","logger":"provider-aws","msg":"Beta feature enabled","flag":"EnableBetaManagementPolicies"}
panic: value is null

goroutine 5394 [running]:
github.com/hashicorp/go-cty/cty.Value.LengthInt({{{0x18af8ab0?, 0x400efa88c0?}}, {0x0?, 0x0?}})
	github.com/hashicorp/[email protected]/cty/value_ops.go:989 +0x254
github.com/hashicorp/terraform-provider-aws/internal/service/elbv2.flattenLbForwardActionOneOf({{{0x18af8ab0?, 0x400efa8910?}}, {0x1206a8a0?, 0x400e47eb28?}}, 0x0, {{0x4003b6c560, 0x7}, 0x0, 0x0, 0x0, ...}, ...)
	github.com/hashicorp/[email protected]/internal/service/elbv2/listener.go:1036 +0x18c
github.com/hashicorp/terraform-provider-aws/internal/service/elbv2.flattenLbForwardAction(0x4001bfe400, {0x15ca0293, 0xe}, 0x0, {{0x4003b6c560, 0x7}, 0x0, 0x0, 0x0, 0x400857d320, ...}, ...)
	github.com/hashicorp/[email protected]/internal/service/elbv2/listener.go:1014 +0x188
github.com/hashicorp/terraform-provider-aws/internal/service/elbv2.flattenLbListenerActions(0x4001bfe400, {0x15ca0293, 0xe}, {0x4000b24b90?, 0x1, 0x400c7556e5?})
	github.com/hashicorp/[email protected]/internal/service/elbv2/listener.go:979 +0x240
github.com/hashicorp/terraform-provider-aws/internal/service/elbv2.resourceListenerRead({0x18af8098, 0x4002b98150}, 0x4001bfe400, {0x15c13200?, 0x4002f35790?})
	github.com/hashicorp/[email protected]/internal/service/elbv2/listener.go:535 +0x508
github.com/hashicorp/terraform-provider-aws/internal/service/elbv2.resourceListenerCreate({0x18af8098, 0x4002b98150}, 0x4001bfe400, {0x15c13200, 0x4002f35790})
	github.com/hashicorp/[email protected]/internal/service/elbv2/listener.go:506 +0xdec
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0x4001bfe400?, {0x15c13200?, 0x4002f35790})
	github.com/hashicorp/[email protected]/internal/provider/intercept.go:113 +0x1d8
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x18af8140?, {0x18af8140?, 0x40008c7e30?}, 0xd?, {0x15c13200?, 0x4002f35790?})
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:773 +0x64
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x400216fb20, {0x18af8140, 0x40008c7e30}, 0x0, 0x40028dfa80, {0x15c13200, 0x4002f35790})
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:909 +0x884
github.com/crossplane/upjet/pkg/controller.(*terraformPluginSDKExternal).Create(0x400eeee540, {0x18af8140, 0x40008c7e30}, {0x18c089f0, 0x400e422008})
	github.com/crossplane/[email protected]/pkg/controller/external_tfpluginsdk.go:592 +0xb0
github.com/crossplane/upjet/pkg/controller.(*terraformPluginSDKAsyncExternal).Create.func1()
	github.com/crossplane/[email protected]/pkg/controller/external_async_tfpluginsdk.go:149 +0x120
created by github.com/crossplane/upjet/pkg/controller.(*terraformPluginSDKAsyncExternal).Create in goroutine 3990
	github.com/crossplane/[email protected]/pkg/controller/external_async_tfpluginsdk.go:145 +0x120

Crossplane Version

v1.16.0

Provider Version

v1.9.0

Kubernetes Version

v1.29.2

Kubernetes Distribution

v1.29.2

Additional Info

provider-aws-elbv2 True True xpkg.upbound.io/upbound/provider-aws-elbv2:v1.9.0 175m

@towithyou towithyou added bug Something isn't working needs:triage labels Jul 15, 2024
@towithyou
Copy link
Author

Has any friend encountered the same problem as me? Can you prompt me where the error occurred?

@turkenf
Copy link
Collaborator

turkenf commented Jul 17, 2024

Duplicate of #1352

@turkenf turkenf marked this as a duplicate of #1352 Jul 17, 2024
@turkenf turkenf closed this as completed Jul 17, 2024
@turkenf
Copy link
Collaborator

turkenf commented Jul 17, 2024

Thank you for the issue report @towithyou. Please follow the mentioned issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs:triage
Projects
None yet
Development

No branches or pull requests

2 participants