quickstart-cisco-asav-ravpn-common.yaml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. AWSTemplateFormatVersion: 2010-09-09
  2. Description: >-
  3. Cisco Systems - Creates hostedzone, Mgmt route table, and SG. (qs-1qp7e9tna)
  4. Metadata:
  5. ParameterLabels:
  6. VPCID:
  7. default: VPC ID
  8. DnsName:
  9. default: Dns name
  10. SSHLockDownCIDR:
  11. default: SSH Lockdown CIDR
  12. Parameters:
  13. DnsName:
  14. Type: String
  15. Description: DNS name of PublicHostedZone
  16. VPCID:
  17. Type: AWS::EC2::VPC::Id
  18. Description: Select VPC which ASAv will be deployed in
  19. SSHLockDownCIDR:
  20. AllowedPattern: >-
  21. ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|1[6-9]|2[0-8]))$
  22. ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/0-28
  23. Description: CIDR block for locking down the SSH access on the outside interface
  24. Type: String
  25. Resources:
  26. PublicHostedZone:
  27. Type: "AWS::Route53::HostedZone"
  28. Properties:
  29. HostedZoneConfig:
  30. Comment: 'Hosted zone'
  31. Name: !Ref DnsName
  32. HostedZoneTags:
  33. -
  34. Key: 'Name'
  35. Value: 'ASAvHostedZone'
  36. MgmtRouteTable:
  37. Type: AWS::EC2::RouteTable
  38. Properties:
  39. VpcId: !Ref VPCID
  40. Tags:
  41. - Key: Name
  42. Value: MGMT subnet Route Table
  43. ASAvInstanceSGMGMT:
  44. Type: AWS::EC2::SecurityGroup
  45. Properties:
  46. GroupDescription: Security Group for ASAv Instances
  47. VpcId: !Ref VPCID
  48. Tags:
  49. - Key: Name
  50. Value: "ASAvSecurityGroup"
  51. SecurityGroupIngress:
  52. - IpProtocol: "TCP"
  53. FromPort: 443
  54. ToPort: 443
  55. CidrIp: 0.0.0.0/0
  56. - IpProtocol: "TCP"
  57. FromPort: 22
  58. ToPort: 22
  59. CidrIp: 0.0.0.0/0
  60. - IpProtocol: "TCP"
  61. FromPort: 80
  62. ToPort: 80
  63. CidrIp: 0.0.0.0/0
  64. ASAvInstanceSGINSIDE:
  65. Type: AWS::EC2::SecurityGroup
  66. Properties:
  67. GroupDescription: Security Group for ASAv Instances
  68. VpcId: !Ref VPCID
  69. Tags:
  70. - Key: Name
  71. Value: "ASAvSecurityGroup"
  72. SecurityGroupIngress:
  73. - IpProtocol: "-1"
  74. FromPort: 0
  75. ToPort: 65535
  76. CidrIp: 0.0.0.0/0
  77. ASAvInstanceSGOUTSIDE:
  78. Type: AWS::EC2::SecurityGroup
  79. Properties:
  80. GroupDescription: Security Group for ASAv Instances
  81. VpcId: !Ref VPCID
  82. Tags:
  83. - Key: Name
  84. Value: "ASAvSecurityGroup"
  85. SecurityGroupIngress:
  86. - IpProtocol: "TCP"
  87. FromPort: 443
  88. ToPort: 443
  89. CidrIp: 0.0.0.0/0
  90. - IpProtocol: "UDP"
  91. FromPort: 443
  92. ToPort: 443
  93. CidrIp: 0.0.0.0/0
  94. - IpProtocol: "TCP"
  95. FromPort: 22
  96. ToPort: 22
  97. CidrIp: !Ref SSHLockDownCIDR
  98. Outputs:
  99. PublicHostedZone:
  100. Value: !Ref 'PublicHostedZone'
  101. MgmtRouteTable:
  102. Value: !Ref 'MgmtRouteTable'
  103. ASAvInstanceSGMGMT:
  104. Value: !Ref 'ASAvInstanceSGMGMT'
  105. ASAvInstanceSGOUTSIDE:
  106. Value: !Ref 'ASAvInstanceSGOUTSIDE'
  107. ASAvInstanceSGINSIDE:
  108. Value: !Ref 'ASAvInstanceSGINSIDE'