ionoscloud.compute.Nic
Explore with Pulumi AI
Manages a NIC on IonosCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
import * as random from "@pulumi/random";
const example = new ionoscloud.compute.Datacenter("example", {
name: "Datacenter Example",
location: "us/las",
description: "Datacenter Description",
secAuthProtection: false,
});
const exampleIPBlock = new ionoscloud.compute.IPBlock("example", {
location: example.location,
size: 2,
name: "IP Block Example",
});
const exampleLan = new ionoscloud.compute.Lan("example", {
datacenterId: example.id,
"public": true,
name: "Lan",
});
const serverImagePassword = new random.index.Password("server_image_password", {
length: 16,
special: false,
});
const exampleServer = new ionoscloud.compute.Server("example", {
name: "Server Example",
datacenterId: example.id,
cores: 1,
ram: 1024,
availabilityZone: "ZONE_1",
cpuFamily: "INTEL_XEON",
imageName: "Ubuntu-20.04",
imagePassword: serverImagePassword.result,
volume: {
name: "system",
size: 14,
diskType: "SSD",
},
nic: {
lan: 1,
dhcp: true,
firewallActive: true,
},
});
const exampleNic = new ionoscloud.compute.Nic("example", {
datacenterId: example.id,
serverId: exampleServer.id,
lan: exampleLan.id,
name: "NIC",
dhcp: true,
firewallActive: true,
firewallType: "INGRESS",
ips: [
exampleIPBlock.ips[0],
exampleIPBlock.ips[1],
],
});
import pulumi
import pulumi_ionoscloud as ionoscloud
import pulumi_random as random
example = ionoscloud.compute.Datacenter("example",
name="Datacenter Example",
location="us/las",
description="Datacenter Description",
sec_auth_protection=False)
example_ip_block = ionoscloud.compute.IPBlock("example",
location=example.location,
size=2,
name="IP Block Example")
example_lan = ionoscloud.compute.Lan("example",
datacenter_id=example.id,
public=True,
name="Lan")
server_image_password = random.index.Password("server_image_password",
length=16,
special=False)
example_server = ionoscloud.compute.Server("example",
name="Server Example",
datacenter_id=example.id,
cores=1,
ram=1024,
availability_zone="ZONE_1",
cpu_family="INTEL_XEON",
image_name="Ubuntu-20.04",
image_password=server_image_password["result"],
volume={
"name": "system",
"size": 14,
"disk_type": "SSD",
},
nic={
"lan": 1,
"dhcp": True,
"firewall_active": True,
})
example_nic = ionoscloud.compute.Nic("example",
datacenter_id=example.id,
server_id=example_server.id,
lan=example_lan.id,
name="NIC",
dhcp=True,
firewall_active=True,
firewall_type="INGRESS",
ips=[
example_ip_block.ips[0],
example_ip_block.ips[1],
])
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
"github.com/pulumi/pulumi-random/sdk/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := compute.NewDatacenter(ctx, "example", &compute.DatacenterArgs{
Name: pulumi.String("Datacenter Example"),
Location: pulumi.String("us/las"),
Description: pulumi.String("Datacenter Description"),
SecAuthProtection: pulumi.Bool(false),
})
if err != nil {
return err
}
exampleIPBlock, err := compute.NewIPBlock(ctx, "example", &compute.IPBlockArgs{
Location: example.Location,
Size: pulumi.Int(2),
Name: pulumi.String("IP Block Example"),
})
if err != nil {
return err
}
exampleLan, err := compute.NewLan(ctx, "example", &compute.LanArgs{
DatacenterId: example.ID(),
Public: pulumi.Bool(true),
Name: pulumi.String("Lan"),
})
if err != nil {
return err
}
serverImagePassword, err := random.NewPassword(ctx, "server_image_password", &random.PasswordArgs{
Length: 16,
Special: false,
})
if err != nil {
return err
}
exampleServer, err := compute.NewServer(ctx, "example", &compute.ServerArgs{
Name: pulumi.String("Server Example"),
DatacenterId: example.ID(),
Cores: pulumi.Int(1),
Ram: pulumi.Int(1024),
AvailabilityZone: pulumi.String("ZONE_1"),
CpuFamily: pulumi.String("INTEL_XEON"),
ImageName: pulumi.String("Ubuntu-20.04"),
ImagePassword: serverImagePassword.Result,
Volume: &compute.ServerVolumeArgs{
Name: pulumi.String("system"),
Size: pulumi.Int(14),
DiskType: pulumi.String("SSD"),
},
Nic: &compute.ServerNicArgs{
Lan: pulumi.Int(1),
Dhcp: pulumi.Bool(true),
FirewallActive: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = compute.NewNic(ctx, "example", &compute.NicArgs{
DatacenterId: example.ID(),
ServerId: exampleServer.ID(),
Lan: exampleLan.ID(),
Name: pulumi.String("NIC"),
Dhcp: pulumi.Bool(true),
FirewallActive: pulumi.Bool(true),
FirewallType: pulumi.String("INGRESS"),
Ips: pulumi.StringArray{
exampleIPBlock.Ips.ApplyT(func(ips []string) (string, error) {
return ips[0], nil
}).(pulumi.StringOutput),
exampleIPBlock.Ips.ApplyT(func(ips []string) (string, error) {
return ips[1], nil
}).(pulumi.StringOutput),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var example = new Ionoscloud.Compute.Datacenter("example", new()
{
Name = "Datacenter Example",
Location = "us/las",
Description = "Datacenter Description",
SecAuthProtection = false,
});
var exampleIPBlock = new Ionoscloud.Compute.IPBlock("example", new()
{
Location = example.Location,
Size = 2,
Name = "IP Block Example",
});
var exampleLan = new Ionoscloud.Compute.Lan("example", new()
{
DatacenterId = example.Id,
Public = true,
Name = "Lan",
});
var serverImagePassword = new Random.Index.Password("server_image_password", new()
{
Length = 16,
Special = false,
});
var exampleServer = new Ionoscloud.Compute.Server("example", new()
{
Name = "Server Example",
DatacenterId = example.Id,
Cores = 1,
Ram = 1024,
AvailabilityZone = "ZONE_1",
CpuFamily = "INTEL_XEON",
ImageName = "Ubuntu-20.04",
ImagePassword = serverImagePassword.Result,
Volume = new Ionoscloud.Compute.Inputs.ServerVolumeArgs
{
Name = "system",
Size = 14,
DiskType = "SSD",
},
Nic = new Ionoscloud.Compute.Inputs.ServerNicArgs
{
Lan = 1,
Dhcp = true,
FirewallActive = true,
},
});
var exampleNic = new Ionoscloud.Compute.Nic("example", new()
{
DatacenterId = example.Id,
ServerId = exampleServer.Id,
Lan = exampleLan.Id,
Name = "NIC",
Dhcp = true,
FirewallActive = true,
FirewallType = "INGRESS",
Ips = new[]
{
exampleIPBlock.Ips.Apply(ips => ips[0]),
exampleIPBlock.Ips.Apply(ips => ips[1]),
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.compute.Datacenter;
import com.pulumi.ionoscloud.compute.DatacenterArgs;
import com.pulumi.ionoscloud.compute.IPBlock;
import com.pulumi.ionoscloud.compute.IPBlockArgs;
import com.pulumi.ionoscloud.compute.Lan;
import com.pulumi.ionoscloud.compute.LanArgs;
import com.pulumi.random.password;
import com.pulumi.random.PasswordArgs;
import com.pulumi.ionoscloud.compute.Server;
import com.pulumi.ionoscloud.compute.ServerArgs;
import com.pulumi.ionoscloud.compute.inputs.ServerVolumeArgs;
import com.pulumi.ionoscloud.compute.inputs.ServerNicArgs;
import com.pulumi.ionoscloud.compute.Nic;
import com.pulumi.ionoscloud.compute.NicArgs;
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 example = new Datacenter("example", DatacenterArgs.builder()
.name("Datacenter Example")
.location("us/las")
.description("Datacenter Description")
.secAuthProtection(false)
.build());
var exampleIPBlock = new IPBlock("exampleIPBlock", IPBlockArgs.builder()
.location(example.location())
.size(2)
.name("IP Block Example")
.build());
var exampleLan = new Lan("exampleLan", LanArgs.builder()
.datacenterId(example.id())
.public_(true)
.name("Lan")
.build());
var serverImagePassword = new Password("serverImagePassword", PasswordArgs.builder()
.length(16)
.special(false)
.build());
var exampleServer = new Server("exampleServer", ServerArgs.builder()
.name("Server Example")
.datacenterId(example.id())
.cores(1)
.ram(1024)
.availabilityZone("ZONE_1")
.cpuFamily("INTEL_XEON")
.imageName("Ubuntu-20.04")
.imagePassword(serverImagePassword.result())
.volume(ServerVolumeArgs.builder()
.name("system")
.size(14)
.diskType("SSD")
.build())
.nic(ServerNicArgs.builder()
.lan("1")
.dhcp(true)
.firewallActive(true)
.build())
.build());
var exampleNic = new Nic("exampleNic", NicArgs.builder()
.datacenterId(example.id())
.serverId(exampleServer.id())
.lan(exampleLan.id())
.name("NIC")
.dhcp(true)
.firewallActive(true)
.firewallType("INGRESS")
.ips(
exampleIPBlock.ips().applyValue(ips -> ips[0]),
exampleIPBlock.ips().applyValue(ips -> ips[1]))
.build());
}
}
resources:
example:
type: ionoscloud:compute:Datacenter
properties:
name: Datacenter Example
location: us/las
description: Datacenter Description
secAuthProtection: false
exampleIPBlock:
type: ionoscloud:compute:IPBlock
name: example
properties:
location: ${example.location}
size: 2
name: IP Block Example
exampleLan:
type: ionoscloud:compute:Lan
name: example
properties:
datacenterId: ${example.id}
public: true
name: Lan
exampleServer:
type: ionoscloud:compute:Server
name: example
properties:
name: Server Example
datacenterId: ${example.id}
cores: 1
ram: 1024
availabilityZone: ZONE_1
cpuFamily: INTEL_XEON
imageName: Ubuntu-20.04
imagePassword: ${serverImagePassword.result}
volume:
name: system
size: 14
diskType: SSD
nic:
lan: '1'
dhcp: true
firewallActive: true
exampleNic:
type: ionoscloud:compute:Nic
name: example
properties:
datacenterId: ${example.id}
serverId: ${exampleServer.id}
lan: ${exampleLan.id}
name: NIC
dhcp: true
firewallActive: true
firewallType: INGRESS
ips:
- ${exampleIPBlock.ips[0]}
- ${exampleIPBlock.ips[1]}
serverImagePassword:
type: random:password
name: server_image_password
properties:
length: 16
special: false
With IPv6
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
import * as random from "@pulumi/random";
const example = new ionoscloud.compute.Datacenter("example", {
name: "Datacenter Example",
location: "us/las",
description: "Datacenter Description",
secAuthProtection: false,
});
const exampleLan = new ionoscloud.compute.Lan("example", {
datacenterId: example.id,
"public": true,
name: "IPv6 Enabled LAN",
ipv6CidrBlock: "ipv6_cidr_block_from_dc",
});
const serverImagePassword = new random.index.Password("server_image_password", {
length: 16,
special: false,
});
const exampleServer = new ionoscloud.compute.Server("example", {
name: "Server Example",
datacenterId: example.id,
cores: 1,
ram: 1024,
availabilityZone: "ZONE_1",
cpuFamily: "INTEL_XEON",
imageName: "Ubuntu-20.04",
imagePassword: serverImagePassword.result,
volume: {
name: "system",
size: 14,
diskType: "SSD",
},
nic: {
lan: 1,
dhcp: true,
firewallActive: true,
},
});
const exampleNic = new ionoscloud.compute.Nic("example", {
datacenterId: example.id,
serverId: exampleServer.id,
lan: exampleLan.id,
name: "IPv6 Enabled NIC",
dhcp: true,
firewallActive: true,
firewallType: "INGRESS",
dhcpv6: false,
ipv6CidrBlock: "ipv6_cidr_block_from_lan",
ipv6Ips: [
"ipv6_ip1",
"ipv6_ip2",
"ipv6_ip3",
],
});
import pulumi
import pulumi_ionoscloud as ionoscloud
import pulumi_random as random
example = ionoscloud.compute.Datacenter("example",
name="Datacenter Example",
location="us/las",
description="Datacenter Description",
sec_auth_protection=False)
example_lan = ionoscloud.compute.Lan("example",
datacenter_id=example.id,
public=True,
name="IPv6 Enabled LAN",
ipv6_cidr_block="ipv6_cidr_block_from_dc")
server_image_password = random.index.Password("server_image_password",
length=16,
special=False)
example_server = ionoscloud.compute.Server("example",
name="Server Example",
datacenter_id=example.id,
cores=1,
ram=1024,
availability_zone="ZONE_1",
cpu_family="INTEL_XEON",
image_name="Ubuntu-20.04",
image_password=server_image_password["result"],
volume={
"name": "system",
"size": 14,
"disk_type": "SSD",
},
nic={
"lan": 1,
"dhcp": True,
"firewall_active": True,
})
example_nic = ionoscloud.compute.Nic("example",
datacenter_id=example.id,
server_id=example_server.id,
lan=example_lan.id,
name="IPv6 Enabled NIC",
dhcp=True,
firewall_active=True,
firewall_type="INGRESS",
dhcpv6=False,
ipv6_cidr_block="ipv6_cidr_block_from_lan",
ipv6_ips=[
"ipv6_ip1",
"ipv6_ip2",
"ipv6_ip3",
])
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
"github.com/pulumi/pulumi-random/sdk/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := compute.NewDatacenter(ctx, "example", &compute.DatacenterArgs{
Name: pulumi.String("Datacenter Example"),
Location: pulumi.String("us/las"),
Description: pulumi.String("Datacenter Description"),
SecAuthProtection: pulumi.Bool(false),
})
if err != nil {
return err
}
exampleLan, err := compute.NewLan(ctx, "example", &compute.LanArgs{
DatacenterId: example.ID(),
Public: pulumi.Bool(true),
Name: pulumi.String("IPv6 Enabled LAN"),
Ipv6CidrBlock: pulumi.String("ipv6_cidr_block_from_dc"),
})
if err != nil {
return err
}
serverImagePassword, err := random.NewPassword(ctx, "server_image_password", &random.PasswordArgs{
Length: 16,
Special: false,
})
if err != nil {
return err
}
exampleServer, err := compute.NewServer(ctx, "example", &compute.ServerArgs{
Name: pulumi.String("Server Example"),
DatacenterId: example.ID(),
Cores: pulumi.Int(1),
Ram: pulumi.Int(1024),
AvailabilityZone: pulumi.String("ZONE_1"),
CpuFamily: pulumi.String("INTEL_XEON"),
ImageName: pulumi.String("Ubuntu-20.04"),
ImagePassword: serverImagePassword.Result,
Volume: &compute.ServerVolumeArgs{
Name: pulumi.String("system"),
Size: pulumi.Int(14),
DiskType: pulumi.String("SSD"),
},
Nic: &compute.ServerNicArgs{
Lan: pulumi.Int(1),
Dhcp: pulumi.Bool(true),
FirewallActive: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = compute.NewNic(ctx, "example", &compute.NicArgs{
DatacenterId: example.ID(),
ServerId: exampleServer.ID(),
Lan: exampleLan.ID(),
Name: pulumi.String("IPv6 Enabled NIC"),
Dhcp: pulumi.Bool(true),
FirewallActive: pulumi.Bool(true),
FirewallType: pulumi.String("INGRESS"),
Dhcpv6: pulumi.Bool(false),
Ipv6CidrBlock: pulumi.String("ipv6_cidr_block_from_lan"),
Ipv6Ips: pulumi.StringArray{
pulumi.String("ipv6_ip1"),
pulumi.String("ipv6_ip2"),
pulumi.String("ipv6_ip3"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var example = new Ionoscloud.Compute.Datacenter("example", new()
{
Name = "Datacenter Example",
Location = "us/las",
Description = "Datacenter Description",
SecAuthProtection = false,
});
var exampleLan = new Ionoscloud.Compute.Lan("example", new()
{
DatacenterId = example.Id,
Public = true,
Name = "IPv6 Enabled LAN",
Ipv6CidrBlock = "ipv6_cidr_block_from_dc",
});
var serverImagePassword = new Random.Index.Password("server_image_password", new()
{
Length = 16,
Special = false,
});
var exampleServer = new Ionoscloud.Compute.Server("example", new()
{
Name = "Server Example",
DatacenterId = example.Id,
Cores = 1,
Ram = 1024,
AvailabilityZone = "ZONE_1",
CpuFamily = "INTEL_XEON",
ImageName = "Ubuntu-20.04",
ImagePassword = serverImagePassword.Result,
Volume = new Ionoscloud.Compute.Inputs.ServerVolumeArgs
{
Name = "system",
Size = 14,
DiskType = "SSD",
},
Nic = new Ionoscloud.Compute.Inputs.ServerNicArgs
{
Lan = 1,
Dhcp = true,
FirewallActive = true,
},
});
var exampleNic = new Ionoscloud.Compute.Nic("example", new()
{
DatacenterId = example.Id,
ServerId = exampleServer.Id,
Lan = exampleLan.Id,
Name = "IPv6 Enabled NIC",
Dhcp = true,
FirewallActive = true,
FirewallType = "INGRESS",
Dhcpv6 = false,
Ipv6CidrBlock = "ipv6_cidr_block_from_lan",
Ipv6Ips = new[]
{
"ipv6_ip1",
"ipv6_ip2",
"ipv6_ip3",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.compute.Datacenter;
import com.pulumi.ionoscloud.compute.DatacenterArgs;
import com.pulumi.ionoscloud.compute.Lan;
import com.pulumi.ionoscloud.compute.LanArgs;
import com.pulumi.random.password;
import com.pulumi.random.PasswordArgs;
import com.pulumi.ionoscloud.compute.Server;
import com.pulumi.ionoscloud.compute.ServerArgs;
import com.pulumi.ionoscloud.compute.inputs.ServerVolumeArgs;
import com.pulumi.ionoscloud.compute.inputs.ServerNicArgs;
import com.pulumi.ionoscloud.compute.Nic;
import com.pulumi.ionoscloud.compute.NicArgs;
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 example = new Datacenter("example", DatacenterArgs.builder()
.name("Datacenter Example")
.location("us/las")
.description("Datacenter Description")
.secAuthProtection(false)
.build());
var exampleLan = new Lan("exampleLan", LanArgs.builder()
.datacenterId(example.id())
.public_(true)
.name("IPv6 Enabled LAN")
.ipv6CidrBlock("ipv6_cidr_block_from_dc")
.build());
var serverImagePassword = new Password("serverImagePassword", PasswordArgs.builder()
.length(16)
.special(false)
.build());
var exampleServer = new Server("exampleServer", ServerArgs.builder()
.name("Server Example")
.datacenterId(example.id())
.cores(1)
.ram(1024)
.availabilityZone("ZONE_1")
.cpuFamily("INTEL_XEON")
.imageName("Ubuntu-20.04")
.imagePassword(serverImagePassword.result())
.volume(ServerVolumeArgs.builder()
.name("system")
.size(14)
.diskType("SSD")
.build())
.nic(ServerNicArgs.builder()
.lan("1")
.dhcp(true)
.firewallActive(true)
.build())
.build());
var exampleNic = new Nic("exampleNic", NicArgs.builder()
.datacenterId(example.id())
.serverId(exampleServer.id())
.lan(exampleLan.id())
.name("IPv6 Enabled NIC")
.dhcp(true)
.firewallActive(true)
.firewallType("INGRESS")
.dhcpv6(false)
.ipv6CidrBlock("ipv6_cidr_block_from_lan")
.ipv6Ips(
"ipv6_ip1",
"ipv6_ip2",
"ipv6_ip3")
.build());
}
}
resources:
example:
type: ionoscloud:compute:Datacenter
properties:
name: Datacenter Example
location: us/las
description: Datacenter Description
secAuthProtection: false
exampleLan:
type: ionoscloud:compute:Lan
name: example
properties:
datacenterId: ${example.id}
public: true
name: IPv6 Enabled LAN
ipv6CidrBlock: ipv6_cidr_block_from_dc
exampleServer:
type: ionoscloud:compute:Server
name: example
properties:
name: Server Example
datacenterId: ${example.id}
cores: 1
ram: 1024
availabilityZone: ZONE_1
cpuFamily: INTEL_XEON
imageName: Ubuntu-20.04
imagePassword: ${serverImagePassword.result}
volume:
name: system
size: 14
diskType: SSD
nic:
lan: '1'
dhcp: true
firewallActive: true
exampleNic:
type: ionoscloud:compute:Nic
name: example
properties:
datacenterId: ${example.id}
serverId: ${exampleServer.id}
lan: ${exampleLan.id}
name: IPv6 Enabled NIC
dhcp: true
firewallActive: true
firewallType: INGRESS
dhcpv6: false
ipv6CidrBlock: ipv6_cidr_block_from_lan
ipv6Ips:
- ipv6_ip1
- ipv6_ip2
- ipv6_ip3
serverImagePassword:
type: random:password
name: server_image_password
properties:
length: 16
special: false
Example configuring Flowlog
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
import * as random from "@pulumi/random";
const example = new ionoscloud.compute.Datacenter("example", {
name: "Datacenter Example",
location: "us/las",
description: "Datacenter Description",
secAuthProtection: false,
});
const exampleLan = new ionoscloud.compute.Lan("example", {
datacenterId: example.id,
"public": true,
name: "IPv6 Enabled LAN",
ipv6CidrBlock: "ipv6_cidr_block_from_dc",
});
const serverImagePassword = new random.index.Password("server_image_password", {
length: 16,
special: false,
});
const exampleServer = new ionoscloud.compute.Server("example", {
name: "Server Example",
datacenterId: example.id,
cores: 1,
ram: 1024,
availabilityZone: "ZONE_1",
cpuFamily: "INTEL_XEON",
imageName: "Ubuntu-20.04",
imagePassword: serverImagePassword.result,
volume: {
name: "system",
size: 14,
diskType: "SSD",
},
nic: {
lan: 1,
dhcp: true,
firewallActive: true,
},
});
const exampleNic = new ionoscloud.compute.Nic("example", {
datacenterId: example.id,
serverId: exampleServer.id,
lan: exampleLan.id,
name: "IPV6 and Flowlog Enabled NIC",
dhcp: true,
firewallActive: true,
firewallType: "INGRESS",
dhcpv6: false,
ipv6CidrBlock: "ipv6_cidr_block_from_lan",
ipv6Ips: [
"ipv6_ip1",
"ipv6_ip2",
"ipv6_ip3",
],
flowlog: {
action: "ACCEPTED",
bucket: "flowlog-bucket",
direction: "INGRESS",
name: "flowlog",
},
});
import pulumi
import pulumi_ionoscloud as ionoscloud
import pulumi_random as random
example = ionoscloud.compute.Datacenter("example",
name="Datacenter Example",
location="us/las",
description="Datacenter Description",
sec_auth_protection=False)
example_lan = ionoscloud.compute.Lan("example",
datacenter_id=example.id,
public=True,
name="IPv6 Enabled LAN",
ipv6_cidr_block="ipv6_cidr_block_from_dc")
server_image_password = random.index.Password("server_image_password",
length=16,
special=False)
example_server = ionoscloud.compute.Server("example",
name="Server Example",
datacenter_id=example.id,
cores=1,
ram=1024,
availability_zone="ZONE_1",
cpu_family="INTEL_XEON",
image_name="Ubuntu-20.04",
image_password=server_image_password["result"],
volume={
"name": "system",
"size": 14,
"disk_type": "SSD",
},
nic={
"lan": 1,
"dhcp": True,
"firewall_active": True,
})
example_nic = ionoscloud.compute.Nic("example",
datacenter_id=example.id,
server_id=example_server.id,
lan=example_lan.id,
name="IPV6 and Flowlog Enabled NIC",
dhcp=True,
firewall_active=True,
firewall_type="INGRESS",
dhcpv6=False,
ipv6_cidr_block="ipv6_cidr_block_from_lan",
ipv6_ips=[
"ipv6_ip1",
"ipv6_ip2",
"ipv6_ip3",
],
flowlog={
"action": "ACCEPTED",
"bucket": "flowlog-bucket",
"direction": "INGRESS",
"name": "flowlog",
})
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
"github.com/pulumi/pulumi-random/sdk/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := compute.NewDatacenter(ctx, "example", &compute.DatacenterArgs{
Name: pulumi.String("Datacenter Example"),
Location: pulumi.String("us/las"),
Description: pulumi.String("Datacenter Description"),
SecAuthProtection: pulumi.Bool(false),
})
if err != nil {
return err
}
exampleLan, err := compute.NewLan(ctx, "example", &compute.LanArgs{
DatacenterId: example.ID(),
Public: pulumi.Bool(true),
Name: pulumi.String("IPv6 Enabled LAN"),
Ipv6CidrBlock: pulumi.String("ipv6_cidr_block_from_dc"),
})
if err != nil {
return err
}
serverImagePassword, err := random.NewPassword(ctx, "server_image_password", &random.PasswordArgs{
Length: 16,
Special: false,
})
if err != nil {
return err
}
exampleServer, err := compute.NewServer(ctx, "example", &compute.ServerArgs{
Name: pulumi.String("Server Example"),
DatacenterId: example.ID(),
Cores: pulumi.Int(1),
Ram: pulumi.Int(1024),
AvailabilityZone: pulumi.String("ZONE_1"),
CpuFamily: pulumi.String("INTEL_XEON"),
ImageName: pulumi.String("Ubuntu-20.04"),
ImagePassword: serverImagePassword.Result,
Volume: &compute.ServerVolumeArgs{
Name: pulumi.String("system"),
Size: pulumi.Int(14),
DiskType: pulumi.String("SSD"),
},
Nic: &compute.ServerNicArgs{
Lan: pulumi.Int(1),
Dhcp: pulumi.Bool(true),
FirewallActive: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = compute.NewNic(ctx, "example", &compute.NicArgs{
DatacenterId: example.ID(),
ServerId: exampleServer.ID(),
Lan: exampleLan.ID(),
Name: pulumi.String("IPV6 and Flowlog Enabled NIC"),
Dhcp: pulumi.Bool(true),
FirewallActive: pulumi.Bool(true),
FirewallType: pulumi.String("INGRESS"),
Dhcpv6: pulumi.Bool(false),
Ipv6CidrBlock: pulumi.String("ipv6_cidr_block_from_lan"),
Ipv6Ips: pulumi.StringArray{
pulumi.String("ipv6_ip1"),
pulumi.String("ipv6_ip2"),
pulumi.String("ipv6_ip3"),
},
Flowlog: &compute.NicFlowlogArgs{
Action: pulumi.String("ACCEPTED"),
Bucket: pulumi.String("flowlog-bucket"),
Direction: pulumi.String("INGRESS"),
Name: pulumi.String("flowlog"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var example = new Ionoscloud.Compute.Datacenter("example", new()
{
Name = "Datacenter Example",
Location = "us/las",
Description = "Datacenter Description",
SecAuthProtection = false,
});
var exampleLan = new Ionoscloud.Compute.Lan("example", new()
{
DatacenterId = example.Id,
Public = true,
Name = "IPv6 Enabled LAN",
Ipv6CidrBlock = "ipv6_cidr_block_from_dc",
});
var serverImagePassword = new Random.Index.Password("server_image_password", new()
{
Length = 16,
Special = false,
});
var exampleServer = new Ionoscloud.Compute.Server("example", new()
{
Name = "Server Example",
DatacenterId = example.Id,
Cores = 1,
Ram = 1024,
AvailabilityZone = "ZONE_1",
CpuFamily = "INTEL_XEON",
ImageName = "Ubuntu-20.04",
ImagePassword = serverImagePassword.Result,
Volume = new Ionoscloud.Compute.Inputs.ServerVolumeArgs
{
Name = "system",
Size = 14,
DiskType = "SSD",
},
Nic = new Ionoscloud.Compute.Inputs.ServerNicArgs
{
Lan = 1,
Dhcp = true,
FirewallActive = true,
},
});
var exampleNic = new Ionoscloud.Compute.Nic("example", new()
{
DatacenterId = example.Id,
ServerId = exampleServer.Id,
Lan = exampleLan.Id,
Name = "IPV6 and Flowlog Enabled NIC",
Dhcp = true,
FirewallActive = true,
FirewallType = "INGRESS",
Dhcpv6 = false,
Ipv6CidrBlock = "ipv6_cidr_block_from_lan",
Ipv6Ips = new[]
{
"ipv6_ip1",
"ipv6_ip2",
"ipv6_ip3",
},
Flowlog = new Ionoscloud.Compute.Inputs.NicFlowlogArgs
{
Action = "ACCEPTED",
Bucket = "flowlog-bucket",
Direction = "INGRESS",
Name = "flowlog",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.compute.Datacenter;
import com.pulumi.ionoscloud.compute.DatacenterArgs;
import com.pulumi.ionoscloud.compute.Lan;
import com.pulumi.ionoscloud.compute.LanArgs;
import com.pulumi.random.password;
import com.pulumi.random.PasswordArgs;
import com.pulumi.ionoscloud.compute.Server;
import com.pulumi.ionoscloud.compute.ServerArgs;
import com.pulumi.ionoscloud.compute.inputs.ServerVolumeArgs;
import com.pulumi.ionoscloud.compute.inputs.ServerNicArgs;
import com.pulumi.ionoscloud.compute.Nic;
import com.pulumi.ionoscloud.compute.NicArgs;
import com.pulumi.ionoscloud.compute.inputs.NicFlowlogArgs;
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 example = new Datacenter("example", DatacenterArgs.builder()
.name("Datacenter Example")
.location("us/las")
.description("Datacenter Description")
.secAuthProtection(false)
.build());
var exampleLan = new Lan("exampleLan", LanArgs.builder()
.datacenterId(example.id())
.public_(true)
.name("IPv6 Enabled LAN")
.ipv6CidrBlock("ipv6_cidr_block_from_dc")
.build());
var serverImagePassword = new Password("serverImagePassword", PasswordArgs.builder()
.length(16)
.special(false)
.build());
var exampleServer = new Server("exampleServer", ServerArgs.builder()
.name("Server Example")
.datacenterId(example.id())
.cores(1)
.ram(1024)
.availabilityZone("ZONE_1")
.cpuFamily("INTEL_XEON")
.imageName("Ubuntu-20.04")
.imagePassword(serverImagePassword.result())
.volume(ServerVolumeArgs.builder()
.name("system")
.size(14)
.diskType("SSD")
.build())
.nic(ServerNicArgs.builder()
.lan("1")
.dhcp(true)
.firewallActive(true)
.build())
.build());
var exampleNic = new Nic("exampleNic", NicArgs.builder()
.datacenterId(example.id())
.serverId(exampleServer.id())
.lan(exampleLan.id())
.name("IPV6 and Flowlog Enabled NIC")
.dhcp(true)
.firewallActive(true)
.firewallType("INGRESS")
.dhcpv6(false)
.ipv6CidrBlock("ipv6_cidr_block_from_lan")
.ipv6Ips(
"ipv6_ip1",
"ipv6_ip2",
"ipv6_ip3")
.flowlog(NicFlowlogArgs.builder()
.action("ACCEPTED")
.bucket("flowlog-bucket")
.direction("INGRESS")
.name("flowlog")
.build())
.build());
}
}
resources:
example:
type: ionoscloud:compute:Datacenter
properties:
name: Datacenter Example
location: us/las
description: Datacenter Description
secAuthProtection: false
exampleLan:
type: ionoscloud:compute:Lan
name: example
properties:
datacenterId: ${example.id}
public: true
name: IPv6 Enabled LAN
ipv6CidrBlock: ipv6_cidr_block_from_dc
exampleServer:
type: ionoscloud:compute:Server
name: example
properties:
name: Server Example
datacenterId: ${example.id}
cores: 1
ram: 1024
availabilityZone: ZONE_1
cpuFamily: INTEL_XEON
imageName: Ubuntu-20.04
imagePassword: ${serverImagePassword.result}
volume:
name: system
size: 14
diskType: SSD
nic:
lan: '1'
dhcp: true
firewallActive: true
exampleNic:
type: ionoscloud:compute:Nic
name: example
properties:
datacenterId: ${example.id}
serverId: ${exampleServer.id}
lan: ${exampleLan.id}
name: IPV6 and Flowlog Enabled NIC
dhcp: true
firewallActive: true
firewallType: INGRESS
dhcpv6: false
ipv6CidrBlock: ipv6_cidr_block_from_lan
ipv6Ips:
- ipv6_ip1
- ipv6_ip2
- ipv6_ip3
flowlog:
action: ACCEPTED
bucket: flowlog-bucket
direction: INGRESS
name: flowlog
serverImagePassword:
type: random:password
name: server_image_password
properties:
length: 16
special: false
This will configure flowlog for accepted ingress traffic and will log it into an existing IONOS Object Storage bucket named flowlog-bucket
. Any s3 compatible client can be used to create it. Adding a flowlog does not force re-creation of the NIC, but changing any other field than
name
will. Deleting a flowlog will also force NIC re-creation.
Working with load balancers
Please be aware that when using a NIC in a load balancer, the load balancer will
change the NIC’s ID behind the scenes, therefore the plan will always report this change
trying to revert the state to the one specified by your file.
In order to prevent this, use the “lifecycle meta-argument” when declaring your NIC,
in order to ignore changes to the lan
attribute:
Here’s an example:
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
const example = new ionoscloud.compute.Nic("example", {
datacenterId: foobar.id,
serverId: exampleIonoscloudServer.id,
lan: 2,
dhcp: true,
firewallActive: true,
name: "updated",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.compute.Nic("example",
datacenter_id=foobar["id"],
server_id=example_ionoscloud_server["id"],
lan=2,
dhcp=True,
firewall_active=True,
name="updated")
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewNic(ctx, "example", &compute.NicArgs{
DatacenterId: pulumi.Any(foobar.Id),
ServerId: pulumi.Any(exampleIonoscloudServer.Id),
Lan: pulumi.Int(2),
Dhcp: pulumi.Bool(true),
FirewallActive: pulumi.Bool(true),
Name: pulumi.String("updated"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = new Ionoscloud.Compute.Nic("example", new()
{
DatacenterId = foobar.Id,
ServerId = exampleIonoscloudServer.Id,
Lan = 2,
Dhcp = true,
FirewallActive = true,
Name = "updated",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.compute.Nic;
import com.pulumi.ionoscloud.compute.NicArgs;
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 example = new Nic("example", NicArgs.builder()
.datacenterId(foobar.id())
.serverId(exampleIonoscloudServer.id())
.lan("2")
.dhcp(true)
.firewallActive(true)
.name("updated")
.build());
}
}
resources:
example:
type: ionoscloud:compute:Nic
properties:
datacenterId: ${foobar.id}
serverId: ${exampleIonoscloudServer.id}
lan: '2'
dhcp: true
firewallActive: true
name: updated
Create Nic Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Nic(name: string, args: NicArgs, opts?: CustomResourceOptions);
@overload
def Nic(resource_name: str,
args: NicArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Nic(resource_name: str,
opts: Optional[ResourceOptions] = None,
datacenter_id: Optional[str] = None,
server_id: Optional[str] = None,
lan: Optional[int] = None,
firewall_active: Optional[bool] = None,
firewall_type: Optional[str] = None,
flowlog: Optional[NicFlowlogArgs] = None,
ips: Optional[Sequence[str]] = None,
ipv6_cidr_block: Optional[str] = None,
ipv6_ips: Optional[Sequence[str]] = None,
dhcpv6: Optional[bool] = None,
mac: Optional[str] = None,
name: Optional[str] = None,
security_groups_ids: Optional[Sequence[str]] = None,
dhcp: Optional[bool] = None)
func NewNic(ctx *Context, name string, args NicArgs, opts ...ResourceOption) (*Nic, error)
public Nic(string name, NicArgs args, CustomResourceOptions? opts = null)
type: ionoscloud:compute:Nic
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 NicArgs
- 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 NicArgs
- 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 NicArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NicArgs
- 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 nicResource = new Ionoscloud.Compute.Nic("nicResource", new()
{
DatacenterId = "string",
ServerId = "string",
Lan = 0,
FirewallActive = false,
FirewallType = "string",
Flowlog = new Ionoscloud.Compute.Inputs.NicFlowlogArgs
{
Action = "string",
Bucket = "string",
Direction = "string",
Name = "string",
Id = "string",
},
Ips = new[]
{
"string",
},
Ipv6CidrBlock = "string",
Ipv6Ips = new[]
{
"string",
},
Dhcpv6 = false,
Mac = "string",
Name = "string",
SecurityGroupsIds = new[]
{
"string",
},
Dhcp = false,
});
example, err := compute.NewNic(ctx, "nicResource", &compute.NicArgs{
DatacenterId: pulumi.String("string"),
ServerId: pulumi.String("string"),
Lan: pulumi.Int(0),
FirewallActive: pulumi.Bool(false),
FirewallType: pulumi.String("string"),
Flowlog: &compute.NicFlowlogArgs{
Action: pulumi.String("string"),
Bucket: pulumi.String("string"),
Direction: pulumi.String("string"),
Name: pulumi.String("string"),
Id: pulumi.String("string"),
},
Ips: pulumi.StringArray{
pulumi.String("string"),
},
Ipv6CidrBlock: pulumi.String("string"),
Ipv6Ips: pulumi.StringArray{
pulumi.String("string"),
},
Dhcpv6: pulumi.Bool(false),
Mac: pulumi.String("string"),
Name: pulumi.String("string"),
SecurityGroupsIds: pulumi.StringArray{
pulumi.String("string"),
},
Dhcp: pulumi.Bool(false),
})
var nicResource = new Nic("nicResource", NicArgs.builder()
.datacenterId("string")
.serverId("string")
.lan(0)
.firewallActive(false)
.firewallType("string")
.flowlog(NicFlowlogArgs.builder()
.action("string")
.bucket("string")
.direction("string")
.name("string")
.id("string")
.build())
.ips("string")
.ipv6CidrBlock("string")
.ipv6Ips("string")
.dhcpv6(false)
.mac("string")
.name("string")
.securityGroupsIds("string")
.dhcp(false)
.build());
nic_resource = ionoscloud.compute.Nic("nicResource",
datacenter_id="string",
server_id="string",
lan=0,
firewall_active=False,
firewall_type="string",
flowlog={
"action": "string",
"bucket": "string",
"direction": "string",
"name": "string",
"id": "string",
},
ips=["string"],
ipv6_cidr_block="string",
ipv6_ips=["string"],
dhcpv6=False,
mac="string",
name="string",
security_groups_ids=["string"],
dhcp=False)
const nicResource = new ionoscloud.compute.Nic("nicResource", {
datacenterId: "string",
serverId: "string",
lan: 0,
firewallActive: false,
firewallType: "string",
flowlog: {
action: "string",
bucket: "string",
direction: "string",
name: "string",
id: "string",
},
ips: ["string"],
ipv6CidrBlock: "string",
ipv6Ips: ["string"],
dhcpv6: false,
mac: "string",
name: "string",
securityGroupsIds: ["string"],
dhcp: false,
});
type: ionoscloud:compute:Nic
properties:
datacenterId: string
dhcp: false
dhcpv6: false
firewallActive: false
firewallType: string
flowlog:
action: string
bucket: string
direction: string
id: string
name: string
ips:
- string
ipv6CidrBlock: string
ipv6Ips:
- string
lan: 0
mac: string
name: string
securityGroupsIds:
- string
serverId: string
Nic 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 Nic resource accepts the following input properties:
- Datacenter
Id string - [string] The ID of a Virtual Data Center.
- Lan int
- [integer] The LAN ID the NIC will sit on.
- Server
Id string - [string] The ID of a server.
- Dhcp bool
- [Boolean] Indicates if the NIC should get an IP address using DHCP (true) or not (false).
- Dhcpv6 bool
- [Boolean] Indicates if the NIC should get an IPv6 address using DHCP (true) or not (false).
- Firewall
Active bool - [Boolean] If this resource is set to true and is nested under a server resource firewall, with open SSH port, resource must be nested under the NIC.
- Firewall
Type string - [String] The type of firewall rules that will be allowed on the NIC. If it is not specified it will take the default value INGRESS
- Flowlog
Ionoscloud.
Nic Flowlog - Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- Ips List<string>
- [list] Collection of IP addresses assigned to a NIC. Explicitly assigned public IPs need to come from reserved IP blocks, Passing value null or empty array will assign an IP address automatically.
- Ipv6Cidr
Block string - Automatically assigned /80 IPv6 CIDR block if the NIC is connected to an IPv6 enabled LAN. You can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique.
- Ipv6Ips List<string>
- [list] Collection of IPv6 addresses assigned to a NIC. Explicitly assigned public IPs need to come from the NIC's Ipv6 CIDR block, Passing value null or empty array will assign an IPv6 address automatically from the NIC's CIDR block.
- Mac string
- The MAC address of the NIC. Can be set on creation only. If not set, one will be assigned automatically by the API. Immutable, update forces re-creation.
- Name string
- [string] The name of the LAN.
- Security
Groups List<string>Ids The list of Security Group IDs for the resource.
⚠️ Note:: Removing the
flowlog
forces re-creation of the NIC resource.
- Datacenter
Id string - [string] The ID of a Virtual Data Center.
- Lan int
- [integer] The LAN ID the NIC will sit on.
- Server
Id string - [string] The ID of a server.
- Dhcp bool
- [Boolean] Indicates if the NIC should get an IP address using DHCP (true) or not (false).
- Dhcpv6 bool
- [Boolean] Indicates if the NIC should get an IPv6 address using DHCP (true) or not (false).
- Firewall
Active bool - [Boolean] If this resource is set to true and is nested under a server resource firewall, with open SSH port, resource must be nested under the NIC.
- Firewall
Type string - [String] The type of firewall rules that will be allowed on the NIC. If it is not specified it will take the default value INGRESS
- Flowlog
Nic
Flowlog Args - Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- Ips []string
- [list] Collection of IP addresses assigned to a NIC. Explicitly assigned public IPs need to come from reserved IP blocks, Passing value null or empty array will assign an IP address automatically.
- Ipv6Cidr
Block string - Automatically assigned /80 IPv6 CIDR block if the NIC is connected to an IPv6 enabled LAN. You can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique.
- Ipv6Ips []string
- [list] Collection of IPv6 addresses assigned to a NIC. Explicitly assigned public IPs need to come from the NIC's Ipv6 CIDR block, Passing value null or empty array will assign an IPv6 address automatically from the NIC's CIDR block.
- Mac string
- The MAC address of the NIC. Can be set on creation only. If not set, one will be assigned automatically by the API. Immutable, update forces re-creation.
- Name string
- [string] The name of the LAN.
- Security
Groups []stringIds The list of Security Group IDs for the resource.
⚠️ Note:: Removing the
flowlog
forces re-creation of the NIC resource.
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- lan Integer
- [integer] The LAN ID the NIC will sit on.
- server
Id String - [string] The ID of a server.
- dhcp Boolean
- [Boolean] Indicates if the NIC should get an IP address using DHCP (true) or not (false).
- dhcpv6 Boolean
- [Boolean] Indicates if the NIC should get an IPv6 address using DHCP (true) or not (false).
- firewall
Active Boolean - [Boolean] If this resource is set to true and is nested under a server resource firewall, with open SSH port, resource must be nested under the NIC.
- firewall
Type String - [String] The type of firewall rules that will be allowed on the NIC. If it is not specified it will take the default value INGRESS
- flowlog
Nic
Flowlog - Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- ips List<String>
- [list] Collection of IP addresses assigned to a NIC. Explicitly assigned public IPs need to come from reserved IP blocks, Passing value null or empty array will assign an IP address automatically.
- ipv6Cidr
Block String - Automatically assigned /80 IPv6 CIDR block if the NIC is connected to an IPv6 enabled LAN. You can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique.
- ipv6Ips List<String>
- [list] Collection of IPv6 addresses assigned to a NIC. Explicitly assigned public IPs need to come from the NIC's Ipv6 CIDR block, Passing value null or empty array will assign an IPv6 address automatically from the NIC's CIDR block.
- mac String
- The MAC address of the NIC. Can be set on creation only. If not set, one will be assigned automatically by the API. Immutable, update forces re-creation.
- name String
- [string] The name of the LAN.
- security
Groups List<String>Ids The list of Security Group IDs for the resource.
⚠️ Note:: Removing the
flowlog
forces re-creation of the NIC resource.
- datacenter
Id string - [string] The ID of a Virtual Data Center.
- lan number
- [integer] The LAN ID the NIC will sit on.
- server
Id string - [string] The ID of a server.
- dhcp boolean
- [Boolean] Indicates if the NIC should get an IP address using DHCP (true) or not (false).
- dhcpv6 boolean
- [Boolean] Indicates if the NIC should get an IPv6 address using DHCP (true) or not (false).
- firewall
Active boolean - [Boolean] If this resource is set to true and is nested under a server resource firewall, with open SSH port, resource must be nested under the NIC.
- firewall
Type string - [String] The type of firewall rules that will be allowed on the NIC. If it is not specified it will take the default value INGRESS
- flowlog
Nic
Flowlog - Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- ips string[]
- [list] Collection of IP addresses assigned to a NIC. Explicitly assigned public IPs need to come from reserved IP blocks, Passing value null or empty array will assign an IP address automatically.
- ipv6Cidr
Block string - Automatically assigned /80 IPv6 CIDR block if the NIC is connected to an IPv6 enabled LAN. You can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique.
- ipv6Ips string[]
- [list] Collection of IPv6 addresses assigned to a NIC. Explicitly assigned public IPs need to come from the NIC's Ipv6 CIDR block, Passing value null or empty array will assign an IPv6 address automatically from the NIC's CIDR block.
- mac string
- The MAC address of the NIC. Can be set on creation only. If not set, one will be assigned automatically by the API. Immutable, update forces re-creation.
- name string
- [string] The name of the LAN.
- security
Groups string[]Ids The list of Security Group IDs for the resource.
⚠️ Note:: Removing the
flowlog
forces re-creation of the NIC resource.
- datacenter_
id str - [string] The ID of a Virtual Data Center.
- lan int
- [integer] The LAN ID the NIC will sit on.
- server_
id str - [string] The ID of a server.
- dhcp bool
- [Boolean] Indicates if the NIC should get an IP address using DHCP (true) or not (false).
- dhcpv6 bool
- [Boolean] Indicates if the NIC should get an IPv6 address using DHCP (true) or not (false).
- firewall_
active bool - [Boolean] If this resource is set to true and is nested under a server resource firewall, with open SSH port, resource must be nested under the NIC.
- firewall_
type str - [String] The type of firewall rules that will be allowed on the NIC. If it is not specified it will take the default value INGRESS
- flowlog
Nic
Flowlog Args - Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- ips Sequence[str]
- [list] Collection of IP addresses assigned to a NIC. Explicitly assigned public IPs need to come from reserved IP blocks, Passing value null or empty array will assign an IP address automatically.
- ipv6_
cidr_ strblock - Automatically assigned /80 IPv6 CIDR block if the NIC is connected to an IPv6 enabled LAN. You can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique.
- ipv6_
ips Sequence[str] - [list] Collection of IPv6 addresses assigned to a NIC. Explicitly assigned public IPs need to come from the NIC's Ipv6 CIDR block, Passing value null or empty array will assign an IPv6 address automatically from the NIC's CIDR block.
- mac str
- The MAC address of the NIC. Can be set on creation only. If not set, one will be assigned automatically by the API. Immutable, update forces re-creation.
- name str
- [string] The name of the LAN.
- security_
groups_ Sequence[str]ids The list of Security Group IDs for the resource.
⚠️ Note:: Removing the
flowlog
forces re-creation of the NIC resource.
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- lan Number
- [integer] The LAN ID the NIC will sit on.
- server
Id String - [string] The ID of a server.
- dhcp Boolean
- [Boolean] Indicates if the NIC should get an IP address using DHCP (true) or not (false).
- dhcpv6 Boolean
- [Boolean] Indicates if the NIC should get an IPv6 address using DHCP (true) or not (false).
- firewall
Active Boolean - [Boolean] If this resource is set to true and is nested under a server resource firewall, with open SSH port, resource must be nested under the NIC.
- firewall
Type String - [String] The type of firewall rules that will be allowed on the NIC. If it is not specified it will take the default value INGRESS
- flowlog Property Map
- Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- ips List<String>
- [list] Collection of IP addresses assigned to a NIC. Explicitly assigned public IPs need to come from reserved IP blocks, Passing value null or empty array will assign an IP address automatically.
- ipv6Cidr
Block String - Automatically assigned /80 IPv6 CIDR block if the NIC is connected to an IPv6 enabled LAN. You can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique.
- ipv6Ips List<String>
- [list] Collection of IPv6 addresses assigned to a NIC. Explicitly assigned public IPs need to come from the NIC's Ipv6 CIDR block, Passing value null or empty array will assign an IPv6 address automatically from the NIC's CIDR block.
- mac String
- The MAC address of the NIC. Can be set on creation only. If not set, one will be assigned automatically by the API. Immutable, update forces re-creation.
- name String
- [string] The name of the LAN.
- security
Groups List<String>Ids The list of Security Group IDs for the resource.
⚠️ Note:: Removing the
flowlog
forces re-creation of the NIC resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Nic resource produces the following output properties:
- Device
Number int - The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created from CloudAPI and no DCD changes were done on the Datacenter.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pci
Slot int - The PCI slot number of the Nic.
- Device
Number int - The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created from CloudAPI and no DCD changes were done on the Datacenter.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pci
Slot int - The PCI slot number of the Nic.
- device
Number Integer - The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created from CloudAPI and no DCD changes were done on the Datacenter.
- id String
- The provider-assigned unique ID for this managed resource.
- pci
Slot Integer - The PCI slot number of the Nic.
- device
Number number - The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created from CloudAPI and no DCD changes were done on the Datacenter.
- id string
- The provider-assigned unique ID for this managed resource.
- pci
Slot number - The PCI slot number of the Nic.
- device_
number int - The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created from CloudAPI and no DCD changes were done on the Datacenter.
- id str
- The provider-assigned unique ID for this managed resource.
- pci_
slot int - The PCI slot number of the Nic.
- device
Number Number - The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created from CloudAPI and no DCD changes were done on the Datacenter.
- id String
- The provider-assigned unique ID for this managed resource.
- pci
Slot Number - The PCI slot number of the Nic.
Look up Existing Nic Resource
Get an existing Nic 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?: NicState, opts?: CustomResourceOptions): Nic
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
datacenter_id: Optional[str] = None,
device_number: Optional[int] = None,
dhcp: Optional[bool] = None,
dhcpv6: Optional[bool] = None,
firewall_active: Optional[bool] = None,
firewall_type: Optional[str] = None,
flowlog: Optional[NicFlowlogArgs] = None,
ips: Optional[Sequence[str]] = None,
ipv6_cidr_block: Optional[str] = None,
ipv6_ips: Optional[Sequence[str]] = None,
lan: Optional[int] = None,
mac: Optional[str] = None,
name: Optional[str] = None,
pci_slot: Optional[int] = None,
security_groups_ids: Optional[Sequence[str]] = None,
server_id: Optional[str] = None) -> Nic
func GetNic(ctx *Context, name string, id IDInput, state *NicState, opts ...ResourceOption) (*Nic, error)
public static Nic Get(string name, Input<string> id, NicState? state, CustomResourceOptions? opts = null)
public static Nic get(String name, Output<String> id, NicState state, CustomResourceOptions options)
resources: _: type: ionoscloud:compute:Nic 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.
- Device
Number int - The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created from CloudAPI and no DCD changes were done on the Datacenter.
- Dhcp bool
- [Boolean] Indicates if the NIC should get an IP address using DHCP (true) or not (false).
- Dhcpv6 bool
- [Boolean] Indicates if the NIC should get an IPv6 address using DHCP (true) or not (false).
- Firewall
Active bool - [Boolean] If this resource is set to true and is nested under a server resource firewall, with open SSH port, resource must be nested under the NIC.
- Firewall
Type string - [String] The type of firewall rules that will be allowed on the NIC. If it is not specified it will take the default value INGRESS
- Flowlog
Ionoscloud.
Nic Flowlog - Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- Ips List<string>
- [list] Collection of IP addresses assigned to a NIC. Explicitly assigned public IPs need to come from reserved IP blocks, Passing value null or empty array will assign an IP address automatically.
- Ipv6Cidr
Block string - Automatically assigned /80 IPv6 CIDR block if the NIC is connected to an IPv6 enabled LAN. You can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique.
- Ipv6Ips List<string>
- [list] Collection of IPv6 addresses assigned to a NIC. Explicitly assigned public IPs need to come from the NIC's Ipv6 CIDR block, Passing value null or empty array will assign an IPv6 address automatically from the NIC's CIDR block.
- Lan int
- [integer] The LAN ID the NIC will sit on.
- Mac string
- The MAC address of the NIC. Can be set on creation only. If not set, one will be assigned automatically by the API. Immutable, update forces re-creation.
- Name string
- [string] The name of the LAN.
- Pci
Slot int - The PCI slot number of the Nic.
- Security
Groups List<string>Ids The list of Security Group IDs for the resource.
⚠️ Note:: Removing the
flowlog
forces re-creation of the NIC resource.- Server
Id string - [string] The ID of a server.
- Datacenter
Id string - [string] The ID of a Virtual Data Center.
- Device
Number int - The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created from CloudAPI and no DCD changes were done on the Datacenter.
- Dhcp bool
- [Boolean] Indicates if the NIC should get an IP address using DHCP (true) or not (false).
- Dhcpv6 bool
- [Boolean] Indicates if the NIC should get an IPv6 address using DHCP (true) or not (false).
- Firewall
Active bool - [Boolean] If this resource is set to true and is nested under a server resource firewall, with open SSH port, resource must be nested under the NIC.
- Firewall
Type string - [String] The type of firewall rules that will be allowed on the NIC. If it is not specified it will take the default value INGRESS
- Flowlog
Nic
Flowlog Args - Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- Ips []string
- [list] Collection of IP addresses assigned to a NIC. Explicitly assigned public IPs need to come from reserved IP blocks, Passing value null or empty array will assign an IP address automatically.
- Ipv6Cidr
Block string - Automatically assigned /80 IPv6 CIDR block if the NIC is connected to an IPv6 enabled LAN. You can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique.
- Ipv6Ips []string
- [list] Collection of IPv6 addresses assigned to a NIC. Explicitly assigned public IPs need to come from the NIC's Ipv6 CIDR block, Passing value null or empty array will assign an IPv6 address automatically from the NIC's CIDR block.
- Lan int
- [integer] The LAN ID the NIC will sit on.
- Mac string
- The MAC address of the NIC. Can be set on creation only. If not set, one will be assigned automatically by the API. Immutable, update forces re-creation.
- Name string
- [string] The name of the LAN.
- Pci
Slot int - The PCI slot number of the Nic.
- Security
Groups []stringIds The list of Security Group IDs for the resource.
⚠️ Note:: Removing the
flowlog
forces re-creation of the NIC resource.- Server
Id string - [string] The ID of a server.
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- device
Number Integer - The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created from CloudAPI and no DCD changes were done on the Datacenter.
- dhcp Boolean
- [Boolean] Indicates if the NIC should get an IP address using DHCP (true) or not (false).
- dhcpv6 Boolean
- [Boolean] Indicates if the NIC should get an IPv6 address using DHCP (true) or not (false).
- firewall
Active Boolean - [Boolean] If this resource is set to true and is nested under a server resource firewall, with open SSH port, resource must be nested under the NIC.
- firewall
Type String - [String] The type of firewall rules that will be allowed on the NIC. If it is not specified it will take the default value INGRESS
- flowlog
Nic
Flowlog - Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- ips List<String>
- [list] Collection of IP addresses assigned to a NIC. Explicitly assigned public IPs need to come from reserved IP blocks, Passing value null or empty array will assign an IP address automatically.
- ipv6Cidr
Block String - Automatically assigned /80 IPv6 CIDR block if the NIC is connected to an IPv6 enabled LAN. You can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique.
- ipv6Ips List<String>
- [list] Collection of IPv6 addresses assigned to a NIC. Explicitly assigned public IPs need to come from the NIC's Ipv6 CIDR block, Passing value null or empty array will assign an IPv6 address automatically from the NIC's CIDR block.
- lan Integer
- [integer] The LAN ID the NIC will sit on.
- mac String
- The MAC address of the NIC. Can be set on creation only. If not set, one will be assigned automatically by the API. Immutable, update forces re-creation.
- name String
- [string] The name of the LAN.
- pci
Slot Integer - The PCI slot number of the Nic.
- security
Groups List<String>Ids The list of Security Group IDs for the resource.
⚠️ Note:: Removing the
flowlog
forces re-creation of the NIC resource.- server
Id String - [string] The ID of a server.
- datacenter
Id string - [string] The ID of a Virtual Data Center.
- device
Number number - The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created from CloudAPI and no DCD changes were done on the Datacenter.
- dhcp boolean
- [Boolean] Indicates if the NIC should get an IP address using DHCP (true) or not (false).
- dhcpv6 boolean
- [Boolean] Indicates if the NIC should get an IPv6 address using DHCP (true) or not (false).
- firewall
Active boolean - [Boolean] If this resource is set to true and is nested under a server resource firewall, with open SSH port, resource must be nested under the NIC.
- firewall
Type string - [String] The type of firewall rules that will be allowed on the NIC. If it is not specified it will take the default value INGRESS
- flowlog
Nic
Flowlog - Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- ips string[]
- [list] Collection of IP addresses assigned to a NIC. Explicitly assigned public IPs need to come from reserved IP blocks, Passing value null or empty array will assign an IP address automatically.
- ipv6Cidr
Block string - Automatically assigned /80 IPv6 CIDR block if the NIC is connected to an IPv6 enabled LAN. You can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique.
- ipv6Ips string[]
- [list] Collection of IPv6 addresses assigned to a NIC. Explicitly assigned public IPs need to come from the NIC's Ipv6 CIDR block, Passing value null or empty array will assign an IPv6 address automatically from the NIC's CIDR block.
- lan number
- [integer] The LAN ID the NIC will sit on.
- mac string
- The MAC address of the NIC. Can be set on creation only. If not set, one will be assigned automatically by the API. Immutable, update forces re-creation.
- name string
- [string] The name of the LAN.
- pci
Slot number - The PCI slot number of the Nic.
- security
Groups string[]Ids The list of Security Group IDs for the resource.
⚠️ Note:: Removing the
flowlog
forces re-creation of the NIC resource.- server
Id string - [string] The ID of a server.
- datacenter_
id str - [string] The ID of a Virtual Data Center.
- device_
number int - The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created from CloudAPI and no DCD changes were done on the Datacenter.
- dhcp bool
- [Boolean] Indicates if the NIC should get an IP address using DHCP (true) or not (false).
- dhcpv6 bool
- [Boolean] Indicates if the NIC should get an IPv6 address using DHCP (true) or not (false).
- firewall_
active bool - [Boolean] If this resource is set to true and is nested under a server resource firewall, with open SSH port, resource must be nested under the NIC.
- firewall_
type str - [String] The type of firewall rules that will be allowed on the NIC. If it is not specified it will take the default value INGRESS
- flowlog
Nic
Flowlog Args - Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- ips Sequence[str]
- [list] Collection of IP addresses assigned to a NIC. Explicitly assigned public IPs need to come from reserved IP blocks, Passing value null or empty array will assign an IP address automatically.
- ipv6_
cidr_ strblock - Automatically assigned /80 IPv6 CIDR block if the NIC is connected to an IPv6 enabled LAN. You can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique.
- ipv6_
ips Sequence[str] - [list] Collection of IPv6 addresses assigned to a NIC. Explicitly assigned public IPs need to come from the NIC's Ipv6 CIDR block, Passing value null or empty array will assign an IPv6 address automatically from the NIC's CIDR block.
- lan int
- [integer] The LAN ID the NIC will sit on.
- mac str
- The MAC address of the NIC. Can be set on creation only. If not set, one will be assigned automatically by the API. Immutable, update forces re-creation.
- name str
- [string] The name of the LAN.
- pci_
slot int - The PCI slot number of the Nic.
- security_
groups_ Sequence[str]ids The list of Security Group IDs for the resource.
⚠️ Note:: Removing the
flowlog
forces re-creation of the NIC resource.- server_
id str - [string] The ID of a server.
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- device
Number Number - The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created from CloudAPI and no DCD changes were done on the Datacenter.
- dhcp Boolean
- [Boolean] Indicates if the NIC should get an IP address using DHCP (true) or not (false).
- dhcpv6 Boolean
- [Boolean] Indicates if the NIC should get an IPv6 address using DHCP (true) or not (false).
- firewall
Active Boolean - [Boolean] If this resource is set to true and is nested under a server resource firewall, with open SSH port, resource must be nested under the NIC.
- firewall
Type String - [String] The type of firewall rules that will be allowed on the NIC. If it is not specified it will take the default value INGRESS
- flowlog Property Map
- Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
- ips List<String>
- [list] Collection of IP addresses assigned to a NIC. Explicitly assigned public IPs need to come from reserved IP blocks, Passing value null or empty array will assign an IP address automatically.
- ipv6Cidr
Block String - Automatically assigned /80 IPv6 CIDR block if the NIC is connected to an IPv6 enabled LAN. You can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique.
- ipv6Ips List<String>
- [list] Collection of IPv6 addresses assigned to a NIC. Explicitly assigned public IPs need to come from the NIC's Ipv6 CIDR block, Passing value null or empty array will assign an IPv6 address automatically from the NIC's CIDR block.
- lan Number
- [integer] The LAN ID the NIC will sit on.
- mac String
- The MAC address of the NIC. Can be set on creation only. If not set, one will be assigned automatically by the API. Immutable, update forces re-creation.
- name String
- [string] The name of the LAN.
- pci
Slot Number - The PCI slot number of the Nic.
- security
Groups List<String>Ids The list of Security Group IDs for the resource.
⚠️ Note:: Removing the
flowlog
forces re-creation of the NIC resource.- server
Id String - [string] The ID of a server.
Supporting Types
NicFlowlog, NicFlowlogArgs
- Action string
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, update forces re-creation.
- Bucket string
- Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, update forces re-creation.
- Direction string
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, update forces re-creation.
- Name string
- Specifies the name of the flow log.
- Id string
- The ID of the NIC.
- Action string
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, update forces re-creation.
- Bucket string
- Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, update forces re-creation.
- Direction string
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, update forces re-creation.
- Name string
- Specifies the name of the flow log.
- Id string
- The ID of the NIC.
- action String
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, update forces re-creation.
- bucket String
- Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, update forces re-creation.
- direction String
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, update forces re-creation.
- name String
- Specifies the name of the flow log.
- id String
- The ID of the NIC.
- action string
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, update forces re-creation.
- bucket string
- Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, update forces re-creation.
- direction string
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, update forces re-creation.
- name string
- Specifies the name of the flow log.
- id string
- The ID of the NIC.
- action str
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, update forces re-creation.
- bucket str
- Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, update forces re-creation.
- direction str
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, update forces re-creation.
- name str
- Specifies the name of the flow log.
- id str
- The ID of the NIC.
- action String
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, update forces re-creation.
- bucket String
- Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, update forces re-creation.
- direction String
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, update forces re-creation.
- name String
- Specifies the name of the flow log.
- id String
- The ID of the NIC.
Import
Resource Nic can be imported using the resource id
, e.g.
$ pulumi import ionoscloud:compute/nic:Nic mynic datacenter uuid/server uuid/nic uuid
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ionoscloud ionos-cloud/pulumi-ionoscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.