community / community.general / 2.5.9 / module / hwc_vpc_security_group Creates a resource of Vpc/SecurityGroup in Huawei Cloud | "added in version" 0.2.0 of community.general" Authors: Huawei Inc. (@huaweicloud)community.general.hwc_vpc_security_group (2.5.9) — module
Install with ansible-galaxy collection install community.general:==2.5.9
collections: - name: community.general version: 2.5.9
vpc security group management.
# create a security group - name: Create a security group community.general.hwc_vpc_security_group: name: "ansible_network_security_group_test"
id: description: - The id of resource to be managed. type: str name: description: - Specifies the security group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores C(_), hyphens (-), and periods (.). required: true type: str user: description: - The user name to login with (currently only user names are supported, and not user IDs). required: true type: str state: choices: - present - absent default: present description: - Whether the given object should exist in Huawei Cloud. type: str domain: description: - The name of the Domain to scope to (Identity v3). (currently only domain names are supported, and not domain IDs). required: true type: str region: description: - The region to which the project belongs. type: str vpc_id: description: - Specifies the resource ID of the VPC to which the security group belongs. required: false type: str project: description: - The name of the Tenant (Identity v2) or Project (Identity v3). (currently only project names are supported, and not project IDs). required: true type: str password: description: - The password to login with. required: true type: str identity_endpoint: description: - The Identity authentication URL. required: true type: str enterprise_project_id: default: 0 description: - Specifies the enterprise project ID. When creating a security group, associate the enterprise project ID with the security group.s required: false type: str
enterprise_project_id: description: - Specifies the enterprise project ID. When creating a security group, associate the enterprise project ID with the security group. returned: success type: str name: description: - Specifies the security group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores C(_), hyphens (-), and periods (.). returned: success type: str rules: contains: description: description: - Provides supplementary information about the security group rule. returned: success type: str direction: description: - Specifies the direction of access control. The value can be egress or ingress. returned: success type: str ethertype: description: - Specifies the IP protocol version. The value can be IPv4 or IPv6. returned: success type: str id: description: - Specifies the security group rule ID. returned: success type: str port_range_max: description: - Specifies the end port number. The value ranges from 1 to 65535. If the protocol is not icmp, the value cannot be smaller than the port_range_min value. An empty value indicates all ports. returned: success type: int port_range_min: description: - Specifies the start port number. The value ranges from 1 to 65535. The value cannot be greater than the port_range_max value. An empty value indicates all ports. returned: success type: int protocol: description: - Specifies the protocol type. The value can be icmp, tcp, udp, or others. If the parameter is left blank, the security group supports all protocols. returned: success type: str remote_address_group_id: description: - Specifies the ID of remote IP address group. returned: success type: str remote_group_id: description: - Specifies the ID of the peer security group. returned: success type: str remote_ip_prefix: description: - Specifies the remote IP address. If the access control direction is set to egress, the parameter specifies the source IP address. If the access control direction is set to ingress, the parameter specifies the destination IP address. returned: success type: str description: - Specifies the security group rule, which ensures that resources in the security group can communicate with one another. returned: success type: complex vpc_id: description: - Specifies the resource ID of the VPC to which the security group belongs. returned: success type: str