Skip to content

Commit 99668cb

Browse files
authored
fix: Fix nil pointer in Cluster (#1358)
1 parent 62e2ed1 commit 99668cb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cfn-resources/cluster/cmd/resource/mappings.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ func expandLabelSlice(labels []Labels) *[]admin.ComponentLabel {
201201
key = *labels[i].Key
202202
}
203203
var value string
204-
if labels[i].Key != nil {
204+
if labels[i].Value != nil {
205205
value = *labels[i].Value
206206
}
207207
res[i] = admin.ComponentLabel{
@@ -601,7 +601,9 @@ func setClusterRequest(currentModel *Model) (*admin.AdvancedClusterDescription,
601601

602602
clusterRequest.TerminationProtectionEnabled = currentModel.TerminationProtectionEnabled
603603

604-
clusterRequest.AdvancedConfiguration = expandClusterAdvancedConfiguration(*currentModel.AdvancedSettings)
604+
if currentModel.AdvancedSettings != nil {
605+
clusterRequest.AdvancedConfiguration = expandClusterAdvancedConfiguration(*currentModel.AdvancedSettings)
606+
}
605607
return clusterRequest, nil
606608
}
607609

0 commit comments

Comments
 (0)