1. Packages
  2. Scaleway
  3. API Docs
  4. InstanceSecurityGroupRules
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.InstanceSecurityGroupRules

Explore with Pulumi AI

Deprecated: scaleway.index/instancesecuritygrouprules.InstanceSecurityGroupRules has been deprecated in favor of scaleway.instance/securitygrouprules.SecurityGroupRules

Creates and manages Scaleway compute Instance security group rules. For more information, see the API documentation.

This resource can be used to externalize rules from a scaleway.instance.SecurityGroup to solve circular dependency problems. When using this resource do not forget to set external_rules = true on the security group.

Warning: In order to guaranty rules order in a given security group only one scaleway.instance.SecurityGroupRules is allowed per security group.

Example Usage

Basic

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const sg01 = new scaleway.instance.SecurityGroup("sg01", {externalRules: true});
const sgrs01 = new scaleway.instance.SecurityGroupRules("sgrs01", {
    securityGroupId: sg01.id,
    inboundRules: [{
        action: "accept",
        port: 80,
        ipRange: "0.0.0.0/0",
    }],
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

sg01 = scaleway.instance.SecurityGroup("sg01", external_rules=True)
sgrs01 = scaleway.instance.SecurityGroupRules("sgrs01",
    security_group_id=sg01.id,
    inbound_rules=[{
        "action": "accept",
        "port": 80,
        "ip_range": "0.0.0.0/0",
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/instance"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		sg01, err := instance.NewSecurityGroup(ctx, "sg01", &instance.SecurityGroupArgs{
			ExternalRules: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = instance.NewSecurityGroupRules(ctx, "sgrs01", &instance.SecurityGroupRulesArgs{
			SecurityGroupId: sg01.ID(),
			InboundRules: instance.SecurityGroupRulesInboundRuleArray{
				&instance.SecurityGroupRulesInboundRuleArgs{
					Action:  pulumi.String("accept"),
					Port:    pulumi.Int(80),
					IpRange: pulumi.String("0.0.0.0/0"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var sg01 = new Scaleway.Instance.SecurityGroup("sg01", new()
    {
        ExternalRules = true,
    });

    var sgrs01 = new Scaleway.Instance.SecurityGroupRules("sgrs01", new()
    {
        SecurityGroupId = sg01.Id,
        InboundRules = new[]
        {
            new Scaleway.Instance.Inputs.SecurityGroupRulesInboundRuleArgs
            {
                Action = "accept",
                Port = 80,
                IpRange = "0.0.0.0/0",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.instance.SecurityGroup;
import com.pulumi.scaleway.instance.SecurityGroupArgs;
import com.pulumi.scaleway.instance.SecurityGroupRules;
import com.pulumi.scaleway.instance.SecurityGroupRulesArgs;
import com.pulumi.scaleway.instance.inputs.SecurityGroupRulesInboundRuleArgs;
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 sg01 = new SecurityGroup("sg01", SecurityGroupArgs.builder()
            .externalRules(true)
            .build());

        var sgrs01 = new SecurityGroupRules("sgrs01", SecurityGroupRulesArgs.builder()
            .securityGroupId(sg01.id())
            .inboundRules(SecurityGroupRulesInboundRuleArgs.builder()
                .action("accept")
                .port(80)
                .ipRange("0.0.0.0/0")
                .build())
            .build());

    }
}
Copy
resources:
  sg01:
    type: scaleway:instance:SecurityGroup
    properties:
      externalRules: true
  sgrs01:
    type: scaleway:instance:SecurityGroupRules
    properties:
      securityGroupId: ${sg01.id}
      inboundRules:
        - action: accept
          port: 80
          ipRange: 0.0.0.0/0
Copy

Simplify your rules using dynamic block and for_each loop

You can use for_each syntax to simplify the definition of your rules. Let’s suppose that your inbound default policy is to drop, but you want to build a list of exceptions to accept. Create a local containing your exceptions (locals.trusted) and use the for_each syntax in a dynamic block:

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const main = new scaleway.instance.SecurityGroup("main", {
    description: "test",
    name: "terraform test",
    inboundDefaultPolicy: "drop",
    outboundDefaultPolicy: "accept",
});
const trusted = [
    "1.2.3.4",
    "4.5.6.7",
    "7.8.9.10",
];
const mainSecurityGroupRules = new scaleway.instance.SecurityGroupRules("main", {
    inboundRules: trusted.map((v, k) => ({key: k, value: v})).map(entry => ({
        action: "accept",
        ip: entry.value,
        port: 80,
    })),
    securityGroupId: main.id,
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main = scaleway.instance.SecurityGroup("main",
    description="test",
    name="terraform test",
    inbound_default_policy="drop",
    outbound_default_policy="accept")
trusted = [
    "1.2.3.4",
    "4.5.6.7",
    "7.8.9.10",
]
main_security_group_rules = scaleway.instance.SecurityGroupRules("main",
    inbound_rules=[{
        "action": "accept",
        "ip": entry["value"],
        "port": 80,
    } for entry in [{"key": k, "value": v} for k, v in trusted]],
    security_group_id=main.id)
Copy
Coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var main = new Scaleway.Instance.SecurityGroup("main", new()
    {
        Description = "test",
        Name = "terraform test",
        InboundDefaultPolicy = "drop",
        OutboundDefaultPolicy = "accept",
    });

    var trusted = new[]
    {
        "1.2.3.4",
        "4.5.6.7",
        "7.8.9.10",
    };

    var mainSecurityGroupRules = new Scaleway.Instance.SecurityGroupRules("main", new()
    {
        InboundRules = trusted.Select((v, k) => new { Key = k, Value = v }).Select(entry => 
        {
            return new Scaleway.Instance.Inputs.SecurityGroupRulesInboundRuleArgs
            {
                Action = "accept",
                Ip = entry.Value,
                Port = 80,
            };
        }).ToList(),
        SecurityGroupId = main.Id,
    });

});
Copy
Coming soon!
Coming soon!

You can also use object to assign IP and port in the same time. In your locals, you can use objects to encapsulate several values that will be used later on in the loop:

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const main = new scaleway.instance.SecurityGroup("main", {
    description: "test",
    name: "terraform test",
    inboundDefaultPolicy: "drop",
    outboundDefaultPolicy: "accept",
});
const trusted = [
    {
        ip: "1.2.3.4",
        port: "80",
    },
    {
        ip: "5.6.7.8",
        port: "81",
    },
    {
        ip: "9.10.11.12",
        port: "81",
    },
];
const mainSecurityGroupRules = new scaleway.instance.SecurityGroupRules("main", {
    inboundRules: trusted.map((v, k) => ({key: k, value: v})).map(entry => ({
        action: "accept",
        ip: entry.value.ip,
        port: entry.value.port,
    })),
    securityGroupId: main.id,
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main = scaleway.instance.SecurityGroup("main",
    description="test",
    name="terraform test",
    inbound_default_policy="drop",
    outbound_default_policy="accept")
trusted = [
    {
        "ip": "1.2.3.4",
        "port": "80",
    },
    {
        "ip": "5.6.7.8",
        "port": "81",
    },
    {
        "ip": "9.10.11.12",
        "port": "81",
    },
]
main_security_group_rules = scaleway.instance.SecurityGroupRules("main",
    inbound_rules=[{
        "action": "accept",
        "ip": entry["value"]["ip"],
        "port": entry["value"]["port"],
    } for entry in [{"key": k, "value": v} for k, v in trusted]],
    security_group_id=main.id)
Copy
Coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var main = new Scaleway.Instance.SecurityGroup("main", new()
    {
        Description = "test",
        Name = "terraform test",
        InboundDefaultPolicy = "drop",
        OutboundDefaultPolicy = "accept",
    });

    var trusted = new[]
    {
        
        {
            { "ip", "1.2.3.4" },
            { "port", "80" },
        },
        
        {
            { "ip", "5.6.7.8" },
            { "port", "81" },
        },
        
        {
            { "ip", "9.10.11.12" },
            { "port", "81" },
        },
    };

    var mainSecurityGroupRules = new Scaleway.Instance.SecurityGroupRules("main", new()
    {
        InboundRules = trusted.Select((v, k) => new { Key = k, Value = v }).Select(entry => 
        {
            return new Scaleway.Instance.Inputs.SecurityGroupRulesInboundRuleArgs
            {
                Action = "accept",
                Ip = entry.Value.Ip,
                Port = entry.Value.Port,
            };
        }).ToList(),
        SecurityGroupId = main.Id,
    });

});
Copy
Coming soon!
Coming soon!

Create InstanceSecurityGroupRules Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new InstanceSecurityGroupRules(name: string, args: InstanceSecurityGroupRulesArgs, opts?: CustomResourceOptions);
@overload
def InstanceSecurityGroupRules(resource_name: str,
                               args: InstanceSecurityGroupRulesArgs,
                               opts: Optional[ResourceOptions] = None)

@overload
def InstanceSecurityGroupRules(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               inbound_rules: Optional[Sequence[InstanceSecurityGroupRulesInboundRuleArgs]] = None,
                               outbound_rules: Optional[Sequence[InstanceSecurityGroupRulesOutboundRuleArgs]] = None,
                               security_group_id: Optional[str] = None)
func NewInstanceSecurityGroupRules(ctx *Context, name string, args InstanceSecurityGroupRulesArgs, opts ...ResourceOption) (*InstanceSecurityGroupRules, error)
public InstanceSecurityGroupRules(string name, InstanceSecurityGroupRulesArgs args, CustomResourceOptions? opts = null)
public InstanceSecurityGroupRules(String name, InstanceSecurityGroupRulesArgs args)
public InstanceSecurityGroupRules(String name, InstanceSecurityGroupRulesArgs args, CustomResourceOptions options)
type: scaleway:InstanceSecurityGroupRules
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. InstanceSecurityGroupRulesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. InstanceSecurityGroupRulesArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. InstanceSecurityGroupRulesArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. InstanceSecurityGroupRulesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. InstanceSecurityGroupRulesArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

InstanceSecurityGroupRules 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 InstanceSecurityGroupRules resource accepts the following input properties:

SecurityGroupId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the security group.
InboundRules List<Pulumiverse.Scaleway.Inputs.InstanceSecurityGroupRulesInboundRule>
A list of inbound rule to add to the security group. (Structure is documented below.)
OutboundRules List<Pulumiverse.Scaleway.Inputs.InstanceSecurityGroupRulesOutboundRule>
A list of outbound rule to add to the security group. (Structure is documented below.)
SecurityGroupId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the security group.
InboundRules []InstanceSecurityGroupRulesInboundRuleArgs
A list of inbound rule to add to the security group. (Structure is documented below.)
OutboundRules []InstanceSecurityGroupRulesOutboundRuleArgs
A list of outbound rule to add to the security group. (Structure is documented below.)
securityGroupId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the security group.
inboundRules List<InstanceSecurityGroupRulesInboundRule>
A list of inbound rule to add to the security group. (Structure is documented below.)
outboundRules List<InstanceSecurityGroupRulesOutboundRule>
A list of outbound rule to add to the security group. (Structure is documented below.)
securityGroupId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the security group.
inboundRules InstanceSecurityGroupRulesInboundRule[]
A list of inbound rule to add to the security group. (Structure is documented below.)
outboundRules InstanceSecurityGroupRulesOutboundRule[]
A list of outbound rule to add to the security group. (Structure is documented below.)
security_group_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the security group.
inbound_rules Sequence[InstanceSecurityGroupRulesInboundRuleArgs]
A list of inbound rule to add to the security group. (Structure is documented below.)
outbound_rules Sequence[InstanceSecurityGroupRulesOutboundRuleArgs]
A list of outbound rule to add to the security group. (Structure is documented below.)
securityGroupId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the security group.
inboundRules List<Property Map>
A list of inbound rule to add to the security group. (Structure is documented below.)
outboundRules List<Property Map>
A list of outbound rule to add to the security group. (Structure is documented below.)

Outputs

All input properties are implicitly available as output properties. Additionally, the InstanceSecurityGroupRules 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 InstanceSecurityGroupRules Resource

Get an existing InstanceSecurityGroupRules 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?: InstanceSecurityGroupRulesState, opts?: CustomResourceOptions): InstanceSecurityGroupRules
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        inbound_rules: Optional[Sequence[InstanceSecurityGroupRulesInboundRuleArgs]] = None,
        outbound_rules: Optional[Sequence[InstanceSecurityGroupRulesOutboundRuleArgs]] = None,
        security_group_id: Optional[str] = None) -> InstanceSecurityGroupRules
func GetInstanceSecurityGroupRules(ctx *Context, name string, id IDInput, state *InstanceSecurityGroupRulesState, opts ...ResourceOption) (*InstanceSecurityGroupRules, error)
public static InstanceSecurityGroupRules Get(string name, Input<string> id, InstanceSecurityGroupRulesState? state, CustomResourceOptions? opts = null)
public static InstanceSecurityGroupRules get(String name, Output<String> id, InstanceSecurityGroupRulesState state, CustomResourceOptions options)
resources:  _:    type: scaleway:InstanceSecurityGroupRules    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
InboundRules List<Pulumiverse.Scaleway.Inputs.InstanceSecurityGroupRulesInboundRule>
A list of inbound rule to add to the security group. (Structure is documented below.)
OutboundRules List<Pulumiverse.Scaleway.Inputs.InstanceSecurityGroupRulesOutboundRule>
A list of outbound rule to add to the security group. (Structure is documented below.)
SecurityGroupId Changes to this property will trigger replacement. string
The ID of the security group.
InboundRules []InstanceSecurityGroupRulesInboundRuleArgs
A list of inbound rule to add to the security group. (Structure is documented below.)
OutboundRules []InstanceSecurityGroupRulesOutboundRuleArgs
A list of outbound rule to add to the security group. (Structure is documented below.)
SecurityGroupId Changes to this property will trigger replacement. string
The ID of the security group.
inboundRules List<InstanceSecurityGroupRulesInboundRule>
A list of inbound rule to add to the security group. (Structure is documented below.)
outboundRules List<InstanceSecurityGroupRulesOutboundRule>
A list of outbound rule to add to the security group. (Structure is documented below.)
securityGroupId Changes to this property will trigger replacement. String
The ID of the security group.
inboundRules InstanceSecurityGroupRulesInboundRule[]
A list of inbound rule to add to the security group. (Structure is documented below.)
outboundRules InstanceSecurityGroupRulesOutboundRule[]
A list of outbound rule to add to the security group. (Structure is documented below.)
securityGroupId Changes to this property will trigger replacement. string
The ID of the security group.
inbound_rules Sequence[InstanceSecurityGroupRulesInboundRuleArgs]
A list of inbound rule to add to the security group. (Structure is documented below.)
outbound_rules Sequence[InstanceSecurityGroupRulesOutboundRuleArgs]
A list of outbound rule to add to the security group. (Structure is documented below.)
security_group_id Changes to this property will trigger replacement. str
The ID of the security group.
inboundRules List<Property Map>
A list of inbound rule to add to the security group. (Structure is documented below.)
outboundRules List<Property Map>
A list of outbound rule to add to the security group. (Structure is documented below.)
securityGroupId Changes to this property will trigger replacement. String
The ID of the security group.

Supporting Types

InstanceSecurityGroupRulesInboundRule
, InstanceSecurityGroupRulesInboundRuleArgs

Action This property is required. string
The action to take when rule match. Possible values are: accept or drop.
Ip string
The ip this rule apply to. If no ip nor ip_range are specified, rule will apply to all ip. Only one of ip and ip_range should be specified.

Deprecated: Ip address is deprecated. Please use ip_range instead

IpRange string
The ip range (e.g 192.168.1.0/24) this rule applies to. If no ip nor ip_range are specified, rule will apply to all ip. Only one of ip and ip_range should be specified.
Port int
The port this rule apply to. If no port is specified, rule will apply to all port.
PortRange string
Computed port range for this rule (e.g: 1-1024, 22-22)
Protocol string
The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.
Action This property is required. string
The action to take when rule match. Possible values are: accept or drop.
Ip string
The ip this rule apply to. If no ip nor ip_range are specified, rule will apply to all ip. Only one of ip and ip_range should be specified.

Deprecated: Ip address is deprecated. Please use ip_range instead

IpRange string
The ip range (e.g 192.168.1.0/24) this rule applies to. If no ip nor ip_range are specified, rule will apply to all ip. Only one of ip and ip_range should be specified.
Port int
The port this rule apply to. If no port is specified, rule will apply to all port.
PortRange string
Computed port range for this rule (e.g: 1-1024, 22-22)
Protocol string
The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.
action This property is required. String
The action to take when rule match. Possible values are: accept or drop.
ip String
The ip this rule apply to. If no ip nor ip_range are specified, rule will apply to all ip. Only one of ip and ip_range should be specified.

Deprecated: Ip address is deprecated. Please use ip_range instead

ipRange String
The ip range (e.g 192.168.1.0/24) this rule applies to. If no ip nor ip_range are specified, rule will apply to all ip. Only one of ip and ip_range should be specified.
port Integer
The port this rule apply to. If no port is specified, rule will apply to all port.
portRange String
Computed port range for this rule (e.g: 1-1024, 22-22)
protocol String
The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.
action This property is required. string
The action to take when rule match. Possible values are: accept or drop.
ip string
The ip this rule apply to. If no ip nor ip_range are specified, rule will apply to all ip. Only one of ip and ip_range should be specified.

Deprecated: Ip address is deprecated. Please use ip_range instead

ipRange string
The ip range (e.g 192.168.1.0/24) this rule applies to. If no ip nor ip_range are specified, rule will apply to all ip. Only one of ip and ip_range should be specified.
port number
The port this rule apply to. If no port is specified, rule will apply to all port.
portRange string
Computed port range for this rule (e.g: 1-1024, 22-22)
protocol string
The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.
action This property is required. str
The action to take when rule match. Possible values are: accept or drop.
ip str
The ip this rule apply to. If no ip nor ip_range are specified, rule will apply to all ip. Only one of ip and ip_range should be specified.

Deprecated: Ip address is deprecated. Please use ip_range instead

ip_range str
The ip range (e.g 192.168.1.0/24) this rule applies to. If no ip nor ip_range are specified, rule will apply to all ip. Only one of ip and ip_range should be specified.
port int
The port this rule apply to. If no port is specified, rule will apply to all port.
port_range str
Computed port range for this rule (e.g: 1-1024, 22-22)
protocol str
The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.
action This property is required. String
The action to take when rule match. Possible values are: accept or drop.
ip String
The ip this rule apply to. If no ip nor ip_range are specified, rule will apply to all ip. Only one of ip and ip_range should be specified.

Deprecated: Ip address is deprecated. Please use ip_range instead

ipRange String
The ip range (e.g 192.168.1.0/24) this rule applies to. If no ip nor ip_range are specified, rule will apply to all ip. Only one of ip and ip_range should be specified.
port Number
The port this rule apply to. If no port is specified, rule will apply to all port.
portRange String
Computed port range for this rule (e.g: 1-1024, 22-22)
protocol String
The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.

InstanceSecurityGroupRulesOutboundRule
, InstanceSecurityGroupRulesOutboundRuleArgs

Action This property is required. string
Action when rule match request (drop or accept)
Ip string
Ip address for this rule (e.g: 1.1.1.1). Only one of ip or ip_range should be provided

Deprecated: Ip address is deprecated. Please use ip_range instead

IpRange string
Ip range for this rule (e.g: 192.168.1.0/24). Only one of ip or ip_range should be provided
Port int
Network port for this rule
PortRange string
Computed port range for this rule (e.g: 1-1024, 22-22)
Protocol string
Protocol for this rule (TCP, UDP, ICMP or ANY)
Action This property is required. string
Action when rule match request (drop or accept)
Ip string
Ip address for this rule (e.g: 1.1.1.1). Only one of ip or ip_range should be provided

Deprecated: Ip address is deprecated. Please use ip_range instead

IpRange string
Ip range for this rule (e.g: 192.168.1.0/24). Only one of ip or ip_range should be provided
Port int
Network port for this rule
PortRange string
Computed port range for this rule (e.g: 1-1024, 22-22)
Protocol string
Protocol for this rule (TCP, UDP, ICMP or ANY)
action This property is required. String
Action when rule match request (drop or accept)
ip String
Ip address for this rule (e.g: 1.1.1.1). Only one of ip or ip_range should be provided

Deprecated: Ip address is deprecated. Please use ip_range instead

ipRange String
Ip range for this rule (e.g: 192.168.1.0/24). Only one of ip or ip_range should be provided
port Integer
Network port for this rule
portRange String
Computed port range for this rule (e.g: 1-1024, 22-22)
protocol String
Protocol for this rule (TCP, UDP, ICMP or ANY)
action This property is required. string
Action when rule match request (drop or accept)
ip string
Ip address for this rule (e.g: 1.1.1.1). Only one of ip or ip_range should be provided

Deprecated: Ip address is deprecated. Please use ip_range instead

ipRange string
Ip range for this rule (e.g: 192.168.1.0/24). Only one of ip or ip_range should be provided
port number
Network port for this rule
portRange string
Computed port range for this rule (e.g: 1-1024, 22-22)
protocol string
Protocol for this rule (TCP, UDP, ICMP or ANY)
action This property is required. str
Action when rule match request (drop or accept)
ip str
Ip address for this rule (e.g: 1.1.1.1). Only one of ip or ip_range should be provided

Deprecated: Ip address is deprecated. Please use ip_range instead

ip_range str
Ip range for this rule (e.g: 192.168.1.0/24). Only one of ip or ip_range should be provided
port int
Network port for this rule
port_range str
Computed port range for this rule (e.g: 1-1024, 22-22)
protocol str
Protocol for this rule (TCP, UDP, ICMP or ANY)
action This property is required. String
Action when rule match request (drop or accept)
ip String
Ip address for this rule (e.g: 1.1.1.1). Only one of ip or ip_range should be provided

Deprecated: Ip address is deprecated. Please use ip_range instead

ipRange String
Ip range for this rule (e.g: 192.168.1.0/24). Only one of ip or ip_range should be provided
port Number
Network port for this rule
portRange String
Computed port range for this rule (e.g: 1-1024, 22-22)
protocol String
Protocol for this rule (TCP, UDP, ICMP or ANY)

Import

Instance security group rules can be imported using the {zone}/{id}, e.g.

bash

$ pulumi import scaleway:index/instanceSecurityGroupRules:InstanceSecurityGroupRules web fr-par-1/11111111-1111-1111-1111-111111111111
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.