Skip to content

Commit

Permalink
Fix EC2::TransitGatewayMulticastDomain.Options conflict
Browse files Browse the repository at this point in the history
Use MulticastDomainOptions for EC2::TransitGatewayMulticastDomain.Options.
  • Loading branch information
markpeek committed Oct 22, 2023
1 parent 107b5e6 commit e779387
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
18 changes: 18 additions & 0 deletions scripts/patches/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,30 @@ def targetgroupconfig_patches():
return patches


def transitgatewaymulicast_patches():
patches = [
{
"op": "move",
"from": "/PropertyTypes/AWS::EC2::TransitGatewayMulticastDomain.Options",
"path": "/PropertyTypes/AWS::EC2::TransitGatewayMulticastDomain.MulticastDomainOptions",
},
{
"op": "replace",
"path": "/ResourceTypes/AWS::EC2::TransitGatewayMulticastDomain/Properties/Options/Type",
"value": "MulticastDomainOptions",
},
]

return patches


patches = (
tagspecification_patches()
+ blockdevice_patches()
+ launchspecification_patches()
+ networkinterfaces_patches()
+ targetgroupconfig_patches()
+ transitgatewaymulicast_patches()
+ networkinsightsanalysis_patches()
+ [
# backward compatibility - a combined SecurityGroupRule was used for both Egress and Ingress
Expand Down
14 changes: 13 additions & 1 deletion troposphere/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2490,6 +2490,18 @@ class TransitGatewayConnect(AWSObject):
}


class MulticastDomainOptions(AWSProperty):
"""
`MulticastDomainOptions <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-transitgatewaymulticastdomain-options.html>`__
"""

props: PropsDictType = {
"AutoAcceptSharedAssociations": (str, False),
"Igmpv2Support": (str, False),
"StaticSourcesSupport": (str, False),
}


class TransitGatewayMulticastDomain(AWSObject):
"""
`TransitGatewayMulticastDomain <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewaymulticastdomain.html>`__
Expand All @@ -2498,7 +2510,7 @@ class TransitGatewayMulticastDomain(AWSObject):
resource_type = "AWS::EC2::TransitGatewayMulticastDomain"

props: PropsDictType = {
"Options": (Options, False),
"Options": (MulticastDomainOptions, False),
"Tags": (Tags, False),
"TransitGatewayId": (str, True),
}
Expand Down

0 comments on commit e779387

Please sign in to comment.