|
8 | 8 | import json |
9 | 9 | import os |
10 | 10 | import pprint |
11 | | -from datetime import datetime, timezone |
12 | 11 | from typing import Any, Dict, List |
13 | 12 |
|
14 | 13 | import boto3 |
@@ -67,6 +66,7 @@ def __init__( |
67 | 66 | if self.subnet_id and not self.private_ip_action: |
68 | 67 | self.private_ip_action = "CREATE_NEW" |
69 | 68 | self.security_group_id: str = self.config.active_config.get("security_group_id", "") |
| 69 | + self.iam_role: str = self.config.active_config.get("iam_role", "") |
70 | 70 | self.target_machines: List[str] = self.config.active_config.get("machines", "").split(",") |
71 | 71 | self.target_machines = [x.upper() for x in self.target_machines] |
72 | 72 | self.target_instance_types: List[str] = self.config.active_config.get("instance_types", "").split(",") |
@@ -448,8 +448,7 @@ def check_licenses(self) -> Dict[str, Any]: |
448 | 448 | return response_dict |
449 | 449 |
|
450 | 450 | def get_machine_sync_details(self) -> List[Any]: |
451 | | - """Checks CloudEndure Project inventory and returns register machine's |
452 | | - replication state. |
| 451 | + """Checks CloudEndure Project inventory and returns register machine replication state. |
453 | 452 | """ |
454 | 453 | response_list: List[Any] = [] |
455 | 454 | print(f"INFO: Retreiving sync status for all machines in Project: ({self.project_name})") |
@@ -557,6 +556,8 @@ def update_blueprint(self) -> bool: |
557 | 556 | blueprint["privateIPAction"] = self.private_ip_action |
558 | 557 | if self.security_group_id: |
559 | 558 | blueprint["securityGroupIDs"] = [self.security_group_id] |
| 559 | + if self.iam_role: |
| 560 | + blueprint["iamRole"] = self.iam_role |
560 | 561 |
|
561 | 562 | instance_type = self.target_instances.get(_machine_name, "") |
562 | 563 | if instance_type: |
|
0 commit comments