Iam cloudformation update, singificant cloudformation refactoring (#3218)
* IAM User Cloudformation Enhancements: update, delete, getatt. * AWS::IAM::Policy Support * Added unit tests for AWS:IAM:Policy for roles and groups. Fixed bug related to groups. * AWS:IAM:AccessKey CloudFormation support. * Refactor of CloudFormation parsing.py methods to simplify and standardize how they call to the models. Adjusted some models accordingly. * Further model CloudFormation support changes to align with revised CloudFormation logic. Mostly avoidance of getting resoure name from properties. * Support for Kinesis Stream RetentionPeriodHours param. * Kinesis Stream Cloudformation Tag Support. * Added omitted 'region' param to boto3.client() calls in new tests. Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
This commit is contained in:
parent
3b06ce689e
commit
49d92861c0
25 changed files with 1912 additions and 318 deletions
|
|
@ -160,7 +160,6 @@ class FakeTargetGroup(CloudFormationModel):
|
|||
|
||||
elbv2_backend = elbv2_backends[region_name]
|
||||
|
||||
name = properties.get("Name")
|
||||
vpc_id = properties.get("VpcId")
|
||||
protocol = properties.get("Protocol")
|
||||
port = properties.get("Port")
|
||||
|
|
@ -175,7 +174,7 @@ class FakeTargetGroup(CloudFormationModel):
|
|||
target_type = properties.get("TargetType")
|
||||
|
||||
target_group = elbv2_backend.create_target_group(
|
||||
name=name,
|
||||
name=resource_name,
|
||||
vpc_id=vpc_id,
|
||||
protocol=protocol,
|
||||
port=port,
|
||||
|
|
@ -437,13 +436,12 @@ class FakeLoadBalancer(CloudFormationModel):
|
|||
|
||||
elbv2_backend = elbv2_backends[region_name]
|
||||
|
||||
name = properties.get("Name", resource_name)
|
||||
security_groups = properties.get("SecurityGroups")
|
||||
subnet_ids = properties.get("Subnets")
|
||||
scheme = properties.get("Scheme", "internet-facing")
|
||||
|
||||
load_balancer = elbv2_backend.create_load_balancer(
|
||||
name, security_groups, subnet_ids, scheme=scheme
|
||||
resource_name, security_groups, subnet_ids, scheme=scheme
|
||||
)
|
||||
return load_balancer
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue