Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. AWSTemplateFormatVersion: 2010-09-09
  2. Description: Hasura PMDM Security Groups
  3.  
  4. Parameters:
  5. VPC:
  6. Default: "vpc-0ccc598dd0737f34a"
  7. Description: VPC
  8. Type: AWS::EC2::VPC::Id
  9.  
  10. Resources:
  11. HasuraPmdmLoadBalancerSG:
  12. Type: AWS::EC2::SecurityGroup
  13. Properties:
  14. GroupDescription: Access to the ELB
  15. VpcId: !Ref 'VPC'
  16. SecurityGroupIngress:
  17. - CidrIp: 130.164.0.0/17
  18. FromPort: 8080
  19. ToPort: 8080
  20. IpProtocol: tcp
  21. - CidrIp: 10.0.0.0/8
  22. FromPort: 8080
  23. ToPort: 8080
  24. IpProtocol: tcp
  25. - CidrIp: 172.16.0.0/12
  26. FromPort: 8080
  27. ToPort: 8080
  28. IpProtocol: tcp
  29.  
  30. FargateContainerSecurityGroup:
  31. Type: AWS::EC2::SecurityGroup
  32. Properties:
  33. GroupDescription: Access to the Fargate containers
  34. VpcId: !Ref 'VPC'
  35.  
  36. EcsSecurityGroupIngressFromELB:
  37. Type: AWS::EC2::SecurityGroupIngress
  38. Properties:
  39. Description: Ingress from the ELB
  40. GroupId: !Ref 'FargateContainerSecurityGroup'
  41. IpProtocol: -1
  42. SourceSecurityGroupId: !Ref HasuraPmdmLoadBalancerSG
  43.  
  44. EcsSecurityGroupIngressFromSelf:
  45. Type: AWS::EC2::SecurityGroupIngress
  46. Properties:
  47. Description: Ingress from other containers in the same security group
  48. GroupId: !Ref 'FargateContainerSecurityGroup'
  49. IpProtocol: -1
  50. SourceSecurityGroupId: !Ref FargateContainerSecurityGroup
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement