1
+ // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License"). You may
4
+ // not use this file except in compliance with the License. A copy of the
5
+ // License is located at
6
+ //
7
+ // http://aws.amazon.com/apache2.0/
8
+ //
9
+ // or in the "license" file accompanying this file. This file is distributed
10
+ // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11
+ // express or implied. See the License for the specific language governing
12
+ // permissions and limitations under the License.
13
+
1
14
package launch_template
2
15
3
16
import (
@@ -21,7 +34,7 @@ func (rm *resourceManager) findLaunchTemplateVersion(
21
34
ko * svcapitypes.LaunchTemplate ,
22
35
) (err error ) {
23
36
rlog := ackrtlog .FromContext (ctx )
24
- exit := rlog .Trace ("rm.describeLaunchTemplateVersion " )
37
+ exit := rlog .Trace ("rm.findLaunchTemplateVersion " )
25
38
defer func () {
26
39
exit (err )
27
40
}()
@@ -690,8 +703,8 @@ func newListLaunchTemplateVersionRequestPayload(
690
703
r * resource ,
691
704
) (* svcsdk.DescribeLaunchTemplateVersionsInput , error ) {
692
705
res := & svcsdk.DescribeLaunchTemplateVersionsInput {}
693
- if r .ko .Spec . Name != nil {
694
- res .LaunchTemplateName = r .ko .Spec . Name
706
+ if r .ko .Status . ID != nil {
707
+ res .LaunchTemplateId = r .ko .Status . ID
695
708
}
696
709
if r .ko .Spec .DefaultVersion != nil {
697
710
res .Versions = []string {fmt .Sprintf ("%d" , * r .ko .Spec .DefaultVersion )}
@@ -835,7 +848,7 @@ func updateTagSpecificationsInCreateRequest(r *resource,
835
848
}
836
849
837
850
func (rm * resourceManager ) checkForMissingRequiredFields (r * resource ) bool {
838
- return r .ko .Status .ID ! = nil
851
+ return r .ko .Status .ID = = nil
839
852
}
840
853
841
854
var syncTags = tags .Sync
0 commit comments