Skip to content

Commit

Permalink
Merge pull request #576 from cloudify-cosmo/3.2.3-build
Browse files Browse the repository at this point in the history
3.2.3 build
  • Loading branch information
EarthmanT committed Dec 12, 2023
2 parents c379cab + 3e5d571 commit e5bb3a2
Show file tree
Hide file tree
Showing 10 changed files with 15,047 additions and 14,953 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
3.2.3: NE-12058-client-config-LoginProfile
3.2.2: NE-10823-aws-VpnGatewayLimitExceeded.
3.2.1: RND-1195 Add Subnet placement logic.
3.2.0: Support ECR.
Expand Down
2 changes: 1 addition & 1 deletion cloudify_aws/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '3.2.2'
version = '3.2.3'
16 changes: 15 additions & 1 deletion cloudify_aws/iam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@
# Cloudify AWS
from cloudify_aws.common import AWSResourceBase
from cloudify_aws.common.connection import Boto3Connection
from cloudify_aws.common import utils
from cloudify import ctx

# pylint: disable=R0903
ACCESS_KEY_CONFIGURE = 'cloudify_aws.iam.resources.access_key.configure'
IAM_USER = 'cloudify.nodes.aws.iam.User'
IAM_ACCESS = 'cloudify.nodes.aws.iam.AccessKey'


class IAMBase(AWSResourceBase):
Expand All @@ -31,7 +36,16 @@ def __init__(self, ctx_node, resource_id=None, client=None, logger=None):
AWSResourceBase.__init__(
self, client or Boto3Connection(ctx_node).client('iam'),
resource_id=resource_id, logger=logger)
self.account_id = Boto3Connection(ctx_node).get_account_id()

if IAM_ACCESS in ctx_node.type_hierarchy:
if (ctx.operation.name == ACCESS_KEY_CONFIGURE):
targ = utils.find_rel_by_node_type(ctx.instance, IAM_USER)
aws_config = targ.target.node.properties.get('client_config')
boto3_connection = Boto3Connection(ctx_node,
aws_config=aws_config)
self.account_id = boto3_connection.get_account_id()
else:
self.account_id = Boto3Connection(ctx_node).get_account_id()

@property
def properties(self):
Expand Down
5 changes: 3 additions & 2 deletions examples/iam-feature-demo/blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ node_templates:
pmcfy_iam_user_login_profile:
type: cloudify.nodes.aws.iam.LoginProfile
properties:
client_config: *client_config
resource_config:
UserName: !!str PMCfy=,.@-User
Password: !!str Cl0ud1fy2017!
Expand All @@ -93,7 +94,7 @@ node_templates:
client_config: *client_config
resource_config:
UserName: !!str CloudifyUser=,.@-Test
Path: !!str /!"#$%&'()*+,-.0123456789:;<=>?@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~/
Path: !!str /abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/
relationships:
- type: cloudify.relationships.aws.iam.user.connected_to
target: pmcfy_iam_group
Expand All @@ -106,7 +107,7 @@ node_templates:
client_config: *client_config
resource_config:
GroupName: !!str pmcfy_CloudifyGroup
Path: !!str /!"#$%&'()*+,-.0123456789:;<=>?@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~/
Path: !!str /abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/
relationships:
- type: cloudify.relationships.aws.iam.group.connected_to
target: pmcfy_iam_policy_vpc_access
Expand Down
Loading

0 comments on commit e5bb3a2

Please sign in to comment.