Skip to content

Instantly share code, notes, and snippets.

@msato0731
Created June 19, 2018 22:24
Show Gist options
  • Save msato0731/3f77ce54d85a9156f3d7bebdfcaadae7 to your computer and use it in GitHub Desktop.
Save msato0731/3f77ce54d85a9156f3d7bebdfcaadae7 to your computer and use it in GitHub Desktop.
AWS_SG_Cloudformation_addOutboud.yaml
AWSTemplateFormatVersion: 2010-09-09
Resources:
VPC:
Type: 'AWS::EC2::VPC'
Properties:
CidrBlock: 172.16.0.0/16
EnableDnsSupport: true
EnableDnsHostnames: true
InstanceTenancy: default
Tags:
- Key: Name
Value: TestVpc
SecurityGroupForWebServer:
Type: 'AWS::EC2::SecurityGroup'
Properties:
GroupName: RDS-SG
GroupDescription: >-
RDS SecurityGroup Test
SecurityGroupIngress:
- CidrIp: 0.0.0.0/0
Description: MySQL
IpProtocol: tcp
FromPort: 3306
ToPort: 3306
SecurityGroupEgress:
- CidrIp: 127.0.0.1/32
IpProtocol: "-1"
VpcId: !Ref VPC
Tags:
- Key: Name
Value: RDS-SG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment