Skip to content

Commit

Permalink
add LBListener examples with forward default action
Browse files Browse the repository at this point in the history
Signed-off-by: Erhan Cagirici <[email protected]>
  • Loading branch information
erhancagirici committed Oct 21, 2024
1 parent eeb6c4b commit a8c1fc4
Show file tree
Hide file tree
Showing 2 changed files with 364 additions and 0 deletions.
194 changes: 194 additions & 0 deletions examples/elbv2/v1beta2/lblistener-forward-multiple-targetgroups.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
# SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
#
# SPDX-License-Identifier: Apache-2.0

apiVersion: elbv2.aws.upbound.io/v1beta2
kind: LBListener
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-multiple
name: front-end
spec:
forProvider:
defaultAction:
- type: forward
forward:
targetGroup:
- arnSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-multiple
- arnSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-multiple-2

loadBalancerArnSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-multiple
port: 80
protocol: HTTP
region: us-west-1

---

apiVersion: elbv2.aws.upbound.io/v1beta2
kind: LBTargetGroup
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-multiple-2
name: test-2
spec:
forProvider:
name: example-lb-tg-2
port: 8080
protocol: HTTP
region: us-west-1
targetType: ip
vpcIdSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-multiple

---

apiVersion: elbv2.aws.upbound.io/v1beta2
kind: LBTargetGroup
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-multiple
name: test
spec:
forProvider:
name: example-lb-tg
port: 80
protocol: HTTP
region: us-west-1
targetType: ip
vpcIdSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-multiple

---

apiVersion: elbv2.aws.upbound.io/v1beta2
kind: LB
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-multiple
name: test
spec:
forProvider:
enableDeletionProtection: false
internal: false
loadBalancerType: application
name: test-lb-tf
region: us-west-1
securityGroupSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-multiple
subnetSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-multiple
tags:
Environment: production

---

apiVersion: ec2.aws.upbound.io/v1beta1
kind: VPC
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-multiple
name: elbv2-vpc
spec:
forProvider:
cidrBlock: 172.16.0.0/16
region: us-west-1
tags:
Name: DemoVpc

---

apiVersion: ec2.aws.upbound.io/v1beta1
kind: InternetGateway
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-multiple
name: elbv2-internet-gateway
spec:
forProvider:
region: us-west-1
tags:
Name: testing
vpcIdSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-multiple

---

apiVersion: ec2.aws.upbound.io/v1beta1
kind: Subnet
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-multiple
name: elbv2-subnet
spec:
forProvider:
availabilityZone: us-west-1a
cidrBlock: 172.16.10.0/24
region: us-west-1
vpcIdSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-multiple

---

apiVersion: ec2.aws.upbound.io/v1beta1
kind: Subnet
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-multiple
name: elbv2-subnet-2
spec:
forProvider:
availabilityZone: us-west-1b
cidrBlock: 172.16.20.0/24
region: us-west-1
vpcIdSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-multiple

---

apiVersion: ec2.aws.upbound.io/v1beta1
kind: SecurityGroup
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-multiple
name: elbv2-securitygroup
spec:
forProvider:
description: Allow TLS inbound traffic
name: allow_tls
region: us-west-1
tags:
Name: allow_tls
vpcIdSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-multiple
170 changes: 170 additions & 0 deletions examples/elbv2/v1beta2/lblistener-forward-single-targetgroup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
#
# SPDX-License-Identifier: Apache-2.0

apiVersion: elbv2.aws.upbound.io/v1beta2
kind: LBListener
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-single
name: front-end
spec:
forProvider:
defaultAction:
- type: forward
forward:
targetGroup:
- arnSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-single

loadBalancerArnSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-single
port: 80
protocol: HTTP
region: us-west-1

---

apiVersion: elbv2.aws.upbound.io/v1beta2
kind: LBTargetGroup
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-single
name: test
spec:
forProvider:
name: example-lb-tg
port: 80
protocol: HTTP
region: us-west-1
targetType: ip
vpcIdSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-single

---

apiVersion: elbv2.aws.upbound.io/v1beta2
kind: LB
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-single
name: test
spec:
forProvider:
enableDeletionProtection: false
internal: false
loadBalancerType: application
name: test-lb-tf
region: us-west-1
securityGroupSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-single
subnetSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-single
tags:
Environment: production

---

apiVersion: ec2.aws.upbound.io/v1beta1
kind: VPC
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-single
name: elbv2-vpc
spec:
forProvider:
cidrBlock: 172.16.0.0/16
region: us-west-1
tags:
Name: DemoVpc

---

apiVersion: ec2.aws.upbound.io/v1beta1
kind: InternetGateway
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-single
name: elbv2-internet-gateway
spec:
forProvider:
region: us-west-1
tags:
Name: testing
vpcIdSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-single

---

apiVersion: ec2.aws.upbound.io/v1beta1
kind: Subnet
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-single
name: elbv2-subnet
spec:
forProvider:
availabilityZone: us-west-1a
cidrBlock: 172.16.10.0/24
region: us-west-1
vpcIdSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-single

---

apiVersion: ec2.aws.upbound.io/v1beta1
kind: Subnet
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-single
name: elbv2-subnet-2
spec:
forProvider:
availabilityZone: us-west-1b
cidrBlock: 172.16.20.0/24
region: us-west-1
vpcIdSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-single

---

apiVersion: ec2.aws.upbound.io/v1beta1
kind: SecurityGroup
metadata:
annotations:
meta.upbound.io/example-id: elbv2/v1beta2/lblistener
labels:
testing.upbound.io/example-name: lblistener-forward-single
name: elbv2-securitygroup
spec:
forProvider:
description: Allow TLS inbound traffic
name: allow_tls
region: us-west-1
tags:
Name: allow_tls
vpcIdSelector:
matchLabels:
testing.upbound.io/example-name: lblistener-forward-single

0 comments on commit a8c1fc4

Please sign in to comment.