opentelekomcloud.NetworkingSecgroupRuleV2
Explore with Pulumi AI
Up-to-date reference of API arguments for VPC security group rule you can get at documentation portal
Manages a V2 neutron security group rule resource within OpenTelekomCloud. Unlike Nova security groups, neutron separates the group from the rules and also allows an admin to target a specific tenant_id.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const secgroup1 = new opentelekomcloud.NetworkingSecgroupV2("secgroup1", {description: "My neutron security group"});
const secgroupRule1 = new opentelekomcloud.NetworkingSecgroupRuleV2("secgroupRule1", {
direction: "ingress",
ethertype: "IPv4",
protocol: "tcp",
portRangeMin: 22,
portRangeMax: 22,
remoteIpPrefix: "0.0.0.0/0",
securityGroupId: secgroup1.networkingSecgroupV2Id,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
secgroup1 = opentelekomcloud.NetworkingSecgroupV2("secgroup1", description="My neutron security group")
secgroup_rule1 = opentelekomcloud.NetworkingSecgroupRuleV2("secgroupRule1",
direction="ingress",
ethertype="IPv4",
protocol="tcp",
port_range_min=22,
port_range_max=22,
remote_ip_prefix="0.0.0.0/0",
security_group_id=secgroup1.networking_secgroup_v2_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
secgroup1, err := opentelekomcloud.NewNetworkingSecgroupV2(ctx, "secgroup1", &opentelekomcloud.NetworkingSecgroupV2Args{
Description: pulumi.String("My neutron security group"),
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewNetworkingSecgroupRuleV2(ctx, "secgroupRule1", &opentelekomcloud.NetworkingSecgroupRuleV2Args{
Direction: pulumi.String("ingress"),
Ethertype: pulumi.String("IPv4"),
Protocol: pulumi.String("tcp"),
PortRangeMin: pulumi.Float64(22),
PortRangeMax: pulumi.Float64(22),
RemoteIpPrefix: pulumi.String("0.0.0.0/0"),
SecurityGroupId: secgroup1.NetworkingSecgroupV2Id,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var secgroup1 = new Opentelekomcloud.NetworkingSecgroupV2("secgroup1", new()
{
Description = "My neutron security group",
});
var secgroupRule1 = new Opentelekomcloud.NetworkingSecgroupRuleV2("secgroupRule1", new()
{
Direction = "ingress",
Ethertype = "IPv4",
Protocol = "tcp",
PortRangeMin = 22,
PortRangeMax = 22,
RemoteIpPrefix = "0.0.0.0/0",
SecurityGroupId = secgroup1.NetworkingSecgroupV2Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.NetworkingSecgroupV2;
import com.pulumi.opentelekomcloud.NetworkingSecgroupV2Args;
import com.pulumi.opentelekomcloud.NetworkingSecgroupRuleV2;
import com.pulumi.opentelekomcloud.NetworkingSecgroupRuleV2Args;
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 secgroup1 = new NetworkingSecgroupV2("secgroup1", NetworkingSecgroupV2Args.builder()
.description("My neutron security group")
.build());
var secgroupRule1 = new NetworkingSecgroupRuleV2("secgroupRule1", NetworkingSecgroupRuleV2Args.builder()
.direction("ingress")
.ethertype("IPv4")
.protocol("tcp")
.portRangeMin(22)
.portRangeMax(22)
.remoteIpPrefix("0.0.0.0/0")
.securityGroupId(secgroup1.networkingSecgroupV2Id())
.build());
}
}
resources:
secgroup1:
type: opentelekomcloud:NetworkingSecgroupV2
properties:
description: My neutron security group
secgroupRule1:
type: opentelekomcloud:NetworkingSecgroupRuleV2
properties:
direction: ingress
ethertype: IPv4
protocol: tcp
portRangeMin: 22
portRangeMax: 22
remoteIpPrefix: 0.0.0.0/0
securityGroupId: ${secgroup1.networkingSecgroupV2Id}
Example ICMP
ICMP port codes you can get at:
https://docs.otc.t-systems.com/virtual-private-cloud/api-ref/appendix/icmp-port_range_relationship_table.html
.
But for Any
values must be:
port_range_min
= 0port_range_max
= 255
Echo
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const secgroup1 = new opentelekomcloud.NetworkingSecgroupV2("secgroup1", {description: "My neutron security group"});
const secgroupRuleIcmpEchoReply = new opentelekomcloud.NetworkingSecgroupRuleV2("secgroupRuleIcmpEchoReply", {
direction: "ingress",
ethertype: "IPv4",
protocol: "icmp",
portRangeMin: 0,
portRangeMax: 0,
remoteIpPrefix: "0.0.0.0/0",
securityGroupId: secgroup1.networkingSecgroupV2Id,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
secgroup1 = opentelekomcloud.NetworkingSecgroupV2("secgroup1", description="My neutron security group")
secgroup_rule_icmp_echo_reply = opentelekomcloud.NetworkingSecgroupRuleV2("secgroupRuleIcmpEchoReply",
direction="ingress",
ethertype="IPv4",
protocol="icmp",
port_range_min=0,
port_range_max=0,
remote_ip_prefix="0.0.0.0/0",
security_group_id=secgroup1.networking_secgroup_v2_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
secgroup1, err := opentelekomcloud.NewNetworkingSecgroupV2(ctx, "secgroup1", &opentelekomcloud.NetworkingSecgroupV2Args{
Description: pulumi.String("My neutron security group"),
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewNetworkingSecgroupRuleV2(ctx, "secgroupRuleIcmpEchoReply", &opentelekomcloud.NetworkingSecgroupRuleV2Args{
Direction: pulumi.String("ingress"),
Ethertype: pulumi.String("IPv4"),
Protocol: pulumi.String("icmp"),
PortRangeMin: pulumi.Float64(0),
PortRangeMax: pulumi.Float64(0),
RemoteIpPrefix: pulumi.String("0.0.0.0/0"),
SecurityGroupId: secgroup1.NetworkingSecgroupV2Id,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var secgroup1 = new Opentelekomcloud.NetworkingSecgroupV2("secgroup1", new()
{
Description = "My neutron security group",
});
var secgroupRuleIcmpEchoReply = new Opentelekomcloud.NetworkingSecgroupRuleV2("secgroupRuleIcmpEchoReply", new()
{
Direction = "ingress",
Ethertype = "IPv4",
Protocol = "icmp",
PortRangeMin = 0,
PortRangeMax = 0,
RemoteIpPrefix = "0.0.0.0/0",
SecurityGroupId = secgroup1.NetworkingSecgroupV2Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.NetworkingSecgroupV2;
import com.pulumi.opentelekomcloud.NetworkingSecgroupV2Args;
import com.pulumi.opentelekomcloud.NetworkingSecgroupRuleV2;
import com.pulumi.opentelekomcloud.NetworkingSecgroupRuleV2Args;
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 secgroup1 = new NetworkingSecgroupV2("secgroup1", NetworkingSecgroupV2Args.builder()
.description("My neutron security group")
.build());
var secgroupRuleIcmpEchoReply = new NetworkingSecgroupRuleV2("secgroupRuleIcmpEchoReply", NetworkingSecgroupRuleV2Args.builder()
.direction("ingress")
.ethertype("IPv4")
.protocol("icmp")
.portRangeMin(0)
.portRangeMax(0)
.remoteIpPrefix("0.0.0.0/0")
.securityGroupId(secgroup1.networkingSecgroupV2Id())
.build());
}
}
resources:
secgroup1:
type: opentelekomcloud:NetworkingSecgroupV2
properties:
description: My neutron security group
secgroupRuleIcmpEchoReply:
type: opentelekomcloud:NetworkingSecgroupRuleV2
properties:
direction: ingress
ethertype: IPv4
protocol: icmp
portRangeMin: 0
portRangeMax: 0
remoteIpPrefix: 0.0.0.0/0
securityGroupId: ${secgroup1.networkingSecgroupV2Id}
Any
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const secgroup1 = new opentelekomcloud.NetworkingSecgroupV2("secgroup1", {description: "My neutron security group"});
const secgroupRuleIcmpAny = new opentelekomcloud.NetworkingSecgroupRuleV2("secgroupRuleIcmpAny", {
direction: "ingress",
ethertype: "IPv4",
protocol: "icmp",
portRangeMin: 0,
portRangeMax: 255,
remoteIpPrefix: "0.0.0.0/0",
securityGroupId: secgroup1.networkingSecgroupV2Id,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
secgroup1 = opentelekomcloud.NetworkingSecgroupV2("secgroup1", description="My neutron security group")
secgroup_rule_icmp_any = opentelekomcloud.NetworkingSecgroupRuleV2("secgroupRuleIcmpAny",
direction="ingress",
ethertype="IPv4",
protocol="icmp",
port_range_min=0,
port_range_max=255,
remote_ip_prefix="0.0.0.0/0",
security_group_id=secgroup1.networking_secgroup_v2_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
secgroup1, err := opentelekomcloud.NewNetworkingSecgroupV2(ctx, "secgroup1", &opentelekomcloud.NetworkingSecgroupV2Args{
Description: pulumi.String("My neutron security group"),
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewNetworkingSecgroupRuleV2(ctx, "secgroupRuleIcmpAny", &opentelekomcloud.NetworkingSecgroupRuleV2Args{
Direction: pulumi.String("ingress"),
Ethertype: pulumi.String("IPv4"),
Protocol: pulumi.String("icmp"),
PortRangeMin: pulumi.Float64(0),
PortRangeMax: pulumi.Float64(255),
RemoteIpPrefix: pulumi.String("0.0.0.0/0"),
SecurityGroupId: secgroup1.NetworkingSecgroupV2Id,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var secgroup1 = new Opentelekomcloud.NetworkingSecgroupV2("secgroup1", new()
{
Description = "My neutron security group",
});
var secgroupRuleIcmpAny = new Opentelekomcloud.NetworkingSecgroupRuleV2("secgroupRuleIcmpAny", new()
{
Direction = "ingress",
Ethertype = "IPv4",
Protocol = "icmp",
PortRangeMin = 0,
PortRangeMax = 255,
RemoteIpPrefix = "0.0.0.0/0",
SecurityGroupId = secgroup1.NetworkingSecgroupV2Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.NetworkingSecgroupV2;
import com.pulumi.opentelekomcloud.NetworkingSecgroupV2Args;
import com.pulumi.opentelekomcloud.NetworkingSecgroupRuleV2;
import com.pulumi.opentelekomcloud.NetworkingSecgroupRuleV2Args;
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 secgroup1 = new NetworkingSecgroupV2("secgroup1", NetworkingSecgroupV2Args.builder()
.description("My neutron security group")
.build());
var secgroupRuleIcmpAny = new NetworkingSecgroupRuleV2("secgroupRuleIcmpAny", NetworkingSecgroupRuleV2Args.builder()
.direction("ingress")
.ethertype("IPv4")
.protocol("icmp")
.portRangeMin(0)
.portRangeMax(255)
.remoteIpPrefix("0.0.0.0/0")
.securityGroupId(secgroup1.networkingSecgroupV2Id())
.build());
}
}
resources:
secgroup1:
type: opentelekomcloud:NetworkingSecgroupV2
properties:
description: My neutron security group
secgroupRuleIcmpAny:
type: opentelekomcloud:NetworkingSecgroupRuleV2
properties:
direction: ingress
ethertype: IPv4
protocol: icmp
portRangeMin: 0
portRangeMax: 255
remoteIpPrefix: 0.0.0.0/0
securityGroupId: ${secgroup1.networkingSecgroupV2Id}
Ipv6
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const secgroup1 = new opentelekomcloud.NetworkingSecgroupV2("secgroup1", {description: "My neutron security group"});
const secgroupRuleV6 = new opentelekomcloud.NetworkingSecgroupRuleV2("secgroupRuleV6", {
direction: "ingress",
ethertype: "IPv6",
portRangeMax: 8080,
portRangeMin: 8080,
protocol: "tcp",
remoteGroupId: secgroup1.networkingSecgroupV2Id,
securityGroupId: opentelekomcloud_networking_secgroup_v2.secgroup_2.id,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
secgroup1 = opentelekomcloud.NetworkingSecgroupV2("secgroup1", description="My neutron security group")
secgroup_rule_v6 = opentelekomcloud.NetworkingSecgroupRuleV2("secgroupRuleV6",
direction="ingress",
ethertype="IPv6",
port_range_max=8080,
port_range_min=8080,
protocol="tcp",
remote_group_id=secgroup1.networking_secgroup_v2_id,
security_group_id=opentelekomcloud_networking_secgroup_v2["secgroup_2"]["id"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
secgroup1, err := opentelekomcloud.NewNetworkingSecgroupV2(ctx, "secgroup1", &opentelekomcloud.NetworkingSecgroupV2Args{
Description: pulumi.String("My neutron security group"),
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewNetworkingSecgroupRuleV2(ctx, "secgroupRuleV6", &opentelekomcloud.NetworkingSecgroupRuleV2Args{
Direction: pulumi.String("ingress"),
Ethertype: pulumi.String("IPv6"),
PortRangeMax: pulumi.Float64(8080),
PortRangeMin: pulumi.Float64(8080),
Protocol: pulumi.String("tcp"),
RemoteGroupId: secgroup1.NetworkingSecgroupV2Id,
SecurityGroupId: pulumi.Any(opentelekomcloud_networking_secgroup_v2.Secgroup_2.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var secgroup1 = new Opentelekomcloud.NetworkingSecgroupV2("secgroup1", new()
{
Description = "My neutron security group",
});
var secgroupRuleV6 = new Opentelekomcloud.NetworkingSecgroupRuleV2("secgroupRuleV6", new()
{
Direction = "ingress",
Ethertype = "IPv6",
PortRangeMax = 8080,
PortRangeMin = 8080,
Protocol = "tcp",
RemoteGroupId = secgroup1.NetworkingSecgroupV2Id,
SecurityGroupId = opentelekomcloud_networking_secgroup_v2.Secgroup_2.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.NetworkingSecgroupV2;
import com.pulumi.opentelekomcloud.NetworkingSecgroupV2Args;
import com.pulumi.opentelekomcloud.NetworkingSecgroupRuleV2;
import com.pulumi.opentelekomcloud.NetworkingSecgroupRuleV2Args;
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 secgroup1 = new NetworkingSecgroupV2("secgroup1", NetworkingSecgroupV2Args.builder()
.description("My neutron security group")
.build());
var secgroupRuleV6 = new NetworkingSecgroupRuleV2("secgroupRuleV6", NetworkingSecgroupRuleV2Args.builder()
.direction("ingress")
.ethertype("IPv6")
.portRangeMax(8080)
.portRangeMin(8080)
.protocol("tcp")
.remoteGroupId(secgroup1.networkingSecgroupV2Id())
.securityGroupId(opentelekomcloud_networking_secgroup_v2.secgroup_2().id())
.build());
}
}
resources:
secgroup1:
type: opentelekomcloud:NetworkingSecgroupV2
properties:
description: My neutron security group
secgroupRuleV6:
type: opentelekomcloud:NetworkingSecgroupRuleV2
properties:
direction: ingress
ethertype: IPv6
portRangeMax: 8080
portRangeMin: 8080
protocol: tcp
remoteGroupId: ${secgroup1.networkingSecgroupV2Id}
securityGroupId: ${opentelekomcloud_networking_secgroup_v2.secgroup_2.id}
Create NetworkingSecgroupRuleV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkingSecgroupRuleV2(name: string, args: NetworkingSecgroupRuleV2Args, opts?: CustomResourceOptions);
@overload
def NetworkingSecgroupRuleV2(resource_name: str,
args: NetworkingSecgroupRuleV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkingSecgroupRuleV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
security_group_id: Optional[str] = None,
direction: Optional[str] = None,
ethertype: Optional[str] = None,
protocol: Optional[str] = None,
port_range_max: Optional[float] = None,
port_range_min: Optional[float] = None,
description: Optional[str] = None,
region: Optional[str] = None,
remote_group_id: Optional[str] = None,
remote_ip_prefix: Optional[str] = None,
networking_secgroup_rule_v2_id: Optional[str] = None,
tenant_id: Optional[str] = None,
timeouts: Optional[NetworkingSecgroupRuleV2TimeoutsArgs] = None)
func NewNetworkingSecgroupRuleV2(ctx *Context, name string, args NetworkingSecgroupRuleV2Args, opts ...ResourceOption) (*NetworkingSecgroupRuleV2, error)
public NetworkingSecgroupRuleV2(string name, NetworkingSecgroupRuleV2Args args, CustomResourceOptions? opts = null)
public NetworkingSecgroupRuleV2(String name, NetworkingSecgroupRuleV2Args args)
public NetworkingSecgroupRuleV2(String name, NetworkingSecgroupRuleV2Args args, CustomResourceOptions options)
type: opentelekomcloud:NetworkingSecgroupRuleV2
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 NetworkingSecgroupRuleV2Args
- 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 NetworkingSecgroupRuleV2Args
- 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 NetworkingSecgroupRuleV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkingSecgroupRuleV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkingSecgroupRuleV2Args
- 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 networkingSecgroupRuleV2Resource = new Opentelekomcloud.NetworkingSecgroupRuleV2("networkingSecgroupRuleV2Resource", new()
{
SecurityGroupId = "string",
Direction = "string",
Ethertype = "string",
Protocol = "string",
PortRangeMax = 0,
PortRangeMin = 0,
Description = "string",
Region = "string",
RemoteGroupId = "string",
RemoteIpPrefix = "string",
NetworkingSecgroupRuleV2Id = "string",
TenantId = "string",
Timeouts = new Opentelekomcloud.Inputs.NetworkingSecgroupRuleV2TimeoutsArgs
{
Delete = "string",
},
});
example, err := opentelekomcloud.NewNetworkingSecgroupRuleV2(ctx, "networkingSecgroupRuleV2Resource", &opentelekomcloud.NetworkingSecgroupRuleV2Args{
SecurityGroupId: pulumi.String("string"),
Direction: pulumi.String("string"),
Ethertype: pulumi.String("string"),
Protocol: pulumi.String("string"),
PortRangeMax: pulumi.Float64(0),
PortRangeMin: pulumi.Float64(0),
Description: pulumi.String("string"),
Region: pulumi.String("string"),
RemoteGroupId: pulumi.String("string"),
RemoteIpPrefix: pulumi.String("string"),
NetworkingSecgroupRuleV2Id: pulumi.String("string"),
TenantId: pulumi.String("string"),
Timeouts: &opentelekomcloud.NetworkingSecgroupRuleV2TimeoutsArgs{
Delete: pulumi.String("string"),
},
})
var networkingSecgroupRuleV2Resource = new NetworkingSecgroupRuleV2("networkingSecgroupRuleV2Resource", NetworkingSecgroupRuleV2Args.builder()
.securityGroupId("string")
.direction("string")
.ethertype("string")
.protocol("string")
.portRangeMax(0)
.portRangeMin(0)
.description("string")
.region("string")
.remoteGroupId("string")
.remoteIpPrefix("string")
.networkingSecgroupRuleV2Id("string")
.tenantId("string")
.timeouts(NetworkingSecgroupRuleV2TimeoutsArgs.builder()
.delete("string")
.build())
.build());
networking_secgroup_rule_v2_resource = opentelekomcloud.NetworkingSecgroupRuleV2("networkingSecgroupRuleV2Resource",
security_group_id="string",
direction="string",
ethertype="string",
protocol="string",
port_range_max=0,
port_range_min=0,
description="string",
region="string",
remote_group_id="string",
remote_ip_prefix="string",
networking_secgroup_rule_v2_id="string",
tenant_id="string",
timeouts={
"delete": "string",
})
const networkingSecgroupRuleV2Resource = new opentelekomcloud.NetworkingSecgroupRuleV2("networkingSecgroupRuleV2Resource", {
securityGroupId: "string",
direction: "string",
ethertype: "string",
protocol: "string",
portRangeMax: 0,
portRangeMin: 0,
description: "string",
region: "string",
remoteGroupId: "string",
remoteIpPrefix: "string",
networkingSecgroupRuleV2Id: "string",
tenantId: "string",
timeouts: {
"delete": "string",
},
});
type: opentelekomcloud:NetworkingSecgroupRuleV2
properties:
description: string
direction: string
ethertype: string
networkingSecgroupRuleV2Id: string
portRangeMax: 0
portRangeMin: 0
protocol: string
region: string
remoteGroupId: string
remoteIpPrefix: string
securityGroupId: string
tenantId: string
timeouts:
delete: string
NetworkingSecgroupRuleV2 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 NetworkingSecgroupRuleV2 resource accepts the following input properties:
- Direction string
- The direction of the rule, valid values are
ingress
oregress
. Changing this creates a new security group rule. - Ethertype string
- The layer 3 protocol type, valid values are
IPv4
orIPv6
. Changing this creates a new security group rule. - Security
Group stringId - The security group id the rule should belong to, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- Description string
- A description of the rule. Changing this creates a new security group rule.
- Networking
Secgroup stringRule V2Id - Port
Range doubleMax - The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- Port
Range doubleMin - The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- Protocol string
- The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.
- Region string
- Remote
Group stringId - The remote group id, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- Remote
Ip stringPrefix - The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
- Tenant
Id string - The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group rule.
- Timeouts
Networking
Secgroup Rule V2Timeouts
- Direction string
- The direction of the rule, valid values are
ingress
oregress
. Changing this creates a new security group rule. - Ethertype string
- The layer 3 protocol type, valid values are
IPv4
orIPv6
. Changing this creates a new security group rule. - Security
Group stringId - The security group id the rule should belong to, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- Description string
- A description of the rule. Changing this creates a new security group rule.
- Networking
Secgroup stringRule V2Id - Port
Range float64Max - The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- Port
Range float64Min - The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- Protocol string
- The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.
- Region string
- Remote
Group stringId - The remote group id, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- Remote
Ip stringPrefix - The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
- Tenant
Id string - The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group rule.
- Timeouts
Networking
Secgroup Rule V2Timeouts Args
- direction String
- The direction of the rule, valid values are
ingress
oregress
. Changing this creates a new security group rule. - ethertype String
- The layer 3 protocol type, valid values are
IPv4
orIPv6
. Changing this creates a new security group rule. - security
Group StringId - The security group id the rule should belong to, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- description String
- A description of the rule. Changing this creates a new security group rule.
- networking
Secgroup StringRule V2Id - port
Range DoubleMax - The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- port
Range DoubleMin - The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- protocol String
- The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.
- region String
- remote
Group StringId - The remote group id, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- remote
Ip StringPrefix - The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
- tenant
Id String - The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group rule.
- timeouts
Networking
Secgroup Rule V2Timeouts
- direction string
- The direction of the rule, valid values are
ingress
oregress
. Changing this creates a new security group rule. - ethertype string
- The layer 3 protocol type, valid values are
IPv4
orIPv6
. Changing this creates a new security group rule. - security
Group stringId - The security group id the rule should belong to, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- description string
- A description of the rule. Changing this creates a new security group rule.
- networking
Secgroup stringRule V2Id - port
Range numberMax - The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- port
Range numberMin - The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- protocol string
- The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.
- region string
- remote
Group stringId - The remote group id, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- remote
Ip stringPrefix - The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
- tenant
Id string - The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group rule.
- timeouts
Networking
Secgroup Rule V2Timeouts
- direction str
- The direction of the rule, valid values are
ingress
oregress
. Changing this creates a new security group rule. - ethertype str
- The layer 3 protocol type, valid values are
IPv4
orIPv6
. Changing this creates a new security group rule. - security_
group_ strid - The security group id the rule should belong to, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- description str
- A description of the rule. Changing this creates a new security group rule.
- networking_
secgroup_ strrule_ v2_ id - port_
range_ floatmax - The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- port_
range_ floatmin - The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- protocol str
- The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.
- region str
- remote_
group_ strid - The remote group id, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- remote_
ip_ strprefix - The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
- tenant_
id str - The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group rule.
- timeouts
Networking
Secgroup Rule V2Timeouts Args
- direction String
- The direction of the rule, valid values are
ingress
oregress
. Changing this creates a new security group rule. - ethertype String
- The layer 3 protocol type, valid values are
IPv4
orIPv6
. Changing this creates a new security group rule. - security
Group StringId - The security group id the rule should belong to, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- description String
- A description of the rule. Changing this creates a new security group rule.
- networking
Secgroup StringRule V2Id - port
Range NumberMax - The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- port
Range NumberMin - The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- protocol String
- The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.
- region String
- remote
Group StringId - The remote group id, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- remote
Ip StringPrefix - The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
- tenant
Id String - The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group rule.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkingSecgroupRuleV2 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 NetworkingSecgroupRuleV2 Resource
Get an existing NetworkingSecgroupRuleV2 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?: NetworkingSecgroupRuleV2State, opts?: CustomResourceOptions): NetworkingSecgroupRuleV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
direction: Optional[str] = None,
ethertype: Optional[str] = None,
networking_secgroup_rule_v2_id: Optional[str] = None,
port_range_max: Optional[float] = None,
port_range_min: Optional[float] = None,
protocol: Optional[str] = None,
region: Optional[str] = None,
remote_group_id: Optional[str] = None,
remote_ip_prefix: Optional[str] = None,
security_group_id: Optional[str] = None,
tenant_id: Optional[str] = None,
timeouts: Optional[NetworkingSecgroupRuleV2TimeoutsArgs] = None) -> NetworkingSecgroupRuleV2
func GetNetworkingSecgroupRuleV2(ctx *Context, name string, id IDInput, state *NetworkingSecgroupRuleV2State, opts ...ResourceOption) (*NetworkingSecgroupRuleV2, error)
public static NetworkingSecgroupRuleV2 Get(string name, Input<string> id, NetworkingSecgroupRuleV2State? state, CustomResourceOptions? opts = null)
public static NetworkingSecgroupRuleV2 get(String name, Output<String> id, NetworkingSecgroupRuleV2State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:NetworkingSecgroupRuleV2 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.
- Description string
- A description of the rule. Changing this creates a new security group rule.
- Direction string
- The direction of the rule, valid values are
ingress
oregress
. Changing this creates a new security group rule. - Ethertype string
- The layer 3 protocol type, valid values are
IPv4
orIPv6
. Changing this creates a new security group rule. - Networking
Secgroup stringRule V2Id - Port
Range doubleMax - The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- Port
Range doubleMin - The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- Protocol string
- The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.
- Region string
- Remote
Group stringId - The remote group id, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- Remote
Ip stringPrefix - The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
- Security
Group stringId - The security group id the rule should belong to, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- Tenant
Id string - The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group rule.
- Timeouts
Networking
Secgroup Rule V2Timeouts
- Description string
- A description of the rule. Changing this creates a new security group rule.
- Direction string
- The direction of the rule, valid values are
ingress
oregress
. Changing this creates a new security group rule. - Ethertype string
- The layer 3 protocol type, valid values are
IPv4
orIPv6
. Changing this creates a new security group rule. - Networking
Secgroup stringRule V2Id - Port
Range float64Max - The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- Port
Range float64Min - The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- Protocol string
- The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.
- Region string
- Remote
Group stringId - The remote group id, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- Remote
Ip stringPrefix - The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
- Security
Group stringId - The security group id the rule should belong to, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- Tenant
Id string - The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group rule.
- Timeouts
Networking
Secgroup Rule V2Timeouts Args
- description String
- A description of the rule. Changing this creates a new security group rule.
- direction String
- The direction of the rule, valid values are
ingress
oregress
. Changing this creates a new security group rule. - ethertype String
- The layer 3 protocol type, valid values are
IPv4
orIPv6
. Changing this creates a new security group rule. - networking
Secgroup StringRule V2Id - port
Range DoubleMax - The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- port
Range DoubleMin - The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- protocol String
- The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.
- region String
- remote
Group StringId - The remote group id, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- remote
Ip StringPrefix - The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
- security
Group StringId - The security group id the rule should belong to, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- tenant
Id String - The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group rule.
- timeouts
Networking
Secgroup Rule V2Timeouts
- description string
- A description of the rule. Changing this creates a new security group rule.
- direction string
- The direction of the rule, valid values are
ingress
oregress
. Changing this creates a new security group rule. - ethertype string
- The layer 3 protocol type, valid values are
IPv4
orIPv6
. Changing this creates a new security group rule. - networking
Secgroup stringRule V2Id - port
Range numberMax - The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- port
Range numberMin - The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- protocol string
- The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.
- region string
- remote
Group stringId - The remote group id, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- remote
Ip stringPrefix - The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
- security
Group stringId - The security group id the rule should belong to, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- tenant
Id string - The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group rule.
- timeouts
Networking
Secgroup Rule V2Timeouts
- description str
- A description of the rule. Changing this creates a new security group rule.
- direction str
- The direction of the rule, valid values are
ingress
oregress
. Changing this creates a new security group rule. - ethertype str
- The layer 3 protocol type, valid values are
IPv4
orIPv6
. Changing this creates a new security group rule. - networking_
secgroup_ strrule_ v2_ id - port_
range_ floatmax - The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- port_
range_ floatmin - The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- protocol str
- The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.
- region str
- remote_
group_ strid - The remote group id, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- remote_
ip_ strprefix - The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
- security_
group_ strid - The security group id the rule should belong to, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- tenant_
id str - The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group rule.
- timeouts
Networking
Secgroup Rule V2Timeouts Args
- description String
- A description of the rule. Changing this creates a new security group rule.
- direction String
- The direction of the rule, valid values are
ingress
oregress
. Changing this creates a new security group rule. - ethertype String
- The layer 3 protocol type, valid values are
IPv4
orIPv6
. Changing this creates a new security group rule. - networking
Secgroup StringRule V2Id - port
Range NumberMax - The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- port
Range NumberMin - The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. Changing this creates a new security group rule. When ICMP is used, the value is the ICMP code (The value ranges from 0 to 255 when it indicates the code).
- protocol String
- The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.
- region String
- remote
Group StringId - The remote group id, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- remote
Ip StringPrefix - The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.
- security
Group StringId - The security group id the rule should belong to, the value needs to be an OpenTelekomCloud ID of a security group in the same tenant. Changing this creates a new security group rule.
- tenant
Id String - The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group rule.
- timeouts Property Map
Supporting Types
NetworkingSecgroupRuleV2Timeouts, NetworkingSecgroupRuleV2TimeoutsArgs
- Delete string
- Delete string
- delete String
- delete string
- delete str
- delete String
Import
Security Group Rules can be imported using the id
, e.g.
$ pulumi import opentelekomcloud:index/networkingSecgroupRuleV2:NetworkingSecgroupRuleV2 secgroup_rule_1 aeb68ee3-6e9d-4256-955c-9584a6212745
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.