Network Security Group Firewall Rule
Creates and manages IonosCloud Network Security Group Firewall Rule.
Manages a Network Security Group Rule on IonosCloud.
Example Usage
Argument Reference
The following arguments are supported:
nsg_id
- (Required)[string] The ID of a Network Security Group.datacenter_id
- (Required)[string] The ID of a Virtual Data Center.name
- (Optional)[string] The name of the Network Security Group.protocol
- (Required)[string] The protocol for the rule: TCP, UDP, ICMP, ANY. Property cannot be modified after creation (disallowed in update requests).name
- (Optional)[string] The name of the firewall rule.source_mac
- (Optional)[string] Only traffic originating from the respective MAC address is allowed. Valid format: aa:bb:cc:dd:ee:ff. Value null allows all source MAC address. Valid format: aa:bb:cc:dd:ee:ff.source_ip
- (Optional)(computed)[string] Only traffic originating from the respective IPv4 address is allowed. Value null allows all source IPs.target_ip
- (Optional)(Computed)[string] In case the target NIC has multiple IP addresses, only traffic directed to the respective IP address of the NIC is allowed. Value null allows all target IPs.port_range_start
- (Optional)[int] Defines the start range of the allowed port (from 1 to 65534) if protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd null to allow all ports.port_range_end
- (Optional)[int] Defines the end range of the allowed port (from 1 to 65534) if the protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd null to allow all ports.icmp_type
- (Optional)[string] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. Value null allows all codes.icmp_code
- (Optional)[int] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen.type
- (Optional)(Computed)[string] The type of firewall rule. If is not specified, it will take the default value INGRESS.
Import
Resource Server can be imported using the resource id
, nsg id
and datacenter id
, e.g.
Or by using an import
block.
Last updated