Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launch Template and Launch Template Version resources added #1041

Merged
merged 2 commits into from
Dec 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apis/ec2/manualv1alpha1/instances_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ type InstanceParameters struct {
// If you specify a network interface, you must specify any security groups
// as part of the network interface.
// +optional
// +crossplane:generate:reference:type=github.com/crossplane/provider-aws/apis/ec2/v1beta1.SecurityGroup
// +crossplane:generate:reference:refFieldName=SecurityGroupRefs
// +crossplane:generate:reference:selectorFieldName=SecurityGroupSelector
SecurityGroupIDs []string `json:"securityGroupIds,omitempty"`

// SecurityGroupsRefs is a list of references to SecurityGroups used to set
Expand All @@ -246,6 +249,7 @@ type InstanceParameters struct {
// If you specify a network interface, you must specify any subnets as part
// of the network interface.
// +optional
// +crossplane:generate:reference:type=github.com/crossplane/provider-aws/apis/ec2/v1beta1.Subnet
SubnetID *string `json:"subnetId,omitempty"`

// SubnetIDRef is a reference to a Subnet used to set the SubnetID.
Expand Down

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

33 changes: 33 additions & 0 deletions apis/ec2/v1alpha1/custom_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,39 @@ import (
xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)

// CustomLaunchTemplateParameters includes the custom fields of LaunchTemplate.
type CustomLaunchTemplateParameters struct {
// Metadata tagging key value pairs
// +optional
Tags []Tag `json:"tags,omitempty"`
}

// CustomLaunchTemplateVersionParameters includes the custom fields of LaunchTemplateVersion.
type CustomLaunchTemplateVersionParameters struct {
// The ID of the Launch Template. You must specify this parameter in the request.
// +crossplane:generate:reference:type=LaunchTemplate
LaunchTemplateID *string `json:"launchTemplateId,omitempty"`
// LaunchTemplateIDRef is a reference to an API used to set
// the LaunchTemplateID.
// +optional
LaunchTemplateIDRef *xpv1.Reference `json:"launchTemplateIdRef,omitempty"`
// LaunchTemplateIDSelector selects references to API used
// to set the LaunchTemplateID.
// +optional
LaunchTemplateIDSelector *xpv1.Selector `json:"launchTemplateIdSelector,omitempty"`
// The Name of the Launch Template. You must specify this parameter in the request.
// +crossplane:generate:reference:type=LaunchTemplate
LaunchTemplateName *string `json:"launchTemplateName,omitempty"`
// LaunchTemplateNameRef is a reference to an API used to set
// the LaunchTemplateName.
// +optional
LaunchTemplateNameRef *xpv1.Reference `json:"launchTemplateNameRef,omitempty"`
// LaunchTemplateNameSelector selects references to API used
// to set the LaunchTemplateName.
// +optional
LaunchTemplateNameSelector *xpv1.Selector `json:"launchTemplateNameSelector,omitempty"`
}

// CustomVolumeParameters contains the additional fields for VolumeParameters.
type CustomVolumeParameters struct {
// The identifier of the AWS Key Management Service (AWS KMS) customer master
Expand Down
20 changes: 18 additions & 2 deletions apis/ec2/v1alpha1/generator-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ ignore:
- InstanceExportTask
- InternetGateway
- KeyPair
- LaunchTemplateVersion
- LaunchTemplate
- LocalGatewayRouteTableVpcAssociation
- LocalGatewayRoute
- ManagedPrefixList
Expand Down Expand Up @@ -101,9 +99,27 @@ ignore:
- CreateVpcEndpointInput.DryRun
- CreateVpcEndpointInput.RouteTableIds
- Subnet.AvailableIpAddressCount
- CreateLaunchTemplateVersionInput.LaunchTemplateId
- DeleteLaunchTemplateVersionInput.LaunchTemplateId
- CreateLaunchTemplateVersionInput.LaunchTemplateName
- DeleteLaunchTemplateVersionInput.LaunchTemplateName
- CreateLaunchTemplateVersionInput.DryRun
- CreateLaunchTemplateVersionInput.ClientToken
- CreateLaunchTemplateInput.DryRun
- CreateLaunchTemplateInput.ClientToken
resources:
Volume:
exceptions:
errors:
404:
code: InvalidVolume.NotFound
LaunchTemplate:
exceptions:
errors:
404:
code: InvalidLaunchTemplateName.NotFoundException
LaunchTemplateVersion:
exceptions:
errors:
404:
code: InvalidLaunchTemplateId.VersionNotFound
Loading