ionoscloud.NsgFirewallrule
Explore with Pulumi AI
Manages a Network Security Group Rule on IonosCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const exampleDatacenter = new ionoscloud.Datacenter("exampleDatacenter", {location: "de/txl"});
const exampleNsg = new ionoscloud.Nsg("exampleNsg", {
description: "Example NSG Description",
datacenterId: exampleDatacenter.datacenterId,
});
const exampleNsgFirewallrule = new ionoscloud.NsgFirewallrule("exampleNsgFirewallrule", {
nsgId: exampleNsg.nsgId,
datacenterId: exampleDatacenter.datacenterId,
protocol: "TCP",
sourceMac: "00:0a:95:9d:68:15",
sourceIp: "22.231.113.11",
targetIp: "22.231.113.75",
type: "EGRESS",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example_datacenter = ionoscloud.Datacenter("exampleDatacenter", location="de/txl")
example_nsg = ionoscloud.Nsg("exampleNsg",
description="Example NSG Description",
datacenter_id=example_datacenter.datacenter_id)
example_nsg_firewallrule = ionoscloud.NsgFirewallrule("exampleNsgFirewallrule",
nsg_id=example_nsg.nsg_id,
datacenter_id=example_datacenter.datacenter_id,
protocol="TCP",
source_mac="00:0a:95:9d:68:15",
source_ip="22.231.113.11",
target_ip="22.231.113.75",
type="EGRESS")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleDatacenter, err := ionoscloud.NewDatacenter(ctx, "exampleDatacenter", &ionoscloud.DatacenterArgs{
Location: pulumi.String("de/txl"),
})
if err != nil {
return err
}
exampleNsg, err := ionoscloud.NewNsg(ctx, "exampleNsg", &ionoscloud.NsgArgs{
Description: pulumi.String("Example NSG Description"),
DatacenterId: exampleDatacenter.DatacenterId,
})
if err != nil {
return err
}
_, err = ionoscloud.NewNsgFirewallrule(ctx, "exampleNsgFirewallrule", &ionoscloud.NsgFirewallruleArgs{
NsgId: exampleNsg.NsgId,
DatacenterId: exampleDatacenter.DatacenterId,
Protocol: pulumi.String("TCP"),
SourceMac: pulumi.String("00:0a:95:9d:68:15"),
SourceIp: pulumi.String("22.231.113.11"),
TargetIp: pulumi.String("22.231.113.75"),
Type: pulumi.String("EGRESS"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var exampleDatacenter = new Ionoscloud.Datacenter("exampleDatacenter", new()
{
Location = "de/txl",
});
var exampleNsg = new Ionoscloud.Nsg("exampleNsg", new()
{
Description = "Example NSG Description",
DatacenterId = exampleDatacenter.DatacenterId,
});
var exampleNsgFirewallrule = new Ionoscloud.NsgFirewallrule("exampleNsgFirewallrule", new()
{
NsgId = exampleNsg.NsgId,
DatacenterId = exampleDatacenter.DatacenterId,
Protocol = "TCP",
SourceMac = "00:0a:95:9d:68:15",
SourceIp = "22.231.113.11",
TargetIp = "22.231.113.75",
Type = "EGRESS",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.Datacenter;
import com.pulumi.ionoscloud.DatacenterArgs;
import com.pulumi.ionoscloud.Nsg;
import com.pulumi.ionoscloud.NsgArgs;
import com.pulumi.ionoscloud.NsgFirewallrule;
import com.pulumi.ionoscloud.NsgFirewallruleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleDatacenter = new Datacenter("exampleDatacenter", DatacenterArgs.builder()
.location("de/txl")
.build());
var exampleNsg = new Nsg("exampleNsg", NsgArgs.builder()
.description("Example NSG Description")
.datacenterId(exampleDatacenter.datacenterId())
.build());
var exampleNsgFirewallrule = new NsgFirewallrule("exampleNsgFirewallrule", NsgFirewallruleArgs.builder()
.nsgId(exampleNsg.nsgId())
.datacenterId(exampleDatacenter.datacenterId())
.protocol("TCP")
.sourceMac("00:0a:95:9d:68:15")
.sourceIp("22.231.113.11")
.targetIp("22.231.113.75")
.type("EGRESS")
.build());
}
}
resources:
exampleDatacenter:
type: ionoscloud:Datacenter
properties:
location: de/txl
exampleNsg:
type: ionoscloud:Nsg
properties:
description: Example NSG Description
datacenterId: ${exampleDatacenter.datacenterId}
exampleNsgFirewallrule:
type: ionoscloud:NsgFirewallrule
properties:
nsgId: ${exampleNsg.nsgId}
datacenterId: ${exampleDatacenter.datacenterId}
protocol: TCP
sourceMac: 00:0a:95:9d:68:15
sourceIp: 22.231.113.11
targetIp: 22.231.113.75
type: EGRESS
Create NsgFirewallrule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NsgFirewallrule(name: string, args: NsgFirewallruleArgs, opts?: CustomResourceOptions);
@overload
def NsgFirewallrule(resource_name: str,
args: NsgFirewallruleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NsgFirewallrule(resource_name: str,
opts: Optional[ResourceOptions] = None,
nsg_id: Optional[str] = None,
protocol: Optional[str] = None,
datacenter_id: Optional[str] = None,
port_range_end: Optional[float] = None,
nsg_firewallrule_id: Optional[str] = None,
name: Optional[str] = None,
icmp_type: Optional[str] = None,
port_range_start: Optional[float] = None,
icmp_code: Optional[str] = None,
source_ip: Optional[str] = None,
source_mac: Optional[str] = None,
target_ip: Optional[str] = None,
timeouts: Optional[NsgFirewallruleTimeoutsArgs] = None,
type: Optional[str] = None)
func NewNsgFirewallrule(ctx *Context, name string, args NsgFirewallruleArgs, opts ...ResourceOption) (*NsgFirewallrule, error)
public NsgFirewallrule(string name, NsgFirewallruleArgs args, CustomResourceOptions? opts = null)
public NsgFirewallrule(String name, NsgFirewallruleArgs args)
public NsgFirewallrule(String name, NsgFirewallruleArgs args, CustomResourceOptions options)
type: ionoscloud:NsgFirewallrule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args NsgFirewallruleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NsgFirewallruleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NsgFirewallruleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NsgFirewallruleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NsgFirewallruleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var nsgFirewallruleResource = new Ionoscloud.NsgFirewallrule("nsgFirewallruleResource", new()
{
NsgId = "string",
Protocol = "string",
DatacenterId = "string",
PortRangeEnd = 0,
NsgFirewallruleId = "string",
Name = "string",
IcmpType = "string",
PortRangeStart = 0,
IcmpCode = "string",
SourceIp = "string",
SourceMac = "string",
TargetIp = "string",
Timeouts = new Ionoscloud.Inputs.NsgFirewallruleTimeoutsArgs
{
Create = "string",
Default = "string",
Delete = "string",
Update = "string",
},
Type = "string",
});
example, err := ionoscloud.NewNsgFirewallrule(ctx, "nsgFirewallruleResource", &ionoscloud.NsgFirewallruleArgs{
NsgId: pulumi.String("string"),
Protocol: pulumi.String("string"),
DatacenterId: pulumi.String("string"),
PortRangeEnd: pulumi.Float64(0),
NsgFirewallruleId: pulumi.String("string"),
Name: pulumi.String("string"),
IcmpType: pulumi.String("string"),
PortRangeStart: pulumi.Float64(0),
IcmpCode: pulumi.String("string"),
SourceIp: pulumi.String("string"),
SourceMac: pulumi.String("string"),
TargetIp: pulumi.String("string"),
Timeouts: &ionoscloud.NsgFirewallruleTimeoutsArgs{
Create: pulumi.String("string"),
Default: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
Type: pulumi.String("string"),
})
var nsgFirewallruleResource = new NsgFirewallrule("nsgFirewallruleResource", NsgFirewallruleArgs.builder()
.nsgId("string")
.protocol("string")
.datacenterId("string")
.portRangeEnd(0)
.nsgFirewallruleId("string")
.name("string")
.icmpType("string")
.portRangeStart(0)
.icmpCode("string")
.sourceIp("string")
.sourceMac("string")
.targetIp("string")
.timeouts(NsgFirewallruleTimeoutsArgs.builder()
.create("string")
.default_("string")
.delete("string")
.update("string")
.build())
.type("string")
.build());
nsg_firewallrule_resource = ionoscloud.NsgFirewallrule("nsgFirewallruleResource",
nsg_id="string",
protocol="string",
datacenter_id="string",
port_range_end=0,
nsg_firewallrule_id="string",
name="string",
icmp_type="string",
port_range_start=0,
icmp_code="string",
source_ip="string",
source_mac="string",
target_ip="string",
timeouts={
"create": "string",
"default": "string",
"delete": "string",
"update": "string",
},
type="string")
const nsgFirewallruleResource = new ionoscloud.NsgFirewallrule("nsgFirewallruleResource", {
nsgId: "string",
protocol: "string",
datacenterId: "string",
portRangeEnd: 0,
nsgFirewallruleId: "string",
name: "string",
icmpType: "string",
portRangeStart: 0,
icmpCode: "string",
sourceIp: "string",
sourceMac: "string",
targetIp: "string",
timeouts: {
create: "string",
"default": "string",
"delete": "string",
update: "string",
},
type: "string",
});
type: ionoscloud:NsgFirewallrule
properties:
datacenterId: string
icmpCode: string
icmpType: string
name: string
nsgFirewallruleId: string
nsgId: string
portRangeEnd: 0
portRangeStart: 0
protocol: string
sourceIp: string
sourceMac: string
targetIp: string
timeouts:
create: string
default: string
delete: string
update: string
type: string
NsgFirewallrule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The NsgFirewallrule resource accepts the following input properties:
- Datacenter
Id string - [string] The ID of a Virtual Data Center.
- Nsg
Id string - [string] The ID of a Network Security Group.
- Protocol string
- [string] The protocol for the rule: TCP, UDP, ICMP, ANY. Property cannot be modified after creation (disallowed in update requests).
- Icmp
Code string - [int] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen.
- Icmp
Type string - [string] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. Value null allows all codes.
- Name string
- [string] The name of the firewall rule.
- Nsg
Firewallrule stringId - Port
Range doubleEnd - [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.
- Port
Range doubleStart - [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.
- Source
Ip string - (computed)[string] Only traffic originating from the respective IPv4 address is allowed. Value null allows all source IPs.
- Source
Mac string - [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.
- Target
Ip string - (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.
- Timeouts
Nsg
Firewallrule Timeouts - Type string
- (Computed)[string] The type of firewall rule. If is not specified, it will take the default value INGRESS.
- Datacenter
Id string - [string] The ID of a Virtual Data Center.
- Nsg
Id string - [string] The ID of a Network Security Group.
- Protocol string
- [string] The protocol for the rule: TCP, UDP, ICMP, ANY. Property cannot be modified after creation (disallowed in update requests).
- Icmp
Code string - [int] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen.
- Icmp
Type string - [string] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. Value null allows all codes.
- Name string
- [string] The name of the firewall rule.
- Nsg
Firewallrule stringId - Port
Range float64End - [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.
- Port
Range float64Start - [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.
- Source
Ip string - (computed)[string] Only traffic originating from the respective IPv4 address is allowed. Value null allows all source IPs.
- Source
Mac string - [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.
- Target
Ip string - (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.
- Timeouts
Nsg
Firewallrule Timeouts Args - Type string
- (Computed)[string] The type of firewall rule. If is not specified, it will take the default value INGRESS.
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- nsg
Id String - [string] The ID of a Network Security Group.
- protocol String
- [string] The protocol for the rule: TCP, UDP, ICMP, ANY. Property cannot be modified after creation (disallowed in update requests).
- icmp
Code String - [int] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen.
- icmp
Type String - [string] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. Value null allows all codes.
- name String
- [string] The name of the firewall rule.
- nsg
Firewallrule StringId - port
Range DoubleEnd - [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.
- port
Range DoubleStart - [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.
- source
Ip String - (computed)[string] Only traffic originating from the respective IPv4 address is allowed. Value null allows all source IPs.
- source
Mac String - [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.
- target
Ip String - (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.
- timeouts
Nsg
Firewallrule Timeouts - type String
- (Computed)[string] The type of firewall rule. If is not specified, it will take the default value INGRESS.
- datacenter
Id string - [string] The ID of a Virtual Data Center.
- nsg
Id string - [string] The ID of a Network Security Group.
- protocol string
- [string] The protocol for the rule: TCP, UDP, ICMP, ANY. Property cannot be modified after creation (disallowed in update requests).
- icmp
Code string - [int] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen.
- icmp
Type string - [string] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. Value null allows all codes.
- name string
- [string] The name of the firewall rule.
- nsg
Firewallrule stringId - port
Range numberEnd - [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.
- port
Range numberStart - [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.
- source
Ip string - (computed)[string] Only traffic originating from the respective IPv4 address is allowed. Value null allows all source IPs.
- source
Mac string - [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.
- target
Ip string - (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.
- timeouts
Nsg
Firewallrule Timeouts - type string
- (Computed)[string] The type of firewall rule. If is not specified, it will take the default value INGRESS.
- datacenter_
id str - [string] The ID of a Virtual Data Center.
- nsg_
id str - [string] The ID of a Network Security Group.
- protocol str
- [string] The protocol for the rule: TCP, UDP, ICMP, ANY. Property cannot be modified after creation (disallowed in update requests).
- icmp_
code str - [int] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen.
- icmp_
type str - [string] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. Value null allows all codes.
- name str
- [string] The name of the firewall rule.
- nsg_
firewallrule_ strid - port_
range_ floatend - [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.
- port_
range_ floatstart - [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.
- source_
ip str - (computed)[string] Only traffic originating from the respective IPv4 address is allowed. Value null allows all source IPs.
- source_
mac str - [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.
- target_
ip str - (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.
- timeouts
Nsg
Firewallrule Timeouts Args - type str
- (Computed)[string] The type of firewall rule. If is not specified, it will take the default value INGRESS.
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- nsg
Id String - [string] The ID of a Network Security Group.
- protocol String
- [string] The protocol for the rule: TCP, UDP, ICMP, ANY. Property cannot be modified after creation (disallowed in update requests).
- icmp
Code String - [int] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen.
- icmp
Type String - [string] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. Value null allows all codes.
- name String
- [string] The name of the firewall rule.
- nsg
Firewallrule StringId - port
Range NumberEnd - [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.
- port
Range NumberStart - [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.
- source
Ip String - (computed)[string] Only traffic originating from the respective IPv4 address is allowed. Value null allows all source IPs.
- source
Mac String - [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.
- target
Ip String - (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.
- timeouts Property Map
- type String
- (Computed)[string] The type of firewall rule. If is not specified, it will take the default value INGRESS.
Outputs
All input properties are implicitly available as output properties. Additionally, the NsgFirewallrule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing NsgFirewallrule Resource
Get an existing NsgFirewallrule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NsgFirewallruleState, opts?: CustomResourceOptions): NsgFirewallrule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
datacenter_id: Optional[str] = None,
icmp_code: Optional[str] = None,
icmp_type: Optional[str] = None,
name: Optional[str] = None,
nsg_firewallrule_id: Optional[str] = None,
nsg_id: Optional[str] = None,
port_range_end: Optional[float] = None,
port_range_start: Optional[float] = None,
protocol: Optional[str] = None,
source_ip: Optional[str] = None,
source_mac: Optional[str] = None,
target_ip: Optional[str] = None,
timeouts: Optional[NsgFirewallruleTimeoutsArgs] = None,
type: Optional[str] = None) -> NsgFirewallrule
func GetNsgFirewallrule(ctx *Context, name string, id IDInput, state *NsgFirewallruleState, opts ...ResourceOption) (*NsgFirewallrule, error)
public static NsgFirewallrule Get(string name, Input<string> id, NsgFirewallruleState? state, CustomResourceOptions? opts = null)
public static NsgFirewallrule get(String name, Output<String> id, NsgFirewallruleState state, CustomResourceOptions options)
resources: _: type: ionoscloud:NsgFirewallrule get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Datacenter
Id string - [string] The ID of a Virtual Data Center.
- Icmp
Code string - [int] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen.
- Icmp
Type string - [string] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. Value null allows all codes.
- Name string
- [string] The name of the firewall rule.
- Nsg
Firewallrule stringId - Nsg
Id string - [string] The ID of a Network Security Group.
- Port
Range doubleEnd - [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.
- Port
Range doubleStart - [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.
- Protocol string
- [string] The protocol for the rule: TCP, UDP, ICMP, ANY. Property cannot be modified after creation (disallowed in update requests).
- Source
Ip string - (computed)[string] Only traffic originating from the respective IPv4 address is allowed. Value null allows all source IPs.
- Source
Mac string - [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.
- Target
Ip string - (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.
- Timeouts
Nsg
Firewallrule Timeouts - Type string
- (Computed)[string] The type of firewall rule. If is not specified, it will take the default value INGRESS.
- Datacenter
Id string - [string] The ID of a Virtual Data Center.
- Icmp
Code string - [int] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen.
- Icmp
Type string - [string] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. Value null allows all codes.
- Name string
- [string] The name of the firewall rule.
- Nsg
Firewallrule stringId - Nsg
Id string - [string] The ID of a Network Security Group.
- Port
Range float64End - [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.
- Port
Range float64Start - [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.
- Protocol string
- [string] The protocol for the rule: TCP, UDP, ICMP, ANY. Property cannot be modified after creation (disallowed in update requests).
- Source
Ip string - (computed)[string] Only traffic originating from the respective IPv4 address is allowed. Value null allows all source IPs.
- Source
Mac string - [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.
- Target
Ip string - (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.
- Timeouts
Nsg
Firewallrule Timeouts Args - Type string
- (Computed)[string] The type of firewall rule. If is not specified, it will take the default value INGRESS.
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- icmp
Code String - [int] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen.
- icmp
Type String - [string] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. Value null allows all codes.
- name String
- [string] The name of the firewall rule.
- nsg
Firewallrule StringId - nsg
Id String - [string] The ID of a Network Security Group.
- port
Range DoubleEnd - [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.
- port
Range DoubleStart - [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.
- protocol String
- [string] The protocol for the rule: TCP, UDP, ICMP, ANY. Property cannot be modified after creation (disallowed in update requests).
- source
Ip String - (computed)[string] Only traffic originating from the respective IPv4 address is allowed. Value null allows all source IPs.
- source
Mac String - [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.
- target
Ip String - (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.
- timeouts
Nsg
Firewallrule Timeouts - type String
- (Computed)[string] The type of firewall rule. If is not specified, it will take the default value INGRESS.
- datacenter
Id string - [string] The ID of a Virtual Data Center.
- icmp
Code string - [int] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen.
- icmp
Type string - [string] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. Value null allows all codes.
- name string
- [string] The name of the firewall rule.
- nsg
Firewallrule stringId - nsg
Id string - [string] The ID of a Network Security Group.
- port
Range numberEnd - [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.
- port
Range numberStart - [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.
- protocol string
- [string] The protocol for the rule: TCP, UDP, ICMP, ANY. Property cannot be modified after creation (disallowed in update requests).
- source
Ip string - (computed)[string] Only traffic originating from the respective IPv4 address is allowed. Value null allows all source IPs.
- source
Mac string - [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.
- target
Ip string - (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.
- timeouts
Nsg
Firewallrule Timeouts - type string
- (Computed)[string] The type of firewall rule. If is not specified, it will take the default value INGRESS.
- datacenter_
id str - [string] The ID of a Virtual Data Center.
- icmp_
code str - [int] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen.
- icmp_
type str - [string] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. Value null allows all codes.
- name str
- [string] The name of the firewall rule.
- nsg_
firewallrule_ strid - nsg_
id str - [string] The ID of a Network Security Group.
- port_
range_ floatend - [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.
- port_
range_ floatstart - [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.
- protocol str
- [string] The protocol for the rule: TCP, UDP, ICMP, ANY. Property cannot be modified after creation (disallowed in update requests).
- source_
ip str - (computed)[string] Only traffic originating from the respective IPv4 address is allowed. Value null allows all source IPs.
- source_
mac str - [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.
- target_
ip str - (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.
- timeouts
Nsg
Firewallrule Timeouts Args - type str
- (Computed)[string] The type of firewall rule. If is not specified, it will take the default value INGRESS.
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- icmp
Code String - [int] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen.
- icmp
Type String - [string] Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. Value null allows all codes.
- name String
- [string] The name of the firewall rule.
- nsg
Firewallrule StringId - nsg
Id String - [string] The ID of a Network Security Group.
- port
Range NumberEnd - [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.
- port
Range NumberStart - [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.
- protocol String
- [string] The protocol for the rule: TCP, UDP, ICMP, ANY. Property cannot be modified after creation (disallowed in update requests).
- source
Ip String - (computed)[string] Only traffic originating from the respective IPv4 address is allowed. Value null allows all source IPs.
- source
Mac String - [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.
- target
Ip String - (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.
- timeouts Property Map
- type String
- (Computed)[string] The type of firewall rule. If is not specified, it will take the default value INGRESS.
Supporting Types
NsgFirewallruleTimeouts, NsgFirewallruleTimeoutsArgs
Import
Resource Server can be imported using the resource id
, nsg id
and datacenter id
, e.g.
$ pulumi import ionoscloud:index/nsgFirewallrule:NsgFirewallrule mynsg datacenter uuid/nsg uuid/firewall uuid
Or by using an import
block.
hcl
import {
to = ionoscloud_nsg.imported
id = “datacenter uuid/nsg uuid/firewall uuid”
}
resource “ionoscloud_nsg_firewallrule” “imported” {
nsg_id = ionoscloud_nsg.example.id
datacenter_id = ionoscloud_datacenter.example.id
protocol = protocol of the imported rule
}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.