File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -280,12 +280,19 @@ func (t *TerraformVariables) Generate(parents asset.Parents) error {
280280 workerIAMRoleName = awsMP .IAMRole
281281 }
282282
283+ var securityGroups []string
284+ if mp := installConfig .Config .AWS .DefaultMachinePlatform ; mp != nil {
285+ securityGroups = mp .AdditionalSecurityGroupIDs
286+ }
283287 masterIAMRoleName := ""
284288 if mp := installConfig .Config .ControlPlane ; mp != nil {
285289 awsMP := & aws.MachinePool {}
286290 awsMP .Set (installConfig .Config .AWS .DefaultMachinePlatform )
287291 awsMP .Set (mp .Platform .AWS )
288292 masterIAMRoleName = awsMP .IAMRole
293+ if len (awsMP .AdditionalSecurityGroupIDs ) > 0 {
294+ securityGroups = awsMP .AdditionalSecurityGroupIDs
295+ }
289296 }
290297
291298 // AWS Zones is used to determine which route table the edge zone will be associated.
@@ -294,13 +301,6 @@ func (t *TerraformVariables) Generate(parents asset.Parents) error {
294301 return err
295302 }
296303
297- var securityGroups []string
298- if mp := installConfig .Config .ControlPlane ; mp != nil {
299- if mp .Platform .AWS != nil {
300- securityGroups = append (securityGroups , mp .Platform .AWS .AdditionalSecurityGroupIDs ... )
301- }
302- }
303-
304304 data , err := awstfvars .TFVars (awstfvars.TFVarsSources {
305305 VPC : vpc ,
306306 PrivateSubnets : privateSubnets ,
You can’t perform that action at this time.
0 commit comments