File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -445,6 +445,19 @@ func writeConfig() {
445
445
deploymentID := m .Deployment .UniqueID
446
446
deploymentPath := fmt .Sprintf ("deployments.%s" , deploymentID )
447
447
448
+ // Save VPC information for each region
449
+ regions := make (map [string ]interface {})
450
+ if m .Deployment .AWS != nil && m .Deployment .AWS .RegionalResources != nil {
451
+ for region , vpc := range m .Deployment .AWS .RegionalResources .VPCs {
452
+ if vpc != nil {
453
+ regions [region ] = map [string ]interface {}{
454
+ "vpc_id" : vpc .VPCID ,
455
+ "security_group_id" : vpc .SecurityGroupID ,
456
+ }
457
+ }
458
+ }
459
+ }
460
+
448
461
// Save minimal deployment details
449
462
machines := make (map [string ]interface {})
450
463
for name , machine := range m .Deployment .GetMachines () {
@@ -460,6 +473,7 @@ func writeConfig() {
460
473
"provider" : "aws" ,
461
474
"aws" : map [string ]interface {}{
462
475
"account_id" : m .Deployment .AWS .AccountID ,
476
+ "regions" : regions ,
463
477
},
464
478
"machines" : machines ,
465
479
})
You can’t perform that action at this time.
0 commit comments