Skip to content

Commit

Permalink
Update cmd/beta/aws/create_deployment.go
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
aronchick and coderabbitai[bot] authored Dec 14, 2024
1 parent b37ef74 commit e3a39ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/beta/aws/create_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ func prepareDeployment(
m.Deployment.SetMachines(machines)
m.Deployment.SetLocations(locations)

if m.Deployment.AWS.RegionalResources.VPCs == nil {
m.Deployment.AWS.RegionalResources.VPCs = make(map[string]*models.AWSVPC)
}
if m.Deployment.AWS.RegionalResources.Clients == nil {
m.Deployment.AWS.RegionalResources.Clients = make(map[string]aws_interface.EC2Clienter)
}
for _, machine := range m.Deployment.GetMachines() {
region := machine.GetRegion()
if _, exists := m.Deployment.AWS.RegionalResources.VPCs[region]; !exists {
Expand Down

0 comments on commit e3a39ea

Please sign in to comment.