Security Group
SSH·HTTP·HTTPS 접속을 허용하는 Security Group
Security Group을 생성하고 SSH(22), HTTP(80), HTTPS(443) 인바운드 규칙을 추가합니다.
- 입력이 필요한 파라미터는 없으며, 모든 파라미터에 기본값이 있습니다.
주의
IngressCidr의 기본값은
0.0.0.0/0으로 모든 IP에서 접근을 허용합니다. 사용 환경에 맞게 허용할 IP 대역으로 제한하세요.배경색 변경
SCPTemplateFormatVersion: '2026-01-01'
Description: 'Security Group 및 인바운드 규칙 템플릿'
Parameters:
SecurityGroupName:
Type: String
Default: 'sample-security-group'
Description: 'Security Group 이름을 입력하세요. (1~255자)'
IngressCidr:
Type: String
Default: '0.0.0.0/0'
Description: 'SSH/HTTP/HTTPS 인바운드 트래픽을 허용할 IP 대역(CIDR)을 입력하세요.'
Resources:
SecurityGroup:
Type: SCP::SecurityGroup::SecurityGroup
Properties:
Name: !Ref SecurityGroupName
SshIngressRule:
Type: SCP::SecurityGroup::SecurityGroupRule
Properties:
SecurityGroupId: !Ref SecurityGroup
Direction: ingress
Ethertype: IPv4
Protocol: tcp
PortRangeMin: 22
PortRangeMax: 22
RemoteIpPrefix: !Ref IngressCidr
WebIngressRule:
Type: SCP::SecurityGroup::SecurityGroupRule
Properties:
SecurityGroupId: !Ref SecurityGroup
Direction: ingress
Ethertype: IPv4
Protocol: tcp
PortRangeMin: 80
PortRangeMax: 80
RemoteIpPrefix: !Ref IngressCidr
HttpsIngressRule:
Type: SCP::SecurityGroup::SecurityGroupRule
Properties:
SecurityGroupId: !Ref SecurityGroup
Direction: ingress
Ethertype: IPv4
Protocol: tcp
PortRangeMin: 443
PortRangeMax: 443
RemoteIpPrefix: !Ref IngressCidr
Outputs:
SecurityGroupId:
Description: '생성된 Security Group의 ID입니다.'
Value: !Ref SecurityGroup
SshIngressRuleId:
Description: '생성된 SSH 인바운드 규칙의 ID입니다.'
Value: !Ref SshIngressRuleSCPTemplateFormatVersion: '2026-01-01'
Description: 'Security Group 및 인바운드 규칙 템플릿'
Parameters:
SecurityGroupName:
Type: String
Default: 'sample-security-group'
Description: 'Security Group 이름을 입력하세요. (1~255자)'
IngressCidr:
Type: String
Default: '0.0.0.0/0'
Description: 'SSH/HTTP/HTTPS 인바운드 트래픽을 허용할 IP 대역(CIDR)을 입력하세요.'
Resources:
SecurityGroup:
Type: SCP::SecurityGroup::SecurityGroup
Properties:
Name: !Ref SecurityGroupName
SshIngressRule:
Type: SCP::SecurityGroup::SecurityGroupRule
Properties:
SecurityGroupId: !Ref SecurityGroup
Direction: ingress
Ethertype: IPv4
Protocol: tcp
PortRangeMin: 22
PortRangeMax: 22
RemoteIpPrefix: !Ref IngressCidr
WebIngressRule:
Type: SCP::SecurityGroup::SecurityGroupRule
Properties:
SecurityGroupId: !Ref SecurityGroup
Direction: ingress
Ethertype: IPv4
Protocol: tcp
PortRangeMin: 80
PortRangeMax: 80
RemoteIpPrefix: !Ref IngressCidr
HttpsIngressRule:
Type: SCP::SecurityGroup::SecurityGroupRule
Properties:
SecurityGroupId: !Ref SecurityGroup
Direction: ingress
Ethertype: IPv4
Protocol: tcp
PortRangeMin: 443
PortRangeMax: 443
RemoteIpPrefix: !Ref IngressCidr
Outputs:
SecurityGroupId:
Description: '생성된 Security Group의 ID입니다.'
Value: !Ref SecurityGroup
SshIngressRuleId:
Description: '생성된 SSH 인바운드 규칙의 ID입니다.'
Value: !Ref SshIngressRule