Skip to content

Commit

Permalink
Merge pull request #119 from 2ndWatch/add/iam_role_noupdate
Browse files Browse the repository at this point in the history
IAM role blueprint update
  • Loading branch information
selpan authored May 19, 2020
2 parents 3898a3a + ec76e31 commit 8ca7a03
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SHA1 := $$(git log -1 --pretty=%h)
CURRENT_BRANCH := $$(git symbolic-ref -q --short HEAD)
LATEST_TAG := ${REPO_NAME}:latest
GIT_TAG := ${REPO_NAME}:${SHA1}
VERSION := v0.2.9
VERSION := v0.3.0

info: ## Show information about the current git state.
@echo "Github Project: https://github.com/${REPO_NAME}\nCurrent Branch: ${CURRENT_BRANCH}\nSHA1: ${SHA1}\n"
Expand Down
2 changes: 1 addition & 1 deletion cloudendure/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.9"
__version__ = "0.3.0"
7 changes: 4 additions & 3 deletions cloudendure/cloudendure.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import json
import os
import pprint
from datetime import datetime, timezone
from typing import Any, Dict, List

import boto3
Expand Down Expand Up @@ -67,6 +66,7 @@ def __init__(
if self.subnet_id and not self.private_ip_action:
self.private_ip_action = "CREATE_NEW"
self.security_group_id: str = self.config.active_config.get("security_group_id", "")
self.iam_role: str = self.config.active_config.get("iam_role", "")
self.target_machines: List[str] = self.config.active_config.get("machines", "").split(",")
self.target_machines = [x.upper() for x in self.target_machines]
self.target_instance_types: List[str] = self.config.active_config.get("instance_types", "").split(",")
Expand Down Expand Up @@ -448,8 +448,7 @@ def check_licenses(self) -> Dict[str, Any]:
return response_dict

def get_machine_sync_details(self) -> List[Any]:
"""Checks CloudEndure Project inventory and returns register machine's
replication state.
"""Checks CloudEndure Project inventory and returns register machine replication state.
"""
response_list: List[Any] = []
print(f"INFO: Retreiving sync status for all machines in Project: ({self.project_name})")
Expand Down Expand Up @@ -557,6 +556,8 @@ def update_blueprint(self) -> bool:
blueprint["privateIPAction"] = self.private_ip_action
if self.security_group_id:
blueprint["securityGroupIDs"] = [self.security_group_id]
if self.iam_role:
blueprint["iamRole"] = self.iam_role

instance_type = self.target_instances.get(_machine_name, "")
if instance_type:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cloudendure"
version = "0.2.9"
version = "0.3.0"
description = "Python wrapper and CLI for CloudEndure"
authors = ["Mark Beacom <[email protected]>", "Tom Warnock <[email protected]>"]
maintainers = ["Evan Lucchesi <[email protected]>", "Nick Selpa <[email protected]>"]
Expand Down

0 comments on commit 8ca7a03

Please sign in to comment.