# Security Group

LLMS index: [llms.txt](https://docs.e.samsungsdscloud.com/en/userguide/management/llms.txt)

---

# Security Group that allows SSH·HTTP·HTTPS access {#security-group}

Create a Security Group and add inbound rules for SSH (22), HTTP (80), and HTTPS (443).

* There are no parameters that require input, and all parameters have default values.

> **Caution**: The default value of **IngressCidr** is `0.0.0.0/0`, which allows access from all IPs. Restrict to the allowed IP range that matches your environment.


```yaml
SCPTemplateFormatVersion: '2026-01-01'
Description: 'Security Group and Inbound Rule Template'

Parameters:
  SecurityGroupName:
    Type: String
    Default: 'sample-security-group'
    Description: 'Enter the Security Group name.' (1~255 characters)
  IngressCidr:
    Type: String
    Default: '0.0.0.0/0'
    Description: 'Enter the IP range (CIDR) that will allow inbound SSH/HTTP/HTTPS traffic.'

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: 'The ID of the created Security Group.'
    Value: !Ref SecurityGroup

  SshIngressRuleId:
    Description: 'The ID of the generated SSH inbound rule.'
    Value: !Ref SshIngressRule
```

_Code block. Security Group template that allows SSH·HTTP·HTTPS access_
