File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ def __init__(
7070 self .destination_role : str = self .config .active_config .get (
7171 "destination_role" , ""
7272 )
73+ self .subnet_id : str = self .config .active_config .get ("subnet_id" , "" )
74+ self .security_group_id : str = self .config .active_config .get (
75+ "security_group_id" , ""
76+ )
7377 self .target_machines : List [str ] = self .config .active_config .get (
7478 "machines" , ""
7579 ).split ("," )
@@ -487,6 +491,10 @@ def update_blueprint(self) -> bool:
487491 )
488492 blueprint ["disks" ] = new_disks
489493
494+ # Update launch subnets and SG IDs
495+ blueprint ["subnetIDs" ] = [self .subnet_id ]
496+ blueprint ["securityGroupIDs" ] = [self .security_group_id ]
497+
490498 # Update machine tags
491499 blueprint ["tags" ] = [
492500 {
@@ -517,6 +525,7 @@ def update_blueprint(self) -> bool:
517525 "Blueprint update failure encountered for machine:" ,
518526 f"({ _machine_name } ) - { result .status_code } fix blueprint settings!" ,
519527 )
528+ print (blueprint )
520529 else :
521530 print ("Blueprint for machine: " + _machine_name + " updated!" )
522531 except Exception as e :
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ class CloudEndureConfig:
3535 "destination_account" : "" ,
3636 "destination_kms" : "" ,
3737 "destination_role" : "" ,
38+ "subnet_id" : "" ,
39+ "security_group_id" : "" ,
3840 "disk_type" : "SSD" ,
3941 "public_ip" : "DONT_ALLOCATE" ,
4042 }
You can’t perform that action at this time.
0 commit comments