-
-
Save monkey-codes/2ad23361ee84d90ea6ee58b6c3429885 to your computer and use it in GitHub Desktop.
Fargate cluster security group
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Resources: | |
| ... | |
| FargateContainerSecurityGroup: | |
| Type: AWS::EC2::SecurityGroup | |
| Properties: | |
| GroupDescription: Access to the Fargate containers | |
| VpcId: {'Fn::ImportValue': !Sub '${NetworkStackName}:VpcId'} | |
| FargateSecurityGroupIngressFromPublicALB: | |
| Type: AWS::EC2::SecurityGroupIngress | |
| Properties: | |
| Description: Ingress from the public ALB | |
| GroupId: !Ref 'FargateContainerSecurityGroup' | |
| IpProtocol: -1 | |
| SourceSecurityGroupId: {'Fn::ImportValue': !Sub '${ALBStackName}:ALBSecurityGroup'} | |
| FargateSecurityGroupIngressFromSelf: | |
| Type: AWS::EC2::SecurityGroupIngress | |
| Properties: | |
| Description: Ingress from other containers in the same security group | |
| GroupId: !Ref 'FargateContainerSecurityGroup' | |
| IpProtocol: -1 | |
| SourceSecurityGroupId: !Ref 'FargateContainerSecurityGroup' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment