@@ -204,14 +204,13 @@ func createFirewallRules(ctx context.Context, in clusterapi.InfraReadyInput, net
204204 projectID := in .InstallConfig .Config .Platform .GCP .ProjectID
205205 if in .InstallConfig .Config .GCP .NetworkProjectID != "" {
206206 projectID = in .InstallConfig .Config .GCP .NetworkProjectID
207-
208- createFwRules , err := gcpconfig .HasPermissions (ctx , projectID , []string {gcpconfig .CreateGCPFirewallPermission }, in .InstallConfig .Config .GCP .ServiceEndpoints )
209- if err != nil {
210- return fmt .Errorf ("failed to create cluster firewall rules: %w" , err )
211- }
212- if ! createFwRules {
213- return nil
214- }
207+ }
208+ createFwRules , err := gcpconfig .HasPermissions (ctx , projectID , []string {gcpconfig .CreateGCPFirewallPermission }, in .InstallConfig .Config .GCP .ServiceEndpoints )
209+ if err != nil {
210+ return fmt .Errorf ("failed to create cluster firewall rules: %w" , err )
211+ }
212+ if ! createFwRules {
213+ return nil
215214 }
216215
217216 svc , err := gcpconfig .GetComputeService (ctx , in .InstallConfig .Config .GCP .ServiceEndpoints )
@@ -292,14 +291,13 @@ func createBootstrapFirewallRules(ctx context.Context, in clusterapi.InfraReadyI
292291 projectID := in .InstallConfig .Config .Platform .GCP .ProjectID
293292 if in .InstallConfig .Config .Platform .GCP .NetworkProjectID != "" {
294293 projectID = in .InstallConfig .Config .Platform .GCP .NetworkProjectID
295-
296- createFwRules , err := gcpconfig .HasPermissions (ctx , projectID , []string {gcpconfig .CreateGCPFirewallPermission }, in .InstallConfig .Config .GCP .ServiceEndpoints )
297- if err != nil {
298- return fmt .Errorf ("failed to create bootstrap firewall rules: %w" , err )
299- }
300- if ! createFwRules {
301- return nil
302- }
294+ }
295+ createFwRules , err := gcpconfig .HasPermissions (ctx , projectID , []string {gcpconfig .CreateGCPFirewallPermission }, in .InstallConfig .Config .GCP .ServiceEndpoints )
296+ if err != nil {
297+ return fmt .Errorf ("failed to create bootstrap firewall rules: %w" , err )
298+ }
299+ if ! createFwRules {
300+ return nil
303301 }
304302
305303 svc , err := gcpconfig .GetComputeService (ctx , in .InstallConfig .Config .GCP .ServiceEndpoints )
0 commit comments