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

Commit

Permalink
references: remove the exception for ec2 regarding references since c…
Browse files Browse the repository at this point in the history
…ontroller-tools is able to handle it now

Signed-off-by: Muvaffak Onus <[email protected]>
  • Loading branch information
muvaf committed Jul 21, 2022
1 parent 4828ea6 commit 2b22626
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 28 deletions.
2 changes: 1 addition & 1 deletion apis/ec2/v1alpha2/zz_internetgateway_types.go

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

2 changes: 1 addition & 1 deletion apis/ec2/v1alpha2/zz_routetable_types.go

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

2 changes: 1 addition & 1 deletion apis/ec2/v1alpha2/zz_securitygroup_types.go

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

2 changes: 1 addition & 1 deletion apis/ec2/v1alpha2/zz_subnet_types.go

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

2 changes: 1 addition & 1 deletion apis/ec2/v1alpha2/zz_transitgatewayvpcattachment_types.go

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

2 changes: 1 addition & 1 deletion apis/ec2/v1alpha2/zz_vpcendpoint_types.go

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

2 changes: 1 addition & 1 deletion apis/ec2/v1alpha2/zz_vpcipv4cidrblockassociation_types.go

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

2 changes: 1 addition & 1 deletion apis/ec2/v1alpha2/zz_vpcpeeringconnection_types.go

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

20 changes: 0 additions & 20 deletions config/overrides.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,32 +394,12 @@ func KnownReferencers() tjconfig.ResourceOption { //nolint:gocyclo
RefFieldName: "VpcIdRef",
SelectorFieldName: "VpcIdSelector",
}
if r.ShortGroup == "ec2" {
// TODO(muvaf): Angryjet should work with the full type path
// even when it's its own type, but it doesn't for some
// reason and this is a workaround.
r.References["vpc_id"] = tjconfig.Reference{
Type: "VPC",
RefFieldName: "VpcIdRef",
SelectorFieldName: "VpcIdSelector",
}
}
case "subnet_ids":
r.References["subnet_ids"] = tjconfig.Reference{
Type: "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2.Subnet",
RefFieldName: "SubnetIdRefs",
SelectorFieldName: "SubnetIdSelector",
}
if r.ShortGroup == "ec2" {
// TODO(muvaf): Angryjet should work with the full type path
// even when it's its own type, but it doesn't for some
// reason and this is a workaround.
r.References["subnet_ids"] = tjconfig.Reference{
Type: "Subnet",
RefFieldName: "SubnetIdRefs",
SelectorFieldName: "SubnetIdSelector",
}
}
case "subnet_id":
r.References["subnet_id"] = tjconfig.Reference{
Type: "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2.Subnet",
Expand Down

0 comments on commit 2b22626

Please sign in to comment.