Skip to content

Commit 545d410

Browse files
committed
add LBListener examples with forward default action
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
1 parent eeb6c4b commit 545d410

2 files changed

Lines changed: 365 additions & 0 deletions

File tree

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
# SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
apiVersion: elbv2.aws.upbound.io/v1beta2
6+
kind: LBListener
7+
metadata:
8+
annotations:
9+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
10+
labels:
11+
testing.upbound.io/example-name: lblistener-forward-multiple
12+
name: front-end
13+
spec:
14+
forProvider:
15+
defaultAction:
16+
- type: forward
17+
forward:
18+
targetGroup:
19+
- arnSelector:
20+
matchLabels:
21+
testing.upbound.io/example-name: lblistener-forward-multiple
22+
- arnSelector:
23+
matchLabels:
24+
testing.upbound.io/example-name: lblistener-forward-multiple-2
25+
stickiness:
26+
enabled: true
27+
duration: 3600
28+
loadBalancerArnSelector:
29+
matchLabels:
30+
testing.upbound.io/example-name: lblistener-forward-multiple
31+
port: 80
32+
protocol: HTTP
33+
region: us-west-1
34+
---
35+
36+
apiVersion: elbv2.aws.upbound.io/v1beta2
37+
kind: LBTargetGroup
38+
metadata:
39+
annotations:
40+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
41+
labels:
42+
testing.upbound.io/example-name: lblistener-forward-multiple-2
43+
name: test-2
44+
spec:
45+
forProvider:
46+
name: example-lb-tg-2
47+
port: 8080
48+
protocol: HTTP
49+
region: us-west-1
50+
targetType: ip
51+
vpcIdSelector:
52+
matchLabels:
53+
testing.upbound.io/example-name: lblistener-forward-multiple
54+
55+
---
56+
57+
apiVersion: elbv2.aws.upbound.io/v1beta2
58+
kind: LBTargetGroup
59+
metadata:
60+
annotations:
61+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
62+
labels:
63+
testing.upbound.io/example-name: lblistener-forward-multiple
64+
name: test
65+
spec:
66+
forProvider:
67+
name: example-lb-tg
68+
port: 80
69+
protocol: HTTP
70+
region: us-west-1
71+
targetType: ip
72+
vpcIdSelector:
73+
matchLabels:
74+
testing.upbound.io/example-name: lblistener-forward-multiple
75+
76+
---
77+
78+
apiVersion: elbv2.aws.upbound.io/v1beta2
79+
kind: LB
80+
metadata:
81+
annotations:
82+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
83+
labels:
84+
testing.upbound.io/example-name: lblistener-forward-multiple
85+
name: test
86+
spec:
87+
forProvider:
88+
enableDeletionProtection: false
89+
internal: false
90+
loadBalancerType: application
91+
name: test-lb-tf
92+
region: us-west-1
93+
securityGroupSelector:
94+
matchLabels:
95+
testing.upbound.io/example-name: lblistener-forward-multiple
96+
subnetSelector:
97+
matchLabels:
98+
testing.upbound.io/example-name: lblistener-forward-multiple
99+
tags:
100+
Environment: production
101+
102+
---
103+
104+
apiVersion: ec2.aws.upbound.io/v1beta1
105+
kind: VPC
106+
metadata:
107+
annotations:
108+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
109+
labels:
110+
testing.upbound.io/example-name: lblistener-forward-multiple
111+
name: elbv2-vpc
112+
spec:
113+
forProvider:
114+
cidrBlock: 172.16.0.0/16
115+
region: us-west-1
116+
tags:
117+
Name: DemoVpc
118+
119+
---
120+
121+
apiVersion: ec2.aws.upbound.io/v1beta1
122+
kind: InternetGateway
123+
metadata:
124+
annotations:
125+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
126+
labels:
127+
testing.upbound.io/example-name: lblistener-forward-multiple
128+
name: elbv2-internet-gateway
129+
spec:
130+
forProvider:
131+
region: us-west-1
132+
tags:
133+
Name: testing
134+
vpcIdSelector:
135+
matchLabels:
136+
testing.upbound.io/example-name: lblistener-forward-multiple
137+
138+
---
139+
140+
apiVersion: ec2.aws.upbound.io/v1beta1
141+
kind: Subnet
142+
metadata:
143+
annotations:
144+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
145+
labels:
146+
testing.upbound.io/example-name: lblistener-forward-multiple
147+
name: elbv2-subnet
148+
spec:
149+
forProvider:
150+
availabilityZone: us-west-1a
151+
cidrBlock: 172.16.10.0/24
152+
region: us-west-1
153+
vpcIdSelector:
154+
matchLabels:
155+
testing.upbound.io/example-name: lblistener-forward-multiple
156+
157+
---
158+
159+
apiVersion: ec2.aws.upbound.io/v1beta1
160+
kind: Subnet
161+
metadata:
162+
annotations:
163+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
164+
labels:
165+
testing.upbound.io/example-name: lblistener-forward-multiple
166+
name: elbv2-subnet-2
167+
spec:
168+
forProvider:
169+
availabilityZone: us-west-1b
170+
cidrBlock: 172.16.20.0/24
171+
region: us-west-1
172+
vpcIdSelector:
173+
matchLabels:
174+
testing.upbound.io/example-name: lblistener-forward-multiple
175+
176+
---
177+
178+
apiVersion: ec2.aws.upbound.io/v1beta1
179+
kind: SecurityGroup
180+
metadata:
181+
annotations:
182+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
183+
labels:
184+
testing.upbound.io/example-name: lblistener-forward-multiple
185+
name: elbv2-securitygroup
186+
spec:
187+
forProvider:
188+
description: Allow TLS inbound traffic
189+
name: allow_tls
190+
region: us-west-1
191+
tags:
192+
Name: allow_tls
193+
vpcIdSelector:
194+
matchLabels:
195+
testing.upbound.io/example-name: lblistener-forward-multiple
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
apiVersion: elbv2.aws.upbound.io/v1beta2
6+
kind: LBListener
7+
metadata:
8+
annotations:
9+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
10+
labels:
11+
testing.upbound.io/example-name: lblistener-forward-single
12+
name: front-end
13+
spec:
14+
forProvider:
15+
defaultAction:
16+
- type: forward
17+
forward:
18+
targetGroup:
19+
- arnSelector:
20+
matchLabels:
21+
testing.upbound.io/example-name: lblistener-forward-single
22+
23+
loadBalancerArnSelector:
24+
matchLabels:
25+
testing.upbound.io/example-name: lblistener-forward-single
26+
port: 80
27+
protocol: HTTP
28+
region: us-west-1
29+
30+
---
31+
32+
apiVersion: elbv2.aws.upbound.io/v1beta2
33+
kind: LBTargetGroup
34+
metadata:
35+
annotations:
36+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
37+
labels:
38+
testing.upbound.io/example-name: lblistener-forward-single
39+
name: test
40+
spec:
41+
forProvider:
42+
name: example-lb-tg
43+
port: 80
44+
protocol: HTTP
45+
region: us-west-1
46+
targetType: ip
47+
vpcIdSelector:
48+
matchLabels:
49+
testing.upbound.io/example-name: lblistener-forward-single
50+
51+
---
52+
53+
apiVersion: elbv2.aws.upbound.io/v1beta2
54+
kind: LB
55+
metadata:
56+
annotations:
57+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
58+
labels:
59+
testing.upbound.io/example-name: lblistener-forward-single
60+
name: test
61+
spec:
62+
forProvider:
63+
enableDeletionProtection: false
64+
internal: false
65+
loadBalancerType: application
66+
name: test-lb-tf
67+
region: us-west-1
68+
securityGroupSelector:
69+
matchLabels:
70+
testing.upbound.io/example-name: lblistener-forward-single
71+
subnetSelector:
72+
matchLabels:
73+
testing.upbound.io/example-name: lblistener-forward-single
74+
tags:
75+
Environment: production
76+
77+
---
78+
79+
apiVersion: ec2.aws.upbound.io/v1beta1
80+
kind: VPC
81+
metadata:
82+
annotations:
83+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
84+
labels:
85+
testing.upbound.io/example-name: lblistener-forward-single
86+
name: elbv2-vpc
87+
spec:
88+
forProvider:
89+
cidrBlock: 172.16.0.0/16
90+
region: us-west-1
91+
tags:
92+
Name: DemoVpc
93+
94+
---
95+
96+
apiVersion: ec2.aws.upbound.io/v1beta1
97+
kind: InternetGateway
98+
metadata:
99+
annotations:
100+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
101+
labels:
102+
testing.upbound.io/example-name: lblistener-forward-single
103+
name: elbv2-internet-gateway
104+
spec:
105+
forProvider:
106+
region: us-west-1
107+
tags:
108+
Name: testing
109+
vpcIdSelector:
110+
matchLabels:
111+
testing.upbound.io/example-name: lblistener-forward-single
112+
113+
---
114+
115+
apiVersion: ec2.aws.upbound.io/v1beta1
116+
kind: Subnet
117+
metadata:
118+
annotations:
119+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
120+
labels:
121+
testing.upbound.io/example-name: lblistener-forward-single
122+
name: elbv2-subnet
123+
spec:
124+
forProvider:
125+
availabilityZone: us-west-1a
126+
cidrBlock: 172.16.10.0/24
127+
region: us-west-1
128+
vpcIdSelector:
129+
matchLabels:
130+
testing.upbound.io/example-name: lblistener-forward-single
131+
132+
---
133+
134+
apiVersion: ec2.aws.upbound.io/v1beta1
135+
kind: Subnet
136+
metadata:
137+
annotations:
138+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
139+
labels:
140+
testing.upbound.io/example-name: lblistener-forward-single
141+
name: elbv2-subnet-2
142+
spec:
143+
forProvider:
144+
availabilityZone: us-west-1b
145+
cidrBlock: 172.16.20.0/24
146+
region: us-west-1
147+
vpcIdSelector:
148+
matchLabels:
149+
testing.upbound.io/example-name: lblistener-forward-single
150+
151+
---
152+
153+
apiVersion: ec2.aws.upbound.io/v1beta1
154+
kind: SecurityGroup
155+
metadata:
156+
annotations:
157+
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
158+
labels:
159+
testing.upbound.io/example-name: lblistener-forward-single
160+
name: elbv2-securitygroup
161+
spec:
162+
forProvider:
163+
description: Allow TLS inbound traffic
164+
name: allow_tls
165+
region: us-west-1
166+
tags:
167+
Name: allow_tls
168+
vpcIdSelector:
169+
matchLabels:
170+
testing.upbound.io/example-name: lblistener-forward-single

0 commit comments

Comments
 (0)