Updated on 2023-12-13 GMT+08:00

VPC.SecurityGroup

Element Description

A security group (a logical group) is a collection of access control policies for ECSs that have the same security protection requirements and are mutually trusted in a VPC.

Element Properties

Table 1 Property Description

Property

Required

Descripiton

name

No

Name of the SecurityGroup

Type: string

Value Description: Supports customization, for example, my-securitygroup.

Value Constraint: The value must contain 1 to 64 characters and meet the following requirement: ^[-_a-zA-Z0-9\.]*$

Suggestion: Customize the value.

Relationships Between Elements

Table 2 Relationship description

Description

Target

ContainedIn

VPC.VPC

Return Value

Property

Type

Description

refID

string

Security group instance ID

refName

string

Security group instance name

Blueprint Example

tosca_definitions_version: huaweicloud_tosca_version_1_0
inputs:
  sg-name:
    default: my-security-group
node_templates:
  my-sg:
    type: HuaweiCloud.VPC.SecurityGroup
    properties:
      name:
        get_input: sg-name
outputs:
  sg-id:
    value:
      get_attribute: [my-sg, refID]