Skip to content

Commit dac903c

Browse files
authored
Merge pull request crossplane-contrib#2207 from rayshoo/master
fix(crd/ec2/instance): Remove unnecessary required fields to enable use of launchTemplate
2 parents a245923 + 4ed4c55 commit dac903c

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

apis/ec2/manualv1alpha1/common.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,10 +640,12 @@ type LicenseConfigurationRequest struct {
640640
// name in the request, but not both.
641641
type LaunchTemplateSpecification struct {
642642
// The ID of the launch template.
643-
LaunchTemplateID *string `json:"launchTemplateId"`
643+
// +optional
644+
LaunchTemplateID *string `json:"launchTemplateId,omitempty"`
644645

645646
// The name of the launch template.
646-
LaunchTemplateName *string `json:"launchTemplateName"`
647+
// +optional
648+
LaunchTemplateName *string `json:"launchTemplateName,omitempty"`
647649

648650
// The version number of the launch template.
649651
//

apis/ec2/manualv1alpha1/instances_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ type InstanceParameters struct {
107107

108108
// The ID of the AMI. An AMI ID is required to launch an instance and must be
109109
// specified here or in a launch template.
110-
ImageID *string `json:"imageId"`
110+
// +optional
111+
ImageID *string `json:"imageId,omitempty"`
111112

112113
// Indicates whether an instance stops or terminates when you initiate shutdown
113114
// from the instance (using the operating system command for system shutdown).

package/crds/ec2.aws.crossplane.io_instances.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,9 +604,6 @@ spec:
604604
605605
Default: The default version for the launch template.
606606
type: string
607-
required:
608-
- launchTemplateId
609-
- launchTemplateName
610607
type: object
611608
licenseSpecifications:
612609
description: The Amazon Resource Name (ARN) of the license configuration
@@ -1221,7 +1218,6 @@ spec:
12211218
pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
12221219
type: string
12231220
required:
1224-
- imageId
12251221
- region
12261222
type: object
12271223
managementPolicies:

0 commit comments

Comments
 (0)