Skip to content

Commit

Permalink
fix!: confusion argument Selector/Refs in netacl/acl and vpc/routetab…
Browse files Browse the repository at this point in the history
…le (#146)
  • Loading branch information
azrod authored Jan 20, 2023
1 parent 0d6f721 commit 716d7bd
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 29 deletions.
8 changes: 4 additions & 4 deletions apis/netacl/v1beta1/zz_acl_types.go

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

8 changes: 4 additions & 4 deletions apis/netacl/v1beta1/zz_generated.deepcopy.go

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

6 changes: 3 additions & 3 deletions apis/netacl/v1beta1/zz_generated.resolvers.go

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

8 changes: 4 additions & 4 deletions apis/vpc/v1beta1/zz_generated.deepcopy.go

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

6 changes: 3 additions & 3 deletions apis/vpc/v1beta1/zz_generated.resolvers.go

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

8 changes: 4 additions & 4 deletions apis/vpc/v1beta1/zz_routetable_types.go

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

5 changes: 4 additions & 1 deletion config/overrides.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ func KnownReferencers() config.ResourceOption { //nolint:gocyclo
case "subnet_id":
r.References[k] = references.TypeVPCSubnetID().Get()

case "subnet_ids", "subnets":
case "subnet_ids":
r.References[k] = references.TypeVPCSubnetID().WithCustomRefsSelectors("SubnetIDRefs", "SubnetIDSelector").Get()

case "subnets":
r.References[k] = references.TypeVPCSubnetID().WithCustomRefsSelectors("SubnetRefs", "SubnetSelector").Get()

case "network_id":
r.References[k] = references.TypeVPCSubnetID().WithCustomRefsSelectors("NetworkIDRef", "NetworkIDSelector").Get()

Expand Down
2 changes: 1 addition & 1 deletion examples-generated/netacl/acl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
- name: rule_1
- name: rule_2
name: my-fw-acl
subnetIdRefs:
subnetRefs:
- name: flexibleengine_vpc_subnet_v1

---
Expand Down
2 changes: 1 addition & 1 deletion examples/netacl/acl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ spec:
outboundRuleRefs:
- name: example-netacl-rule3
- name: example-netacl-rule4
subnetIdRefs:
subnetRefs:
- name: example-subnet
- name: example-subnet2
4 changes: 2 additions & 2 deletions package/crds/netacl.flexibleengine.upbound.io_acls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ spec:
items:
type: string
type: array
subnetIdRefs:
subnetRefs:
description: References to VPCSubnet in vpc to populate subnets.
items:
description: A Reference to a named object.
Expand Down Expand Up @@ -276,7 +276,7 @@ spec:
- name
type: object
type: array
subnetIdSelector:
subnetSelector:
description: Selector for a list of VPCSubnet in vpc to populate
subnets.
properties:
Expand Down
4 changes: 2 additions & 2 deletions package/crds/vpc.flexibleengine.upbound.io_routetables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ spec:
- type
type: object
type: array
subnetIdRefs:
subnetRefs:
description: References to VPCSubnet in vpc to populate subnets.
items:
description: A Reference to a named object.
Expand Down Expand Up @@ -145,7 +145,7 @@ spec:
- name
type: object
type: array
subnetIdSelector:
subnetSelector:
description: Selector for a list of VPCSubnet in vpc to populate
subnets.
properties:
Expand Down

0 comments on commit 716d7bd

Please # to comment.