Skip to content

Commit

Permalink
feat(tgw): added ec2 transitgateway & transitgateway vpc attachment
Browse files Browse the repository at this point in the history
Signed-off-by: haarchri <chhaar30@googlemail.com>
  • Loading branch information
haarchri committed Dec 14, 2021
1 parent 30a832f commit 0fc4390
Show file tree
Hide file tree
Showing 21 changed files with 3,435 additions and 121 deletions.
67 changes: 65 additions & 2 deletions apis/ec2/v1alpha1/custom_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ type CustomVolumeParameters struct {
// fails.
// +optional
// +crossplane:generate:reference:type=github.com/crossplane/provider-aws/apis/kms/v1alpha1.Key
// +crossplane:generate:reference:refFieldName=KMSKeyIDRef
// +crossplane:generate:reference:selectorFieldName=KMSKeyIDSelector
KMSKeyID *string `json:"kmsKeyId,omitempty"`

// KMSKeyIDRef is a reference to a KMS Key used to set KMSKeyID.
Expand All @@ -60,6 +58,7 @@ type CustomVolumeParameters struct {
// CustomVPCPeeringConnectionParameters are custom parameters for VPCPeeringConnection
type CustomVPCPeeringConnectionParameters struct {
// The ID of the requester VPC. You must specify this parameter in the request.
// +crossplane:generate:reference:type=github.com/crossplane/provider-aws/apis/ec2/v1beta1.VPC
VPCID *string `json:"vpcID,omitempty"`
// VPCIDRef is a reference to an API used to set
// the VPCID.
Expand All @@ -85,3 +84,67 @@ type CustomVPCPeeringConnectionParameters struct {
// connection if both VPCs are in the same tenant.
AcceptRequest bool `json:"acceptRequest,omitempty"`
}

// CustomTransitGatewayParameters are custom parameters for TransitGateway
type CustomTransitGatewayParameters struct {
// Metadata tagging key value pairs
// +optional
Tags []Tag `json:"tags,omitempty"`
}

// CustomTransitGatewayVPCAttachmentParameters are custom parameters for TransitGatewayVPCAttachment
type CustomTransitGatewayVPCAttachmentParameters struct {
// The ID of the VPC.
// +optional
// +crossplane:generate:reference:type=github.com/crossplane/provider-aws/apis/ec2/v1beta1.VPC
VPCID *string `json:"vpcId,omitempty"`

// VPCIDRef is a reference to an API used to set
// the VPCID.
// +optional
VPCIDRef *xpv1.Reference `json:"vpcIdRef,omitempty"`

// VPCIDSelector selects references to API used
// to set the VPCID.
// +optional
VPCIDSelector *xpv1.Selector `json:"vpcIdSelector,omitempty"`

// The IDs of one or more subnets. You can specify only one subnet per Availability
// Zone. You must specify at least one subnet, but we recommend that you specify
// two subnets for better availability. The transit gateway uses one IP address
// from each specified subnet.
// +optional
// +crossplane:generate:reference:type=github.com/crossplane/provider-aws/apis/ec2/v1beta1.Subnet
// +crossplane:generate:reference:refFieldName=SubnetIDRefs
// +crossplane:generate:reference:selectorFieldName=SubnetIDSelector
SubnetIDs []*string `json:"subnetIds,omitempty"`

// SubnetIDRefs is a list of references to SubnetIDs used to set
// the SubnetIDs.
// +optional
SubnetIDRefs []xpv1.Reference `json:"subnetIdRefs,omitempty"`

// SubnetIDSelector selects references to SubnetIDs used
// to set the SubnetIDs.
// +optional
SubnetIDSelector *xpv1.Selector `json:"subnetIdSelector,omitempty"`

// The ID of the transit gateway.
// +optional
// +crossplane:generate:reference:type=TransitGateway
TransitGatewayID *string `json:"transitGatewayId,omitempty"`

// TransitGatewayIDRef is a reference to an API used to set
// the TransitGatewayID.
// +optional
TransitGatewayIDRef *xpv1.Reference `json:"transitGatewayIdRef,omitempty"`

// TransitGatewayIDSelector selects references to API used
// to set the TransitGatewayID.
// +optional
TransitGatewayIDSelector *xpv1.Selector `json:"transitGatewayIdSelector,omitempty"`

// Metadata tagging key value pairs
// +optional
Tags []Tag `json:"tags,omitempty"`
}
18 changes: 16 additions & 2 deletions apis/ec2/v1alpha1/generator-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ ignore:
- TransitGatewayPrefixListReference
- TransitGatewayRouteTable
- TransitGatewayRoute
- TransitGatewayVpcAttachment
- TransitGateway
- VpcEndpointConnectionNotification
- VpcEndpointServiceConfiguration
- VpcEndpoint
Expand All @@ -73,6 +71,22 @@ ignore:
- AcceptVpcPeeringConnectionInput.PeerVPCID
- CreateVolumeInput.DryRun
- CreateVolumeInput.KmsKeyId
- CreateTransitGatewayInput.DryRun
- DeleteTransitGatewayInput.DryRun
- DescribeTransitGatewaysInput.DryRun
- CreateTransitGatewayVpcAttachmentInput.DryRun
- DeleteTransitGatewayVpcAttachmentInput.DryRun
- DescribeTransitGatewayVpcAttachmentsInput.DryRun
- RejectTransitGatewayVpcAttachmentInput.DryRun
- AcceptTransitGatewayVpcAttachmentInput.DryRun
- ModifyTransitGatewayVpcAttachmentInput.DryRun
- CreateTransitGatewayVpcAttachmentInput.VpcId
- CreateTransitGatewayVpcAttachmentInput.SubnetIds
- CreateTransitGatewayVpcAttachmentInput.TransitGatewayId
- ModifyTransitGatewayOptions.PropagationDefaultRouteTableId
- ModifyTransitGatewayOptions.AssociationDefaultRouteTableId
- ModifyTransitGatewayOptions.AddTransitGatewayCidrBlocks
- ModifyTransitGatewayOptions.RemoveTransitGatewayCidrBlocks
resources:
Volume:
exceptions:
Expand Down
62 changes: 0 additions & 62 deletions apis/ec2/v1alpha1/referencers.go

This file was deleted.

Loading

0 comments on commit 0fc4390

Please sign in to comment.