Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
feat(vpc-rtb-r): added examples for routetable and route and added re…
Browse files Browse the repository at this point in the history
…f/selector for gateway_id / internetgateway

Signed-off-by: haarchri <[email protected]>
  • Loading branch information
haarchri committed May 8, 2022
1 parent 211912f commit 8090be7
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 2 deletions.
10 changes: 10 additions & 0 deletions apis/ec2/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions apis/ec2/v1alpha2/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions apis/ec2/v1alpha2/zz_route_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions config/ec2/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ func Configure(p *config.Provider) {
r.References["route_table_id"] = config.Reference{
Type: "RouteTable",
}
r.References["gateway_id"] = config.Reference{
Type: "InternetGateway",
}
r.References["instance_id"] = config.Reference{
Type: "Instance",
}
Expand Down
4 changes: 2 additions & 2 deletions examples/ec2/internetgateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ spec:
tags:
Name: main
vpcIdRef:
name: example
name: sample-vpc
providerConfigRef:
name: example
name: default
15 changes: 15 additions & 0 deletions examples/ec2/route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
apiVersion: ec2.aws.jet.crossplane.io/v1alpha2
kind: Route
metadata:
name: sample-route
spec:
forProvider:
region: us-west-1
destinationCidrBlock: 0.0.0.0/0
gatewayIdRef:
name: example
routeTableIdRef:
name: sample-rtb
providerConfigRef:
name: default
12 changes: 12 additions & 0 deletions examples/ec2/routetable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: ec2.aws.jet.crossplane.io/v1alpha2
kind: RouteTable
metadata:
name: sample-rtb
spec:
forProvider:
region: us-west-1
vpcIdRef:
name: sample-vpc
providerConfigRef:
name: default
23 changes: 23 additions & 0 deletions package/crds/ec2.aws.jet.crossplane.io_routes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,29 @@ spec:
type: string
gatewayId:
type: string
gatewayIdRef:
description: A Reference to a named object.
properties:
name:
description: Name of the referenced object.
type: string
required:
- name
type: object
gatewayIdSelector:
description: A Selector selects an object.
properties:
matchControllerRef:
description: MatchControllerRef ensures an object with the
same controller reference as the selecting object is selected.
type: boolean
matchLabels:
additionalProperties:
type: string
description: MatchLabels ensures an object with matching labels
is selected.
type: object
type: object
instanceId:
type: string
instanceIdRef:
Expand Down

0 comments on commit 8090be7

Please sign in to comment.