published on Tuesday, Mar 24, 2026 by g-core
published on Tuesday, Mar 24, 2026 by g-core
Instances are cloud virtual machines with configurable CPU, memory, storage, and networking, supporting various operating systems and workloads.
Example Usage
Instance with one public interface
Create a basic instance with a single external IPv4 interface.
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
// Create an SSH key for instance access
const myKey = new gcore.CloudSshKey("my_key", {
projectId: 1,
name: "my-keypair",
publicKey: "ssh-ed25519 ...your public key... user@example.com",
});
// Create a boot volume from an image
const bootVolume = new gcore.CloudVolume("boot_volume", {
projectId: 1,
regionId: 1,
name: "my-boot-volume",
source: "image",
imageId: "6dc4e521-0c72-462f-b2d4-306bcf15e227",
size: 20,
typeName: "ssd_hiiops",
});
// Create an instance with a single external interface
const instanceWithOneInterface = new gcore.CloudInstance("instance_with_one_interface", {
projectId: 1,
regionId: 1,
flavor: "g1-standard-2-4",
name: "my-instance",
sshKeyName: myKey.name,
volumes: [{
volumeId: bootVolume.id,
}],
interfaces: [{
type: "external",
ipFamily: "ipv4",
}],
});
import pulumi
import pulumi_gcore as gcore
# Create an SSH key for instance access
my_key = gcore.CloudSshKey("my_key",
project_id=1,
name="my-keypair",
public_key="ssh-ed25519 ...your public key... user@example.com")
# Create a boot volume from an image
boot_volume = gcore.CloudVolume("boot_volume",
project_id=1,
region_id=1,
name="my-boot-volume",
source="image",
image_id="6dc4e521-0c72-462f-b2d4-306bcf15e227",
size=20,
type_name="ssd_hiiops")
# Create an instance with a single external interface
instance_with_one_interface = gcore.CloudInstance("instance_with_one_interface",
project_id=1,
region_id=1,
flavor="g1-standard-2-4",
name="my-instance",
ssh_key_name=my_key.name,
volumes=[{
"volume_id": boot_volume.id,
}],
interfaces=[{
"type": "external",
"ip_family": "ipv4",
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/v2/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create an SSH key for instance access
myKey, err := gcore.NewCloudSshKey(ctx, "my_key", &gcore.CloudSshKeyArgs{
ProjectId: pulumi.Float64(1),
Name: pulumi.String("my-keypair"),
PublicKey: pulumi.String("ssh-ed25519 ...your public key... user@example.com"),
})
if err != nil {
return err
}
// Create a boot volume from an image
bootVolume, err := gcore.NewCloudVolume(ctx, "boot_volume", &gcore.CloudVolumeArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Name: pulumi.String("my-boot-volume"),
Source: pulumi.String("image"),
ImageId: pulumi.String("6dc4e521-0c72-462f-b2d4-306bcf15e227"),
Size: pulumi.Float64(20),
TypeName: pulumi.String("ssd_hiiops"),
})
if err != nil {
return err
}
// Create an instance with a single external interface
_, err = gcore.NewCloudInstance(ctx, "instance_with_one_interface", &gcore.CloudInstanceArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Flavor: pulumi.String("g1-standard-2-4"),
Name: pulumi.String("my-instance"),
SshKeyName: myKey.Name,
Volumes: gcore.CloudInstanceVolumeArray{
&gcore.CloudInstanceVolumeArgs{
VolumeId: bootVolume.ID(),
},
},
Interfaces: gcore.CloudInstanceInterfaceArray{
&gcore.CloudInstanceInterfaceArgs{
Type: pulumi.String("external"),
IpFamily: pulumi.String("ipv4"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
// Create an SSH key for instance access
var myKey = new Gcore.CloudSshKey("my_key", new()
{
ProjectId = 1,
Name = "my-keypair",
PublicKey = "ssh-ed25519 ...your public key... user@example.com",
});
// Create a boot volume from an image
var bootVolume = new Gcore.CloudVolume("boot_volume", new()
{
ProjectId = 1,
RegionId = 1,
Name = "my-boot-volume",
Source = "image",
ImageId = "6dc4e521-0c72-462f-b2d4-306bcf15e227",
Size = 20,
TypeName = "ssd_hiiops",
});
// Create an instance with a single external interface
var instanceWithOneInterface = new Gcore.CloudInstance("instance_with_one_interface", new()
{
ProjectId = 1,
RegionId = 1,
Flavor = "g1-standard-2-4",
Name = "my-instance",
SshKeyName = myKey.Name,
Volumes = new[]
{
new Gcore.Inputs.CloudInstanceVolumeArgs
{
VolumeId = bootVolume.Id,
},
},
Interfaces = new[]
{
new Gcore.Inputs.CloudInstanceInterfaceArgs
{
Type = "external",
IpFamily = "ipv4",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.CloudSshKey;
import com.pulumi.gcore.CloudSshKeyArgs;
import com.pulumi.gcore.CloudVolume;
import com.pulumi.gcore.CloudVolumeArgs;
import com.pulumi.gcore.CloudInstance;
import com.pulumi.gcore.CloudInstanceArgs;
import com.pulumi.gcore.inputs.CloudInstanceVolumeArgs;
import com.pulumi.gcore.inputs.CloudInstanceInterfaceArgs;
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) {
// Create an SSH key for instance access
var myKey = new CloudSshKey("myKey", CloudSshKeyArgs.builder()
.projectId(1.0)
.name("my-keypair")
.publicKey("ssh-ed25519 ...your public key... user@example.com")
.build());
// Create a boot volume from an image
var bootVolume = new CloudVolume("bootVolume", CloudVolumeArgs.builder()
.projectId(1.0)
.regionId(1.0)
.name("my-boot-volume")
.source("image")
.imageId("6dc4e521-0c72-462f-b2d4-306bcf15e227")
.size(20.0)
.typeName("ssd_hiiops")
.build());
// Create an instance with a single external interface
var instanceWithOneInterface = new CloudInstance("instanceWithOneInterface", CloudInstanceArgs.builder()
.projectId(1.0)
.regionId(1.0)
.flavor("g1-standard-2-4")
.name("my-instance")
.sshKeyName(myKey.name())
.volumes(CloudInstanceVolumeArgs.builder()
.volumeId(bootVolume.id())
.build())
.interfaces(CloudInstanceInterfaceArgs.builder()
.type("external")
.ipFamily("ipv4")
.build())
.build());
}
}
resources:
# Create an SSH key for instance access
myKey:
type: gcore:CloudSshKey
name: my_key
properties:
projectId: 1
name: my-keypair
publicKey: ssh-ed25519 ...your public key... user@example.com
# Create a boot volume from an image
bootVolume:
type: gcore:CloudVolume
name: boot_volume
properties:
projectId: 1
regionId: 1
name: my-boot-volume
source: image
imageId: 6dc4e521-0c72-462f-b2d4-306bcf15e227
size: 20
typeName: ssd_hiiops
# Create an instance with a single external interface
instanceWithOneInterface:
type: gcore:CloudInstance
name: instance_with_one_interface
properties:
projectId: 1
regionId: 1
flavor: g1-standard-2-4
name: my-instance
sshKeyName: ${myKey.name}
volumes:
- volumeId: ${bootVolume.id}
interfaces:
- type: external
ipFamily: ipv4
Instance with two interfaces
Create an instance with two network interfaces: one public and one private.
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
// Create a private network and subnet
const network = new gcore.CloudNetwork("network", {
projectId: 1,
regionId: 1,
name: "my-network",
type: "vxlan",
});
const subnet = new gcore.CloudNetworkSubnet("subnet", {
projectId: 1,
regionId: 1,
name: "my-subnet",
cidr: "192.168.10.0/24",
networkId: network.id,
dnsNameservers: [
"8.8.4.4",
"1.1.1.1",
],
});
// Create an SSH key for instance access
const myKey = new gcore.CloudSshKey("my_key", {
projectId: 1,
name: "my-keypair",
publicKey: "ssh-ed25519 ...your public key... user@example.com",
});
// Create a boot volume from an image
const bootVolume = new gcore.CloudVolume("boot_volume", {
projectId: 1,
regionId: 1,
name: "my-boot-volume",
source: "image",
imageId: "6dc4e521-0c72-462f-b2d4-306bcf15e227",
size: 20,
typeName: "ssd_hiiops",
});
// Create an instance with two interfaces: one public, one private
const instanceWithTwoInterfaces = new gcore.CloudInstance("instance_with_two_interfaces", {
projectId: 1,
regionId: 1,
flavor: "g1-standard-2-4",
name: "my-instance",
sshKeyName: myKey.name,
volumes: [{
volumeId: bootVolume.id,
}],
interfaces: [
{
type: "external",
ipFamily: "ipv4",
},
{
type: "subnet",
networkId: network.id,
subnetId: subnet.id,
},
],
});
import pulumi
import pulumi_gcore as gcore
# Create a private network and subnet
network = gcore.CloudNetwork("network",
project_id=1,
region_id=1,
name="my-network",
type="vxlan")
subnet = gcore.CloudNetworkSubnet("subnet",
project_id=1,
region_id=1,
name="my-subnet",
cidr="192.168.10.0/24",
network_id=network.id,
dns_nameservers=[
"8.8.4.4",
"1.1.1.1",
])
# Create an SSH key for instance access
my_key = gcore.CloudSshKey("my_key",
project_id=1,
name="my-keypair",
public_key="ssh-ed25519 ...your public key... user@example.com")
# Create a boot volume from an image
boot_volume = gcore.CloudVolume("boot_volume",
project_id=1,
region_id=1,
name="my-boot-volume",
source="image",
image_id="6dc4e521-0c72-462f-b2d4-306bcf15e227",
size=20,
type_name="ssd_hiiops")
# Create an instance with two interfaces: one public, one private
instance_with_two_interfaces = gcore.CloudInstance("instance_with_two_interfaces",
project_id=1,
region_id=1,
flavor="g1-standard-2-4",
name="my-instance",
ssh_key_name=my_key.name,
volumes=[{
"volume_id": boot_volume.id,
}],
interfaces=[
{
"type": "external",
"ip_family": "ipv4",
},
{
"type": "subnet",
"network_id": network.id,
"subnet_id": subnet.id,
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/v2/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a private network and subnet
network, err := gcore.NewCloudNetwork(ctx, "network", &gcore.CloudNetworkArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Name: pulumi.String("my-network"),
Type: pulumi.String("vxlan"),
})
if err != nil {
return err
}
subnet, err := gcore.NewCloudNetworkSubnet(ctx, "subnet", &gcore.CloudNetworkSubnetArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Name: pulumi.String("my-subnet"),
Cidr: pulumi.String("192.168.10.0/24"),
NetworkId: network.ID(),
DnsNameservers: pulumi.StringArray{
pulumi.String("8.8.4.4"),
pulumi.String("1.1.1.1"),
},
})
if err != nil {
return err
}
// Create an SSH key for instance access
myKey, err := gcore.NewCloudSshKey(ctx, "my_key", &gcore.CloudSshKeyArgs{
ProjectId: pulumi.Float64(1),
Name: pulumi.String("my-keypair"),
PublicKey: pulumi.String("ssh-ed25519 ...your public key... user@example.com"),
})
if err != nil {
return err
}
// Create a boot volume from an image
bootVolume, err := gcore.NewCloudVolume(ctx, "boot_volume", &gcore.CloudVolumeArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Name: pulumi.String("my-boot-volume"),
Source: pulumi.String("image"),
ImageId: pulumi.String("6dc4e521-0c72-462f-b2d4-306bcf15e227"),
Size: pulumi.Float64(20),
TypeName: pulumi.String("ssd_hiiops"),
})
if err != nil {
return err
}
// Create an instance with two interfaces: one public, one private
_, err = gcore.NewCloudInstance(ctx, "instance_with_two_interfaces", &gcore.CloudInstanceArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Flavor: pulumi.String("g1-standard-2-4"),
Name: pulumi.String("my-instance"),
SshKeyName: myKey.Name,
Volumes: gcore.CloudInstanceVolumeArray{
&gcore.CloudInstanceVolumeArgs{
VolumeId: bootVolume.ID(),
},
},
Interfaces: gcore.CloudInstanceInterfaceArray{
&gcore.CloudInstanceInterfaceArgs{
Type: pulumi.String("external"),
IpFamily: pulumi.String("ipv4"),
},
&gcore.CloudInstanceInterfaceArgs{
Type: pulumi.String("subnet"),
NetworkId: network.ID(),
SubnetId: subnet.ID(),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
// Create a private network and subnet
var network = new Gcore.CloudNetwork("network", new()
{
ProjectId = 1,
RegionId = 1,
Name = "my-network",
Type = "vxlan",
});
var subnet = new Gcore.CloudNetworkSubnet("subnet", new()
{
ProjectId = 1,
RegionId = 1,
Name = "my-subnet",
Cidr = "192.168.10.0/24",
NetworkId = network.Id,
DnsNameservers = new[]
{
"8.8.4.4",
"1.1.1.1",
},
});
// Create an SSH key for instance access
var myKey = new Gcore.CloudSshKey("my_key", new()
{
ProjectId = 1,
Name = "my-keypair",
PublicKey = "ssh-ed25519 ...your public key... user@example.com",
});
// Create a boot volume from an image
var bootVolume = new Gcore.CloudVolume("boot_volume", new()
{
ProjectId = 1,
RegionId = 1,
Name = "my-boot-volume",
Source = "image",
ImageId = "6dc4e521-0c72-462f-b2d4-306bcf15e227",
Size = 20,
TypeName = "ssd_hiiops",
});
// Create an instance with two interfaces: one public, one private
var instanceWithTwoInterfaces = new Gcore.CloudInstance("instance_with_two_interfaces", new()
{
ProjectId = 1,
RegionId = 1,
Flavor = "g1-standard-2-4",
Name = "my-instance",
SshKeyName = myKey.Name,
Volumes = new[]
{
new Gcore.Inputs.CloudInstanceVolumeArgs
{
VolumeId = bootVolume.Id,
},
},
Interfaces = new[]
{
new Gcore.Inputs.CloudInstanceInterfaceArgs
{
Type = "external",
IpFamily = "ipv4",
},
new Gcore.Inputs.CloudInstanceInterfaceArgs
{
Type = "subnet",
NetworkId = network.Id,
SubnetId = subnet.Id,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.CloudNetwork;
import com.pulumi.gcore.CloudNetworkArgs;
import com.pulumi.gcore.CloudNetworkSubnet;
import com.pulumi.gcore.CloudNetworkSubnetArgs;
import com.pulumi.gcore.CloudSshKey;
import com.pulumi.gcore.CloudSshKeyArgs;
import com.pulumi.gcore.CloudVolume;
import com.pulumi.gcore.CloudVolumeArgs;
import com.pulumi.gcore.CloudInstance;
import com.pulumi.gcore.CloudInstanceArgs;
import com.pulumi.gcore.inputs.CloudInstanceVolumeArgs;
import com.pulumi.gcore.inputs.CloudInstanceInterfaceArgs;
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) {
// Create a private network and subnet
var network = new CloudNetwork("network", CloudNetworkArgs.builder()
.projectId(1.0)
.regionId(1.0)
.name("my-network")
.type("vxlan")
.build());
var subnet = new CloudNetworkSubnet("subnet", CloudNetworkSubnetArgs.builder()
.projectId(1.0)
.regionId(1.0)
.name("my-subnet")
.cidr("192.168.10.0/24")
.networkId(network.id())
.dnsNameservers(
"8.8.4.4",
"1.1.1.1")
.build());
// Create an SSH key for instance access
var myKey = new CloudSshKey("myKey", CloudSshKeyArgs.builder()
.projectId(1.0)
.name("my-keypair")
.publicKey("ssh-ed25519 ...your public key... user@example.com")
.build());
// Create a boot volume from an image
var bootVolume = new CloudVolume("bootVolume", CloudVolumeArgs.builder()
.projectId(1.0)
.regionId(1.0)
.name("my-boot-volume")
.source("image")
.imageId("6dc4e521-0c72-462f-b2d4-306bcf15e227")
.size(20.0)
.typeName("ssd_hiiops")
.build());
// Create an instance with two interfaces: one public, one private
var instanceWithTwoInterfaces = new CloudInstance("instanceWithTwoInterfaces", CloudInstanceArgs.builder()
.projectId(1.0)
.regionId(1.0)
.flavor("g1-standard-2-4")
.name("my-instance")
.sshKeyName(myKey.name())
.volumes(CloudInstanceVolumeArgs.builder()
.volumeId(bootVolume.id())
.build())
.interfaces(
CloudInstanceInterfaceArgs.builder()
.type("external")
.ipFamily("ipv4")
.build(),
CloudInstanceInterfaceArgs.builder()
.type("subnet")
.networkId(network.id())
.subnetId(subnet.id())
.build())
.build());
}
}
resources:
# Create a private network and subnet
network:
type: gcore:CloudNetwork
properties:
projectId: 1
regionId: 1
name: my-network
type: vxlan
subnet:
type: gcore:CloudNetworkSubnet
properties:
projectId: 1
regionId: 1
name: my-subnet
cidr: 192.168.10.0/24
networkId: ${network.id}
dnsNameservers:
- 8.8.4.4
- 1.1.1.1
# Create an SSH key for instance access
myKey:
type: gcore:CloudSshKey
name: my_key
properties:
projectId: 1
name: my-keypair
publicKey: ssh-ed25519 ...your public key... user@example.com
# Create a boot volume from an image
bootVolume:
type: gcore:CloudVolume
name: boot_volume
properties:
projectId: 1
regionId: 1
name: my-boot-volume
source: image
imageId: 6dc4e521-0c72-462f-b2d4-306bcf15e227
size: 20
typeName: ssd_hiiops
# Create an instance with two interfaces: one public, one private
instanceWithTwoInterfaces:
type: gcore:CloudInstance
name: instance_with_two_interfaces
properties:
projectId: 1
regionId: 1
flavor: g1-standard-2-4
name: my-instance
sshKeyName: ${myKey.name}
volumes:
- volumeId: ${bootVolume.id}
interfaces:
- type: external
ipFamily: ipv4
- type: subnet
networkId: ${network.id}
subnetId: ${subnet.id}
Windows instance
Create a Windows instance with a public interface.
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
bootVolumeWindows:
type: gcore:CloudVolume
name: boot_volume_windows
properties:
projectId: 1
regionId: 1
name: my-windows-boot-volume
source: image
imageId: a2c1681c-94e0-4aab-8fa3-09a8e662d4c0
size: 50
typeName: ssd_hiiops
windowsInstance:
type: gcore:CloudInstance
name: windows_instance
properties:
projectId: 1
regionId: 1
flavor: g1w-standard-4-8
name: my-windows-instance
password: my-s3cR3tP@ssw0rd
volumes:
- volumeId: ${bootVolumeWindows.id}
interfaces:
- type: external
ipFamily: ipv4
Dual-stack public interface
Create an instance with both IPv4 and IPv6 addresses on a single interface.
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
// Create an SSH key for instance access
const myKey = new gcore.CloudSshKey("my_key", {
projectId: 1,
name: "my-keypair",
publicKey: "ssh-ed25519 ...your public key... user@example.com",
});
// Create a boot volume from an image
const bootVolume = new gcore.CloudVolume("boot_volume", {
projectId: 1,
regionId: 1,
name: "my-boot-volume",
source: "image",
imageId: "6dc4e521-0c72-462f-b2d4-306bcf15e227",
size: 20,
typeName: "ssd_hiiops",
});
// Create an instance with dual-stack (IPv4 + IPv6) public interface
const instanceWithDualstack = new gcore.CloudInstance("instance_with_dualstack", {
projectId: 1,
regionId: 1,
flavor: "g1-standard-2-4",
name: "my-instance",
sshKeyName: myKey.name,
volumes: [{
volumeId: bootVolume.id,
}],
interfaces: [{
type: "external",
ipFamily: "dual",
}],
});
export const addresses = instanceWithDualstack.addresses;
import pulumi
import pulumi_gcore as gcore
# Create an SSH key for instance access
my_key = gcore.CloudSshKey("my_key",
project_id=1,
name="my-keypair",
public_key="ssh-ed25519 ...your public key... user@example.com")
# Create a boot volume from an image
boot_volume = gcore.CloudVolume("boot_volume",
project_id=1,
region_id=1,
name="my-boot-volume",
source="image",
image_id="6dc4e521-0c72-462f-b2d4-306bcf15e227",
size=20,
type_name="ssd_hiiops")
# Create an instance with dual-stack (IPv4 + IPv6) public interface
instance_with_dualstack = gcore.CloudInstance("instance_with_dualstack",
project_id=1,
region_id=1,
flavor="g1-standard-2-4",
name="my-instance",
ssh_key_name=my_key.name,
volumes=[{
"volume_id": boot_volume.id,
}],
interfaces=[{
"type": "external",
"ip_family": "dual",
}])
pulumi.export("addresses", instance_with_dualstack.addresses)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/v2/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create an SSH key for instance access
myKey, err := gcore.NewCloudSshKey(ctx, "my_key", &gcore.CloudSshKeyArgs{
ProjectId: pulumi.Float64(1),
Name: pulumi.String("my-keypair"),
PublicKey: pulumi.String("ssh-ed25519 ...your public key... user@example.com"),
})
if err != nil {
return err
}
// Create a boot volume from an image
bootVolume, err := gcore.NewCloudVolume(ctx, "boot_volume", &gcore.CloudVolumeArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Name: pulumi.String("my-boot-volume"),
Source: pulumi.String("image"),
ImageId: pulumi.String("6dc4e521-0c72-462f-b2d4-306bcf15e227"),
Size: pulumi.Float64(20),
TypeName: pulumi.String("ssd_hiiops"),
})
if err != nil {
return err
}
// Create an instance with dual-stack (IPv4 + IPv6) public interface
instanceWithDualstack, err := gcore.NewCloudInstance(ctx, "instance_with_dualstack", &gcore.CloudInstanceArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Flavor: pulumi.String("g1-standard-2-4"),
Name: pulumi.String("my-instance"),
SshKeyName: myKey.Name,
Volumes: gcore.CloudInstanceVolumeArray{
&gcore.CloudInstanceVolumeArgs{
VolumeId: bootVolume.ID(),
},
},
Interfaces: gcore.CloudInstanceInterfaceArray{
&gcore.CloudInstanceInterfaceArgs{
Type: pulumi.String("external"),
IpFamily: pulumi.String("dual"),
},
},
})
if err != nil {
return err
}
ctx.Export("addresses", instanceWithDualstack.Addresses)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
// Create an SSH key for instance access
var myKey = new Gcore.CloudSshKey("my_key", new()
{
ProjectId = 1,
Name = "my-keypair",
PublicKey = "ssh-ed25519 ...your public key... user@example.com",
});
// Create a boot volume from an image
var bootVolume = new Gcore.CloudVolume("boot_volume", new()
{
ProjectId = 1,
RegionId = 1,
Name = "my-boot-volume",
Source = "image",
ImageId = "6dc4e521-0c72-462f-b2d4-306bcf15e227",
Size = 20,
TypeName = "ssd_hiiops",
});
// Create an instance with dual-stack (IPv4 + IPv6) public interface
var instanceWithDualstack = new Gcore.CloudInstance("instance_with_dualstack", new()
{
ProjectId = 1,
RegionId = 1,
Flavor = "g1-standard-2-4",
Name = "my-instance",
SshKeyName = myKey.Name,
Volumes = new[]
{
new Gcore.Inputs.CloudInstanceVolumeArgs
{
VolumeId = bootVolume.Id,
},
},
Interfaces = new[]
{
new Gcore.Inputs.CloudInstanceInterfaceArgs
{
Type = "external",
IpFamily = "dual",
},
},
});
return new Dictionary<string, object?>
{
["addresses"] = instanceWithDualstack.Addresses,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.CloudSshKey;
import com.pulumi.gcore.CloudSshKeyArgs;
import com.pulumi.gcore.CloudVolume;
import com.pulumi.gcore.CloudVolumeArgs;
import com.pulumi.gcore.CloudInstance;
import com.pulumi.gcore.CloudInstanceArgs;
import com.pulumi.gcore.inputs.CloudInstanceVolumeArgs;
import com.pulumi.gcore.inputs.CloudInstanceInterfaceArgs;
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) {
// Create an SSH key for instance access
var myKey = new CloudSshKey("myKey", CloudSshKeyArgs.builder()
.projectId(1.0)
.name("my-keypair")
.publicKey("ssh-ed25519 ...your public key... user@example.com")
.build());
// Create a boot volume from an image
var bootVolume = new CloudVolume("bootVolume", CloudVolumeArgs.builder()
.projectId(1.0)
.regionId(1.0)
.name("my-boot-volume")
.source("image")
.imageId("6dc4e521-0c72-462f-b2d4-306bcf15e227")
.size(20.0)
.typeName("ssd_hiiops")
.build());
// Create an instance with dual-stack (IPv4 + IPv6) public interface
var instanceWithDualstack = new CloudInstance("instanceWithDualstack", CloudInstanceArgs.builder()
.projectId(1.0)
.regionId(1.0)
.flavor("g1-standard-2-4")
.name("my-instance")
.sshKeyName(myKey.name())
.volumes(CloudInstanceVolumeArgs.builder()
.volumeId(bootVolume.id())
.build())
.interfaces(CloudInstanceInterfaceArgs.builder()
.type("external")
.ipFamily("dual")
.build())
.build());
ctx.export("addresses", instanceWithDualstack.addresses());
}
}
resources:
# Create an SSH key for instance access
myKey:
type: gcore:CloudSshKey
name: my_key
properties:
projectId: 1
name: my-keypair
publicKey: ssh-ed25519 ...your public key... user@example.com
# Create a boot volume from an image
bootVolume:
type: gcore:CloudVolume
name: boot_volume
properties:
projectId: 1
regionId: 1
name: my-boot-volume
source: image
imageId: 6dc4e521-0c72-462f-b2d4-306bcf15e227
size: 20
typeName: ssd_hiiops
# Create an instance with dual-stack (IPv4 + IPv6) public interface
instanceWithDualstack:
type: gcore:CloudInstance
name: instance_with_dualstack
properties:
projectId: 1
regionId: 1
flavor: g1-standard-2-4
name: my-instance
sshKeyName: ${myKey.name}
volumes:
- volumeId: ${bootVolume.id}
interfaces:
- type: external
ipFamily: dual
outputs:
addresses: ${instanceWithDualstack.addresses}
Instance with floating IP
Create an instance and attach a floating IP address for external access.
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
// Create a private network and subnet
const network = new gcore.CloudNetwork("network", {
projectId: 1,
regionId: 1,
name: "my-network",
type: "vxlan",
});
const subnet = new gcore.CloudNetworkSubnet("subnet", {
projectId: 1,
regionId: 1,
name: "my-subnet",
cidr: "192.168.10.0/24",
networkId: network.id,
dnsNameservers: [
"8.8.4.4",
"1.1.1.1",
],
});
// Create an SSH key for instance access
const myKey = new gcore.CloudSshKey("my_key", {
projectId: 1,
name: "my-keypair",
publicKey: "ssh-ed25519 ...your public key... user@example.com",
});
// Create a boot volume from an image
const bootVolume = new gcore.CloudVolume("boot_volume", {
projectId: 1,
regionId: 1,
name: "my-boot-volume",
source: "image",
imageId: "6dc4e521-0c72-462f-b2d4-306bcf15e227",
size: 20,
typeName: "ssd_hiiops",
});
// Reserve a fixed IP on the private subnet
const fixedIp = new gcore.CloudReservedFixedIp("fixed_ip", {
projectId: 1,
regionId: 1,
type: "subnet",
networkId: network.id,
subnetId: subnet.id,
});
// Create a floating IP and associate it with the fixed IP
const floatingIp = new gcore.CloudFloatingIp("floating_ip", {
projectId: 1,
regionId: 1,
fixedIpAddress: fixedIp.fixedIpAddress,
portId: fixedIp.portId,
});
// Create an instance with floating IP for external access
const instanceWithFloatingIp = new gcore.CloudInstance("instance_with_floating_ip", {
projectId: 1,
regionId: 1,
flavor: "g1-standard-2-4",
name: "my-instance",
sshKeyName: myKey.name,
volumes: [{
volumeId: bootVolume.id,
}],
interfaces: [{
type: "reserved_fixed_ip",
portId: fixedIp.portId,
floatingIp: {
source: "existing",
existingFloatingId: floatingIp.id,
},
}],
});
import pulumi
import pulumi_gcore as gcore
# Create a private network and subnet
network = gcore.CloudNetwork("network",
project_id=1,
region_id=1,
name="my-network",
type="vxlan")
subnet = gcore.CloudNetworkSubnet("subnet",
project_id=1,
region_id=1,
name="my-subnet",
cidr="192.168.10.0/24",
network_id=network.id,
dns_nameservers=[
"8.8.4.4",
"1.1.1.1",
])
# Create an SSH key for instance access
my_key = gcore.CloudSshKey("my_key",
project_id=1,
name="my-keypair",
public_key="ssh-ed25519 ...your public key... user@example.com")
# Create a boot volume from an image
boot_volume = gcore.CloudVolume("boot_volume",
project_id=1,
region_id=1,
name="my-boot-volume",
source="image",
image_id="6dc4e521-0c72-462f-b2d4-306bcf15e227",
size=20,
type_name="ssd_hiiops")
# Reserve a fixed IP on the private subnet
fixed_ip = gcore.CloudReservedFixedIp("fixed_ip",
project_id=1,
region_id=1,
type="subnet",
network_id=network.id,
subnet_id=subnet.id)
# Create a floating IP and associate it with the fixed IP
floating_ip = gcore.CloudFloatingIp("floating_ip",
project_id=1,
region_id=1,
fixed_ip_address=fixed_ip.fixed_ip_address,
port_id=fixed_ip.port_id)
# Create an instance with floating IP for external access
instance_with_floating_ip = gcore.CloudInstance("instance_with_floating_ip",
project_id=1,
region_id=1,
flavor="g1-standard-2-4",
name="my-instance",
ssh_key_name=my_key.name,
volumes=[{
"volume_id": boot_volume.id,
}],
interfaces=[{
"type": "reserved_fixed_ip",
"port_id": fixed_ip.port_id,
"floating_ip": {
"source": "existing",
"existing_floating_id": floating_ip.id,
},
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/v2/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a private network and subnet
network, err := gcore.NewCloudNetwork(ctx, "network", &gcore.CloudNetworkArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Name: pulumi.String("my-network"),
Type: pulumi.String("vxlan"),
})
if err != nil {
return err
}
subnet, err := gcore.NewCloudNetworkSubnet(ctx, "subnet", &gcore.CloudNetworkSubnetArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Name: pulumi.String("my-subnet"),
Cidr: pulumi.String("192.168.10.0/24"),
NetworkId: network.ID(),
DnsNameservers: pulumi.StringArray{
pulumi.String("8.8.4.4"),
pulumi.String("1.1.1.1"),
},
})
if err != nil {
return err
}
// Create an SSH key for instance access
myKey, err := gcore.NewCloudSshKey(ctx, "my_key", &gcore.CloudSshKeyArgs{
ProjectId: pulumi.Float64(1),
Name: pulumi.String("my-keypair"),
PublicKey: pulumi.String("ssh-ed25519 ...your public key... user@example.com"),
})
if err != nil {
return err
}
// Create a boot volume from an image
bootVolume, err := gcore.NewCloudVolume(ctx, "boot_volume", &gcore.CloudVolumeArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Name: pulumi.String("my-boot-volume"),
Source: pulumi.String("image"),
ImageId: pulumi.String("6dc4e521-0c72-462f-b2d4-306bcf15e227"),
Size: pulumi.Float64(20),
TypeName: pulumi.String("ssd_hiiops"),
})
if err != nil {
return err
}
// Reserve a fixed IP on the private subnet
fixedIp, err := gcore.NewCloudReservedFixedIp(ctx, "fixed_ip", &gcore.CloudReservedFixedIpArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Type: pulumi.String("subnet"),
NetworkId: network.ID(),
SubnetId: subnet.ID(),
})
if err != nil {
return err
}
// Create a floating IP and associate it with the fixed IP
floatingIp, err := gcore.NewCloudFloatingIp(ctx, "floating_ip", &gcore.CloudFloatingIpArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
FixedIpAddress: fixedIp.FixedIpAddress,
PortId: fixedIp.PortId,
})
if err != nil {
return err
}
// Create an instance with floating IP for external access
_, err = gcore.NewCloudInstance(ctx, "instance_with_floating_ip", &gcore.CloudInstanceArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Flavor: pulumi.String("g1-standard-2-4"),
Name: pulumi.String("my-instance"),
SshKeyName: myKey.Name,
Volumes: gcore.CloudInstanceVolumeArray{
&gcore.CloudInstanceVolumeArgs{
VolumeId: bootVolume.ID(),
},
},
Interfaces: gcore.CloudInstanceInterfaceArray{
&gcore.CloudInstanceInterfaceArgs{
Type: pulumi.String("reserved_fixed_ip"),
PortId: fixedIp.PortId,
FloatingIp: &gcore.CloudInstanceInterfaceFloatingIpArgs{
Source: pulumi.String("existing"),
ExistingFloatingId: floatingIp.ID(),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
// Create a private network and subnet
var network = new Gcore.CloudNetwork("network", new()
{
ProjectId = 1,
RegionId = 1,
Name = "my-network",
Type = "vxlan",
});
var subnet = new Gcore.CloudNetworkSubnet("subnet", new()
{
ProjectId = 1,
RegionId = 1,
Name = "my-subnet",
Cidr = "192.168.10.0/24",
NetworkId = network.Id,
DnsNameservers = new[]
{
"8.8.4.4",
"1.1.1.1",
},
});
// Create an SSH key for instance access
var myKey = new Gcore.CloudSshKey("my_key", new()
{
ProjectId = 1,
Name = "my-keypair",
PublicKey = "ssh-ed25519 ...your public key... user@example.com",
});
// Create a boot volume from an image
var bootVolume = new Gcore.CloudVolume("boot_volume", new()
{
ProjectId = 1,
RegionId = 1,
Name = "my-boot-volume",
Source = "image",
ImageId = "6dc4e521-0c72-462f-b2d4-306bcf15e227",
Size = 20,
TypeName = "ssd_hiiops",
});
// Reserve a fixed IP on the private subnet
var fixedIp = new Gcore.CloudReservedFixedIp("fixed_ip", new()
{
ProjectId = 1,
RegionId = 1,
Type = "subnet",
NetworkId = network.Id,
SubnetId = subnet.Id,
});
// Create a floating IP and associate it with the fixed IP
var floatingIp = new Gcore.CloudFloatingIp("floating_ip", new()
{
ProjectId = 1,
RegionId = 1,
FixedIpAddress = fixedIp.FixedIpAddress,
PortId = fixedIp.PortId,
});
// Create an instance with floating IP for external access
var instanceWithFloatingIp = new Gcore.CloudInstance("instance_with_floating_ip", new()
{
ProjectId = 1,
RegionId = 1,
Flavor = "g1-standard-2-4",
Name = "my-instance",
SshKeyName = myKey.Name,
Volumes = new[]
{
new Gcore.Inputs.CloudInstanceVolumeArgs
{
VolumeId = bootVolume.Id,
},
},
Interfaces = new[]
{
new Gcore.Inputs.CloudInstanceInterfaceArgs
{
Type = "reserved_fixed_ip",
PortId = fixedIp.PortId,
FloatingIp = new Gcore.Inputs.CloudInstanceInterfaceFloatingIpArgs
{
Source = "existing",
ExistingFloatingId = floatingIp.Id,
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.CloudNetwork;
import com.pulumi.gcore.CloudNetworkArgs;
import com.pulumi.gcore.CloudNetworkSubnet;
import com.pulumi.gcore.CloudNetworkSubnetArgs;
import com.pulumi.gcore.CloudSshKey;
import com.pulumi.gcore.CloudSshKeyArgs;
import com.pulumi.gcore.CloudVolume;
import com.pulumi.gcore.CloudVolumeArgs;
import com.pulumi.gcore.CloudReservedFixedIp;
import com.pulumi.gcore.CloudReservedFixedIpArgs;
import com.pulumi.gcore.CloudFloatingIp;
import com.pulumi.gcore.CloudFloatingIpArgs;
import com.pulumi.gcore.CloudInstance;
import com.pulumi.gcore.CloudInstanceArgs;
import com.pulumi.gcore.inputs.CloudInstanceVolumeArgs;
import com.pulumi.gcore.inputs.CloudInstanceInterfaceArgs;
import com.pulumi.gcore.inputs.CloudInstanceInterfaceFloatingIpArgs;
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) {
// Create a private network and subnet
var network = new CloudNetwork("network", CloudNetworkArgs.builder()
.projectId(1.0)
.regionId(1.0)
.name("my-network")
.type("vxlan")
.build());
var subnet = new CloudNetworkSubnet("subnet", CloudNetworkSubnetArgs.builder()
.projectId(1.0)
.regionId(1.0)
.name("my-subnet")
.cidr("192.168.10.0/24")
.networkId(network.id())
.dnsNameservers(
"8.8.4.4",
"1.1.1.1")
.build());
// Create an SSH key for instance access
var myKey = new CloudSshKey("myKey", CloudSshKeyArgs.builder()
.projectId(1.0)
.name("my-keypair")
.publicKey("ssh-ed25519 ...your public key... user@example.com")
.build());
// Create a boot volume from an image
var bootVolume = new CloudVolume("bootVolume", CloudVolumeArgs.builder()
.projectId(1.0)
.regionId(1.0)
.name("my-boot-volume")
.source("image")
.imageId("6dc4e521-0c72-462f-b2d4-306bcf15e227")
.size(20.0)
.typeName("ssd_hiiops")
.build());
// Reserve a fixed IP on the private subnet
var fixedIp = new CloudReservedFixedIp("fixedIp", CloudReservedFixedIpArgs.builder()
.projectId(1.0)
.regionId(1.0)
.type("subnet")
.networkId(network.id())
.subnetId(subnet.id())
.build());
// Create a floating IP and associate it with the fixed IP
var floatingIp = new CloudFloatingIp("floatingIp", CloudFloatingIpArgs.builder()
.projectId(1.0)
.regionId(1.0)
.fixedIpAddress(fixedIp.fixedIpAddress())
.portId(fixedIp.portId())
.build());
// Create an instance with floating IP for external access
var instanceWithFloatingIp = new CloudInstance("instanceWithFloatingIp", CloudInstanceArgs.builder()
.projectId(1.0)
.regionId(1.0)
.flavor("g1-standard-2-4")
.name("my-instance")
.sshKeyName(myKey.name())
.volumes(CloudInstanceVolumeArgs.builder()
.volumeId(bootVolume.id())
.build())
.interfaces(CloudInstanceInterfaceArgs.builder()
.type("reserved_fixed_ip")
.portId(fixedIp.portId())
.floatingIp(CloudInstanceInterfaceFloatingIpArgs.builder()
.source("existing")
.existingFloatingId(floatingIp.id())
.build())
.build())
.build());
}
}
resources:
# Create a private network and subnet
network:
type: gcore:CloudNetwork
properties:
projectId: 1
regionId: 1
name: my-network
type: vxlan
subnet:
type: gcore:CloudNetworkSubnet
properties:
projectId: 1
regionId: 1
name: my-subnet
cidr: 192.168.10.0/24
networkId: ${network.id}
dnsNameservers:
- 8.8.4.4
- 1.1.1.1
# Create an SSH key for instance access
myKey:
type: gcore:CloudSshKey
name: my_key
properties:
projectId: 1
name: my-keypair
publicKey: ssh-ed25519 ...your public key... user@example.com
# Create a boot volume from an image
bootVolume:
type: gcore:CloudVolume
name: boot_volume
properties:
projectId: 1
regionId: 1
name: my-boot-volume
source: image
imageId: 6dc4e521-0c72-462f-b2d4-306bcf15e227
size: 20
typeName: ssd_hiiops
# Reserve a fixed IP on the private subnet
fixedIp:
type: gcore:CloudReservedFixedIp
name: fixed_ip
properties:
projectId: 1
regionId: 1
type: subnet
networkId: ${network.id}
subnetId: ${subnet.id}
# Create a floating IP and associate it with the fixed IP
floatingIp:
type: gcore:CloudFloatingIp
name: floating_ip
properties:
projectId: 1
regionId: 1
fixedIpAddress: ${fixedIp.fixedIpAddress}
portId: ${fixedIp.portId}
# Create an instance with floating IP for external access
instanceWithFloatingIp:
type: gcore:CloudInstance
name: instance_with_floating_ip
properties:
projectId: 1
regionId: 1
flavor: g1-standard-2-4
name: my-instance
sshKeyName: ${myKey.name}
volumes:
- volumeId: ${bootVolume.id}
interfaces:
- type: reserved_fixed_ip
portId: ${fixedIp.portId}
floatingIp:
source: existing
existingFloatingId: ${floatingIp.id}
Instance with reserved public IP
Create an instance using a pre-allocated reserved fixed IP address.
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
// Create an SSH key for instance access
const myKey = new gcore.CloudSshKey("my_key", {
projectId: 1,
name: "my-keypair",
publicKey: "ssh-ed25519 ...your public key... user@example.com",
});
// Create a boot volume from an image
const bootVolume = new gcore.CloudVolume("boot_volume", {
projectId: 1,
regionId: 1,
name: "my-boot-volume",
source: "image",
imageId: "6dc4e521-0c72-462f-b2d4-306bcf15e227",
size: 20,
typeName: "ssd_hiiops",
});
// Reserve a public IP address
const externalFixedIp = new gcore.CloudReservedFixedIp("external_fixed_ip", {
projectId: 1,
regionId: 1,
type: "external",
});
// Create an instance using the reserved public IP
const instanceWithReservedAddress = new gcore.CloudInstance("instance_with_reserved_address", {
projectId: 1,
regionId: 1,
flavor: "g1-standard-2-4",
name: "my-instance",
sshKeyName: myKey.name,
volumes: [{
volumeId: bootVolume.id,
}],
interfaces: [{
type: "reserved_fixed_ip",
portId: externalFixedIp.portId,
}],
});
import pulumi
import pulumi_gcore as gcore
# Create an SSH key for instance access
my_key = gcore.CloudSshKey("my_key",
project_id=1,
name="my-keypair",
public_key="ssh-ed25519 ...your public key... user@example.com")
# Create a boot volume from an image
boot_volume = gcore.CloudVolume("boot_volume",
project_id=1,
region_id=1,
name="my-boot-volume",
source="image",
image_id="6dc4e521-0c72-462f-b2d4-306bcf15e227",
size=20,
type_name="ssd_hiiops")
# Reserve a public IP address
external_fixed_ip = gcore.CloudReservedFixedIp("external_fixed_ip",
project_id=1,
region_id=1,
type="external")
# Create an instance using the reserved public IP
instance_with_reserved_address = gcore.CloudInstance("instance_with_reserved_address",
project_id=1,
region_id=1,
flavor="g1-standard-2-4",
name="my-instance",
ssh_key_name=my_key.name,
volumes=[{
"volume_id": boot_volume.id,
}],
interfaces=[{
"type": "reserved_fixed_ip",
"port_id": external_fixed_ip.port_id,
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/v2/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create an SSH key for instance access
myKey, err := gcore.NewCloudSshKey(ctx, "my_key", &gcore.CloudSshKeyArgs{
ProjectId: pulumi.Float64(1),
Name: pulumi.String("my-keypair"),
PublicKey: pulumi.String("ssh-ed25519 ...your public key... user@example.com"),
})
if err != nil {
return err
}
// Create a boot volume from an image
bootVolume, err := gcore.NewCloudVolume(ctx, "boot_volume", &gcore.CloudVolumeArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Name: pulumi.String("my-boot-volume"),
Source: pulumi.String("image"),
ImageId: pulumi.String("6dc4e521-0c72-462f-b2d4-306bcf15e227"),
Size: pulumi.Float64(20),
TypeName: pulumi.String("ssd_hiiops"),
})
if err != nil {
return err
}
// Reserve a public IP address
externalFixedIp, err := gcore.NewCloudReservedFixedIp(ctx, "external_fixed_ip", &gcore.CloudReservedFixedIpArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Type: pulumi.String("external"),
})
if err != nil {
return err
}
// Create an instance using the reserved public IP
_, err = gcore.NewCloudInstance(ctx, "instance_with_reserved_address", &gcore.CloudInstanceArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Flavor: pulumi.String("g1-standard-2-4"),
Name: pulumi.String("my-instance"),
SshKeyName: myKey.Name,
Volumes: gcore.CloudInstanceVolumeArray{
&gcore.CloudInstanceVolumeArgs{
VolumeId: bootVolume.ID(),
},
},
Interfaces: gcore.CloudInstanceInterfaceArray{
&gcore.CloudInstanceInterfaceArgs{
Type: pulumi.String("reserved_fixed_ip"),
PortId: externalFixedIp.PortId,
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
// Create an SSH key for instance access
var myKey = new Gcore.CloudSshKey("my_key", new()
{
ProjectId = 1,
Name = "my-keypair",
PublicKey = "ssh-ed25519 ...your public key... user@example.com",
});
// Create a boot volume from an image
var bootVolume = new Gcore.CloudVolume("boot_volume", new()
{
ProjectId = 1,
RegionId = 1,
Name = "my-boot-volume",
Source = "image",
ImageId = "6dc4e521-0c72-462f-b2d4-306bcf15e227",
Size = 20,
TypeName = "ssd_hiiops",
});
// Reserve a public IP address
var externalFixedIp = new Gcore.CloudReservedFixedIp("external_fixed_ip", new()
{
ProjectId = 1,
RegionId = 1,
Type = "external",
});
// Create an instance using the reserved public IP
var instanceWithReservedAddress = new Gcore.CloudInstance("instance_with_reserved_address", new()
{
ProjectId = 1,
RegionId = 1,
Flavor = "g1-standard-2-4",
Name = "my-instance",
SshKeyName = myKey.Name,
Volumes = new[]
{
new Gcore.Inputs.CloudInstanceVolumeArgs
{
VolumeId = bootVolume.Id,
},
},
Interfaces = new[]
{
new Gcore.Inputs.CloudInstanceInterfaceArgs
{
Type = "reserved_fixed_ip",
PortId = externalFixedIp.PortId,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.CloudSshKey;
import com.pulumi.gcore.CloudSshKeyArgs;
import com.pulumi.gcore.CloudVolume;
import com.pulumi.gcore.CloudVolumeArgs;
import com.pulumi.gcore.CloudReservedFixedIp;
import com.pulumi.gcore.CloudReservedFixedIpArgs;
import com.pulumi.gcore.CloudInstance;
import com.pulumi.gcore.CloudInstanceArgs;
import com.pulumi.gcore.inputs.CloudInstanceVolumeArgs;
import com.pulumi.gcore.inputs.CloudInstanceInterfaceArgs;
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) {
// Create an SSH key for instance access
var myKey = new CloudSshKey("myKey", CloudSshKeyArgs.builder()
.projectId(1.0)
.name("my-keypair")
.publicKey("ssh-ed25519 ...your public key... user@example.com")
.build());
// Create a boot volume from an image
var bootVolume = new CloudVolume("bootVolume", CloudVolumeArgs.builder()
.projectId(1.0)
.regionId(1.0)
.name("my-boot-volume")
.source("image")
.imageId("6dc4e521-0c72-462f-b2d4-306bcf15e227")
.size(20.0)
.typeName("ssd_hiiops")
.build());
// Reserve a public IP address
var externalFixedIp = new CloudReservedFixedIp("externalFixedIp", CloudReservedFixedIpArgs.builder()
.projectId(1.0)
.regionId(1.0)
.type("external")
.build());
// Create an instance using the reserved public IP
var instanceWithReservedAddress = new CloudInstance("instanceWithReservedAddress", CloudInstanceArgs.builder()
.projectId(1.0)
.regionId(1.0)
.flavor("g1-standard-2-4")
.name("my-instance")
.sshKeyName(myKey.name())
.volumes(CloudInstanceVolumeArgs.builder()
.volumeId(bootVolume.id())
.build())
.interfaces(CloudInstanceInterfaceArgs.builder()
.type("reserved_fixed_ip")
.portId(externalFixedIp.portId())
.build())
.build());
}
}
resources:
# Create an SSH key for instance access
myKey:
type: gcore:CloudSshKey
name: my_key
properties:
projectId: 1
name: my-keypair
publicKey: ssh-ed25519 ...your public key... user@example.com
# Create a boot volume from an image
bootVolume:
type: gcore:CloudVolume
name: boot_volume
properties:
projectId: 1
regionId: 1
name: my-boot-volume
source: image
imageId: 6dc4e521-0c72-462f-b2d4-306bcf15e227
size: 20
typeName: ssd_hiiops
# Reserve a public IP address
externalFixedIp:
type: gcore:CloudReservedFixedIp
name: external_fixed_ip
properties:
projectId: 1
regionId: 1
type: external
# Create an instance using the reserved public IP
instanceWithReservedAddress:
type: gcore:CloudInstance
name: instance_with_reserved_address
properties:
projectId: 1
regionId: 1
flavor: g1-standard-2-4
name: my-instance
sshKeyName: ${myKey.name}
volumes:
- volumeId: ${bootVolume.id}
interfaces:
- type: reserved_fixed_ip
portId: ${externalFixedIp.portId}
Instance with custom security group
Create an instance with a custom security group allowing SSH, HTTP, and HTTPS inbound traffic.
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
// Create an SSH key for instance access
const myKey = new gcore.CloudSshKey("my_key", {
projectId: 1,
name: "my-keypair",
publicKey: "ssh-ed25519 ...your public key... user@example.com",
});
// Create a boot volume from an image
const bootVolume = new gcore.CloudVolume("boot_volume", {
projectId: 1,
regionId: 1,
name: "my-boot-volume",
source: "image",
imageId: "6dc4e521-0c72-462f-b2d4-306bcf15e227",
size: 20,
typeName: "ssd_hiiops",
});
// Create a security group, then add rules as separate resources
const webServer = new gcore.CloudSecurityGroup("web_server", {
projectId: 1,
regionId: 1,
name: "web-server-only",
});
const egressLow = new gcore.CloudSecurityGroupRule("egress_low", {
projectId: 1,
regionId: 1,
groupId: webServer.id,
direction: "egress",
ethertype: "IPv4",
protocol: "tcp",
portRangeMin: 1,
portRangeMax: 24,
description: "Allow outgoing TCP except SMTP",
});
const egressHigh = new gcore.CloudSecurityGroupRule("egress_high", {
projectId: 1,
regionId: 1,
groupId: webServer.id,
direction: "egress",
ethertype: "IPv4",
protocol: "tcp",
portRangeMin: 26,
portRangeMax: 65535,
description: "Allow outgoing TCP except SMTP",
});
const ssh = new gcore.CloudSecurityGroupRule("ssh", {
projectId: 1,
regionId: 1,
groupId: webServer.id,
direction: "ingress",
ethertype: "IPv4",
protocol: "tcp",
portRangeMin: 22,
portRangeMax: 22,
description: "Allow SSH",
});
const http = new gcore.CloudSecurityGroupRule("http", {
projectId: 1,
regionId: 1,
groupId: webServer.id,
direction: "ingress",
ethertype: "IPv4",
protocol: "tcp",
portRangeMin: 80,
portRangeMax: 80,
description: "Allow HTTP",
});
const https = new gcore.CloudSecurityGroupRule("https", {
projectId: 1,
regionId: 1,
groupId: webServer.id,
direction: "ingress",
ethertype: "IPv4",
protocol: "tcp",
portRangeMin: 443,
portRangeMax: 443,
description: "Allow HTTPS",
});
// Create an instance with the custom security group
const instanceWithCustomSg = new gcore.CloudInstance("instance_with_custom_sg", {
projectId: 1,
regionId: 1,
flavor: "g1-standard-2-4",
name: "my-instance",
sshKeyName: myKey.name,
volumes: [{
volumeId: bootVolume.id,
}],
interfaces: [{
type: "external",
ipFamily: "ipv4",
securityGroups: [{
id: webServer.id,
}],
}],
securityGroups: [{
id: webServer.id,
}],
});
import pulumi
import pulumi_gcore as gcore
# Create an SSH key for instance access
my_key = gcore.CloudSshKey("my_key",
project_id=1,
name="my-keypair",
public_key="ssh-ed25519 ...your public key... user@example.com")
# Create a boot volume from an image
boot_volume = gcore.CloudVolume("boot_volume",
project_id=1,
region_id=1,
name="my-boot-volume",
source="image",
image_id="6dc4e521-0c72-462f-b2d4-306bcf15e227",
size=20,
type_name="ssd_hiiops")
# Create a security group, then add rules as separate resources
web_server = gcore.CloudSecurityGroup("web_server",
project_id=1,
region_id=1,
name="web-server-only")
egress_low = gcore.CloudSecurityGroupRule("egress_low",
project_id=1,
region_id=1,
group_id=web_server.id,
direction="egress",
ethertype="IPv4",
protocol="tcp",
port_range_min=1,
port_range_max=24,
description="Allow outgoing TCP except SMTP")
egress_high = gcore.CloudSecurityGroupRule("egress_high",
project_id=1,
region_id=1,
group_id=web_server.id,
direction="egress",
ethertype="IPv4",
protocol="tcp",
port_range_min=26,
port_range_max=65535,
description="Allow outgoing TCP except SMTP")
ssh = gcore.CloudSecurityGroupRule("ssh",
project_id=1,
region_id=1,
group_id=web_server.id,
direction="ingress",
ethertype="IPv4",
protocol="tcp",
port_range_min=22,
port_range_max=22,
description="Allow SSH")
http = gcore.CloudSecurityGroupRule("http",
project_id=1,
region_id=1,
group_id=web_server.id,
direction="ingress",
ethertype="IPv4",
protocol="tcp",
port_range_min=80,
port_range_max=80,
description="Allow HTTP")
https = gcore.CloudSecurityGroupRule("https",
project_id=1,
region_id=1,
group_id=web_server.id,
direction="ingress",
ethertype="IPv4",
protocol="tcp",
port_range_min=443,
port_range_max=443,
description="Allow HTTPS")
# Create an instance with the custom security group
instance_with_custom_sg = gcore.CloudInstance("instance_with_custom_sg",
project_id=1,
region_id=1,
flavor="g1-standard-2-4",
name="my-instance",
ssh_key_name=my_key.name,
volumes=[{
"volume_id": boot_volume.id,
}],
interfaces=[{
"type": "external",
"ip_family": "ipv4",
"security_groups": [{
"id": web_server.id,
}],
}],
security_groups=[{
"id": web_server.id,
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/v2/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create an SSH key for instance access
myKey, err := gcore.NewCloudSshKey(ctx, "my_key", &gcore.CloudSshKeyArgs{
ProjectId: pulumi.Float64(1),
Name: pulumi.String("my-keypair"),
PublicKey: pulumi.String("ssh-ed25519 ...your public key... user@example.com"),
})
if err != nil {
return err
}
// Create a boot volume from an image
bootVolume, err := gcore.NewCloudVolume(ctx, "boot_volume", &gcore.CloudVolumeArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Name: pulumi.String("my-boot-volume"),
Source: pulumi.String("image"),
ImageId: pulumi.String("6dc4e521-0c72-462f-b2d4-306bcf15e227"),
Size: pulumi.Float64(20),
TypeName: pulumi.String("ssd_hiiops"),
})
if err != nil {
return err
}
// Create a security group, then add rules as separate resources
webServer, err := gcore.NewCloudSecurityGroup(ctx, "web_server", &gcore.CloudSecurityGroupArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Name: pulumi.String("web-server-only"),
})
if err != nil {
return err
}
_, err = gcore.NewCloudSecurityGroupRule(ctx, "egress_low", &gcore.CloudSecurityGroupRuleArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
GroupId: webServer.ID(),
Direction: pulumi.String("egress"),
Ethertype: pulumi.String("IPv4"),
Protocol: pulumi.String("tcp"),
PortRangeMin: pulumi.Float64(1),
PortRangeMax: pulumi.Float64(24),
Description: pulumi.String("Allow outgoing TCP except SMTP"),
})
if err != nil {
return err
}
_, err = gcore.NewCloudSecurityGroupRule(ctx, "egress_high", &gcore.CloudSecurityGroupRuleArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
GroupId: webServer.ID(),
Direction: pulumi.String("egress"),
Ethertype: pulumi.String("IPv4"),
Protocol: pulumi.String("tcp"),
PortRangeMin: pulumi.Float64(26),
PortRangeMax: pulumi.Float64(65535),
Description: pulumi.String("Allow outgoing TCP except SMTP"),
})
if err != nil {
return err
}
_, err = gcore.NewCloudSecurityGroupRule(ctx, "ssh", &gcore.CloudSecurityGroupRuleArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
GroupId: webServer.ID(),
Direction: pulumi.String("ingress"),
Ethertype: pulumi.String("IPv4"),
Protocol: pulumi.String("tcp"),
PortRangeMin: pulumi.Float64(22),
PortRangeMax: pulumi.Float64(22),
Description: pulumi.String("Allow SSH"),
})
if err != nil {
return err
}
_, err = gcore.NewCloudSecurityGroupRule(ctx, "http", &gcore.CloudSecurityGroupRuleArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
GroupId: webServer.ID(),
Direction: pulumi.String("ingress"),
Ethertype: pulumi.String("IPv4"),
Protocol: pulumi.String("tcp"),
PortRangeMin: pulumi.Float64(80),
PortRangeMax: pulumi.Float64(80),
Description: pulumi.String("Allow HTTP"),
})
if err != nil {
return err
}
_, err = gcore.NewCloudSecurityGroupRule(ctx, "https", &gcore.CloudSecurityGroupRuleArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
GroupId: webServer.ID(),
Direction: pulumi.String("ingress"),
Ethertype: pulumi.String("IPv4"),
Protocol: pulumi.String("tcp"),
PortRangeMin: pulumi.Float64(443),
PortRangeMax: pulumi.Float64(443),
Description: pulumi.String("Allow HTTPS"),
})
if err != nil {
return err
}
// Create an instance with the custom security group
_, err = gcore.NewCloudInstance(ctx, "instance_with_custom_sg", &gcore.CloudInstanceArgs{
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
Flavor: pulumi.String("g1-standard-2-4"),
Name: pulumi.String("my-instance"),
SshKeyName: myKey.Name,
Volumes: gcore.CloudInstanceVolumeArray{
&gcore.CloudInstanceVolumeArgs{
VolumeId: bootVolume.ID(),
},
},
Interfaces: gcore.CloudInstanceInterfaceArray{
&gcore.CloudInstanceInterfaceArgs{
Type: pulumi.String("external"),
IpFamily: pulumi.String("ipv4"),
SecurityGroups: gcore.CloudInstanceInterfaceSecurityGroupArray{
&gcore.CloudInstanceInterfaceSecurityGroupArgs{
Id: webServer.ID(),
},
},
},
},
SecurityGroups: gcore.CloudInstanceSecurityGroupArray{
&gcore.CloudInstanceSecurityGroupArgs{
Id: webServer.ID(),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
// Create an SSH key for instance access
var myKey = new Gcore.CloudSshKey("my_key", new()
{
ProjectId = 1,
Name = "my-keypair",
PublicKey = "ssh-ed25519 ...your public key... user@example.com",
});
// Create a boot volume from an image
var bootVolume = new Gcore.CloudVolume("boot_volume", new()
{
ProjectId = 1,
RegionId = 1,
Name = "my-boot-volume",
Source = "image",
ImageId = "6dc4e521-0c72-462f-b2d4-306bcf15e227",
Size = 20,
TypeName = "ssd_hiiops",
});
// Create a security group, then add rules as separate resources
var webServer = new Gcore.CloudSecurityGroup("web_server", new()
{
ProjectId = 1,
RegionId = 1,
Name = "web-server-only",
});
var egressLow = new Gcore.CloudSecurityGroupRule("egress_low", new()
{
ProjectId = 1,
RegionId = 1,
GroupId = webServer.Id,
Direction = "egress",
Ethertype = "IPv4",
Protocol = "tcp",
PortRangeMin = 1,
PortRangeMax = 24,
Description = "Allow outgoing TCP except SMTP",
});
var egressHigh = new Gcore.CloudSecurityGroupRule("egress_high", new()
{
ProjectId = 1,
RegionId = 1,
GroupId = webServer.Id,
Direction = "egress",
Ethertype = "IPv4",
Protocol = "tcp",
PortRangeMin = 26,
PortRangeMax = 65535,
Description = "Allow outgoing TCP except SMTP",
});
var ssh = new Gcore.CloudSecurityGroupRule("ssh", new()
{
ProjectId = 1,
RegionId = 1,
GroupId = webServer.Id,
Direction = "ingress",
Ethertype = "IPv4",
Protocol = "tcp",
PortRangeMin = 22,
PortRangeMax = 22,
Description = "Allow SSH",
});
var http = new Gcore.CloudSecurityGroupRule("http", new()
{
ProjectId = 1,
RegionId = 1,
GroupId = webServer.Id,
Direction = "ingress",
Ethertype = "IPv4",
Protocol = "tcp",
PortRangeMin = 80,
PortRangeMax = 80,
Description = "Allow HTTP",
});
var https = new Gcore.CloudSecurityGroupRule("https", new()
{
ProjectId = 1,
RegionId = 1,
GroupId = webServer.Id,
Direction = "ingress",
Ethertype = "IPv4",
Protocol = "tcp",
PortRangeMin = 443,
PortRangeMax = 443,
Description = "Allow HTTPS",
});
// Create an instance with the custom security group
var instanceWithCustomSg = new Gcore.CloudInstance("instance_with_custom_sg", new()
{
ProjectId = 1,
RegionId = 1,
Flavor = "g1-standard-2-4",
Name = "my-instance",
SshKeyName = myKey.Name,
Volumes = new[]
{
new Gcore.Inputs.CloudInstanceVolumeArgs
{
VolumeId = bootVolume.Id,
},
},
Interfaces = new[]
{
new Gcore.Inputs.CloudInstanceInterfaceArgs
{
Type = "external",
IpFamily = "ipv4",
SecurityGroups = new[]
{
new Gcore.Inputs.CloudInstanceInterfaceSecurityGroupArgs
{
Id = webServer.Id,
},
},
},
},
SecurityGroups = new[]
{
new Gcore.Inputs.CloudInstanceSecurityGroupArgs
{
Id = webServer.Id,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.CloudSshKey;
import com.pulumi.gcore.CloudSshKeyArgs;
import com.pulumi.gcore.CloudVolume;
import com.pulumi.gcore.CloudVolumeArgs;
import com.pulumi.gcore.CloudSecurityGroup;
import com.pulumi.gcore.CloudSecurityGroupArgs;
import com.pulumi.gcore.CloudSecurityGroupRule;
import com.pulumi.gcore.CloudSecurityGroupRuleArgs;
import com.pulumi.gcore.CloudInstance;
import com.pulumi.gcore.CloudInstanceArgs;
import com.pulumi.gcore.inputs.CloudInstanceVolumeArgs;
import com.pulumi.gcore.inputs.CloudInstanceInterfaceArgs;
import com.pulumi.gcore.inputs.CloudInstanceSecurityGroupArgs;
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) {
// Create an SSH key for instance access
var myKey = new CloudSshKey("myKey", CloudSshKeyArgs.builder()
.projectId(1.0)
.name("my-keypair")
.publicKey("ssh-ed25519 ...your public key... user@example.com")
.build());
// Create a boot volume from an image
var bootVolume = new CloudVolume("bootVolume", CloudVolumeArgs.builder()
.projectId(1.0)
.regionId(1.0)
.name("my-boot-volume")
.source("image")
.imageId("6dc4e521-0c72-462f-b2d4-306bcf15e227")
.size(20.0)
.typeName("ssd_hiiops")
.build());
// Create a security group, then add rules as separate resources
var webServer = new CloudSecurityGroup("webServer", CloudSecurityGroupArgs.builder()
.projectId(1.0)
.regionId(1.0)
.name("web-server-only")
.build());
var egressLow = new CloudSecurityGroupRule("egressLow", CloudSecurityGroupRuleArgs.builder()
.projectId(1.0)
.regionId(1.0)
.groupId(webServer.id())
.direction("egress")
.ethertype("IPv4")
.protocol("tcp")
.portRangeMin(1.0)
.portRangeMax(24.0)
.description("Allow outgoing TCP except SMTP")
.build());
var egressHigh = new CloudSecurityGroupRule("egressHigh", CloudSecurityGroupRuleArgs.builder()
.projectId(1.0)
.regionId(1.0)
.groupId(webServer.id())
.direction("egress")
.ethertype("IPv4")
.protocol("tcp")
.portRangeMin(26.0)
.portRangeMax(65535.0)
.description("Allow outgoing TCP except SMTP")
.build());
var ssh = new CloudSecurityGroupRule("ssh", CloudSecurityGroupRuleArgs.builder()
.projectId(1.0)
.regionId(1.0)
.groupId(webServer.id())
.direction("ingress")
.ethertype("IPv4")
.protocol("tcp")
.portRangeMin(22.0)
.portRangeMax(22.0)
.description("Allow SSH")
.build());
var http = new CloudSecurityGroupRule("http", CloudSecurityGroupRuleArgs.builder()
.projectId(1.0)
.regionId(1.0)
.groupId(webServer.id())
.direction("ingress")
.ethertype("IPv4")
.protocol("tcp")
.portRangeMin(80.0)
.portRangeMax(80.0)
.description("Allow HTTP")
.build());
var https = new CloudSecurityGroupRule("https", CloudSecurityGroupRuleArgs.builder()
.projectId(1.0)
.regionId(1.0)
.groupId(webServer.id())
.direction("ingress")
.ethertype("IPv4")
.protocol("tcp")
.portRangeMin(443.0)
.portRangeMax(443.0)
.description("Allow HTTPS")
.build());
// Create an instance with the custom security group
var instanceWithCustomSg = new CloudInstance("instanceWithCustomSg", CloudInstanceArgs.builder()
.projectId(1.0)
.regionId(1.0)
.flavor("g1-standard-2-4")
.name("my-instance")
.sshKeyName(myKey.name())
.volumes(CloudInstanceVolumeArgs.builder()
.volumeId(bootVolume.id())
.build())
.interfaces(CloudInstanceInterfaceArgs.builder()
.type("external")
.ipFamily("ipv4")
.securityGroups(CloudInstanceInterfaceSecurityGroupArgs.builder()
.id(webServer.id())
.build())
.build())
.securityGroups(CloudInstanceSecurityGroupArgs.builder()
.id(webServer.id())
.build())
.build());
}
}
resources:
# Create an SSH key for instance access
myKey:
type: gcore:CloudSshKey
name: my_key
properties:
projectId: 1
name: my-keypair
publicKey: ssh-ed25519 ...your public key... user@example.com
# Create a boot volume from an image
bootVolume:
type: gcore:CloudVolume
name: boot_volume
properties:
projectId: 1
regionId: 1
name: my-boot-volume
source: image
imageId: 6dc4e521-0c72-462f-b2d4-306bcf15e227
size: 20
typeName: ssd_hiiops
# Create a security group, then add rules as separate resources
webServer:
type: gcore:CloudSecurityGroup
name: web_server
properties:
projectId: 1
regionId: 1
name: web-server-only
egressLow:
type: gcore:CloudSecurityGroupRule
name: egress_low
properties:
projectId: 1
regionId: 1
groupId: ${webServer.id}
direction: egress
ethertype: IPv4
protocol: tcp
portRangeMin: 1
portRangeMax: 24
description: Allow outgoing TCP except SMTP
egressHigh:
type: gcore:CloudSecurityGroupRule
name: egress_high
properties:
projectId: 1
regionId: 1
groupId: ${webServer.id}
direction: egress
ethertype: IPv4
protocol: tcp
portRangeMin: 26
portRangeMax: 65535
description: Allow outgoing TCP except SMTP
ssh:
type: gcore:CloudSecurityGroupRule
properties:
projectId: 1
regionId: 1
groupId: ${webServer.id}
direction: ingress
ethertype: IPv4
protocol: tcp
portRangeMin: 22
portRangeMax: 22
description: Allow SSH
http:
type: gcore:CloudSecurityGroupRule
properties:
projectId: 1
regionId: 1
groupId: ${webServer.id}
direction: ingress
ethertype: IPv4
protocol: tcp
portRangeMin: 80
portRangeMax: 80
description: Allow HTTP
https:
type: gcore:CloudSecurityGroupRule
properties:
projectId: 1
regionId: 1
groupId: ${webServer.id}
direction: ingress
ethertype: IPv4
protocol: tcp
portRangeMin: 443
portRangeMax: 443
description: Allow HTTPS
# Create an instance with the custom security group
instanceWithCustomSg:
type: gcore:CloudInstance
name: instance_with_custom_sg
properties:
projectId: 1
regionId: 1
flavor: g1-standard-2-4
name: my-instance
sshKeyName: ${myKey.name}
volumes:
- volumeId: ${bootVolume.id}
interfaces:
- type: external
ipFamily: ipv4
securityGroups:
- id: ${webServer.id}
securityGroups:
- id: ${webServer.id}
Create CloudInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CloudInstance(name: string, args: CloudInstanceArgs, opts?: CustomResourceOptions);@overload
def CloudInstance(resource_name: str,
args: CloudInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CloudInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
interfaces: Optional[Sequence[CloudInstanceInterfaceArgs]] = None,
volumes: Optional[Sequence[CloudInstanceVolumeArgs]] = None,
flavor: Optional[str] = None,
project_id: Optional[float] = None,
security_groups: Optional[Sequence[CloudInstanceSecurityGroupArgs]] = None,
name_template: Optional[str] = None,
password_wo: Optional[str] = None,
password_wo_version: Optional[float] = None,
allow_app_ports: Optional[bool] = None,
region_id: Optional[float] = None,
name: Optional[str] = None,
servergroup_id: Optional[str] = None,
ssh_key_name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
user_data: Optional[str] = None,
username: Optional[str] = None,
vm_state: Optional[str] = None,
configuration: Optional[Mapping[str, str]] = None)func NewCloudInstance(ctx *Context, name string, args CloudInstanceArgs, opts ...ResourceOption) (*CloudInstance, error)public CloudInstance(string name, CloudInstanceArgs args, CustomResourceOptions? opts = null)
public CloudInstance(String name, CloudInstanceArgs args)
public CloudInstance(String name, CloudInstanceArgs args, CustomResourceOptions options)
type: gcore:CloudInstance
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 CloudInstanceArgs
- 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 CloudInstanceArgs
- 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 CloudInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CloudInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CloudInstanceArgs
- 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 cloudInstanceResource = new Gcore.CloudInstance("cloudInstanceResource", new()
{
Interfaces = new[]
{
new Gcore.Inputs.CloudInstanceInterfaceArgs
{
Type = "string",
FloatingIp = new Gcore.Inputs.CloudInstanceInterfaceFloatingIpArgs
{
Source = "string",
ExistingFloatingId = "string",
},
InterfaceName = "string",
IpAddress = "string",
IpFamily = "string",
NetworkId = "string",
PortId = "string",
SecurityGroups = new[]
{
new Gcore.Inputs.CloudInstanceInterfaceSecurityGroupArgs
{
Id = "string",
},
},
SubnetId = "string",
},
},
Volumes = new[]
{
new Gcore.Inputs.CloudInstanceVolumeArgs
{
VolumeId = "string",
AttachmentTag = "string",
BootIndex = 0,
},
},
Flavor = "string",
ProjectId = 0,
SecurityGroups = new[]
{
new Gcore.Inputs.CloudInstanceSecurityGroupArgs
{
Id = "string",
},
},
NameTemplate = "string",
PasswordWo = "string",
PasswordWoVersion = 0,
AllowAppPorts = false,
RegionId = 0,
Name = "string",
ServergroupId = "string",
SshKeyName = "string",
Tags =
{
{ "string", "string" },
},
UserData = "string",
Username = "string",
VmState = "string",
Configuration =
{
{ "string", "string" },
},
});
example, err := gcore.NewCloudInstance(ctx, "cloudInstanceResource", &gcore.CloudInstanceArgs{
Interfaces: gcore.CloudInstanceInterfaceArray{
&gcore.CloudInstanceInterfaceArgs{
Type: pulumi.String("string"),
FloatingIp: &gcore.CloudInstanceInterfaceFloatingIpArgs{
Source: pulumi.String("string"),
ExistingFloatingId: pulumi.String("string"),
},
InterfaceName: pulumi.String("string"),
IpAddress: pulumi.String("string"),
IpFamily: pulumi.String("string"),
NetworkId: pulumi.String("string"),
PortId: pulumi.String("string"),
SecurityGroups: gcore.CloudInstanceInterfaceSecurityGroupArray{
&gcore.CloudInstanceInterfaceSecurityGroupArgs{
Id: pulumi.String("string"),
},
},
SubnetId: pulumi.String("string"),
},
},
Volumes: gcore.CloudInstanceVolumeArray{
&gcore.CloudInstanceVolumeArgs{
VolumeId: pulumi.String("string"),
AttachmentTag: pulumi.String("string"),
BootIndex: pulumi.Float64(0),
},
},
Flavor: pulumi.String("string"),
ProjectId: pulumi.Float64(0),
SecurityGroups: gcore.CloudInstanceSecurityGroupArray{
&gcore.CloudInstanceSecurityGroupArgs{
Id: pulumi.String("string"),
},
},
NameTemplate: pulumi.String("string"),
PasswordWo: pulumi.String("string"),
PasswordWoVersion: pulumi.Float64(0),
AllowAppPorts: pulumi.Bool(false),
RegionId: pulumi.Float64(0),
Name: pulumi.String("string"),
ServergroupId: pulumi.String("string"),
SshKeyName: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
UserData: pulumi.String("string"),
Username: pulumi.String("string"),
VmState: pulumi.String("string"),
Configuration: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var cloudInstanceResource = new CloudInstance("cloudInstanceResource", CloudInstanceArgs.builder()
.interfaces(CloudInstanceInterfaceArgs.builder()
.type("string")
.floatingIp(CloudInstanceInterfaceFloatingIpArgs.builder()
.source("string")
.existingFloatingId("string")
.build())
.interfaceName("string")
.ipAddress("string")
.ipFamily("string")
.networkId("string")
.portId("string")
.securityGroups(CloudInstanceInterfaceSecurityGroupArgs.builder()
.id("string")
.build())
.subnetId("string")
.build())
.volumes(CloudInstanceVolumeArgs.builder()
.volumeId("string")
.attachmentTag("string")
.bootIndex(0.0)
.build())
.flavor("string")
.projectId(0.0)
.securityGroups(CloudInstanceSecurityGroupArgs.builder()
.id("string")
.build())
.nameTemplate("string")
.passwordWo("string")
.passwordWoVersion(0.0)
.allowAppPorts(false)
.regionId(0.0)
.name("string")
.servergroupId("string")
.sshKeyName("string")
.tags(Map.of("string", "string"))
.userData("string")
.username("string")
.vmState("string")
.configuration(Map.of("string", "string"))
.build());
cloud_instance_resource = gcore.CloudInstance("cloudInstanceResource",
interfaces=[{
"type": "string",
"floating_ip": {
"source": "string",
"existing_floating_id": "string",
},
"interface_name": "string",
"ip_address": "string",
"ip_family": "string",
"network_id": "string",
"port_id": "string",
"security_groups": [{
"id": "string",
}],
"subnet_id": "string",
}],
volumes=[{
"volume_id": "string",
"attachment_tag": "string",
"boot_index": 0,
}],
flavor="string",
project_id=0,
security_groups=[{
"id": "string",
}],
name_template="string",
password_wo="string",
password_wo_version=0,
allow_app_ports=False,
region_id=0,
name="string",
servergroup_id="string",
ssh_key_name="string",
tags={
"string": "string",
},
user_data="string",
username="string",
vm_state="string",
configuration={
"string": "string",
})
const cloudInstanceResource = new gcore.CloudInstance("cloudInstanceResource", {
interfaces: [{
type: "string",
floatingIp: {
source: "string",
existingFloatingId: "string",
},
interfaceName: "string",
ipAddress: "string",
ipFamily: "string",
networkId: "string",
portId: "string",
securityGroups: [{
id: "string",
}],
subnetId: "string",
}],
volumes: [{
volumeId: "string",
attachmentTag: "string",
bootIndex: 0,
}],
flavor: "string",
projectId: 0,
securityGroups: [{
id: "string",
}],
nameTemplate: "string",
passwordWo: "string",
passwordWoVersion: 0,
allowAppPorts: false,
regionId: 0,
name: "string",
servergroupId: "string",
sshKeyName: "string",
tags: {
string: "string",
},
userData: "string",
username: "string",
vmState: "string",
configuration: {
string: "string",
},
});
type: gcore:CloudInstance
properties:
allowAppPorts: false
configuration:
string: string
flavor: string
interfaces:
- floatingIp:
existingFloatingId: string
source: string
interfaceName: string
ipAddress: string
ipFamily: string
networkId: string
portId: string
securityGroups:
- id: string
subnetId: string
type: string
name: string
nameTemplate: string
passwordWo: string
passwordWoVersion: 0
projectId: 0
regionId: 0
securityGroups:
- id: string
servergroupId: string
sshKeyName: string
tags:
string: string
userData: string
username: string
vmState: string
volumes:
- attachmentTag: string
bootIndex: 0
volumeId: string
CloudInstance 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 CloudInstance resource accepts the following input properties:
- Flavor string
- The flavor of the instance.
- Interfaces
List<Cloud
Instance Interface> - A list of network interfaces for the instance. You can create one or more interfaces - private, public, or both.
- Volumes
List<Cloud
Instance Volume> - List of existing volumes to attach to the instance. Create volumes separately using gcorecloudvolume resource.
- Allow
App boolPorts - Set to
trueif creating the instance from anapptemplate. This allows application ports in the security group for instances created from a marketplace application template. - Configuration Dictionary<string, string>
- Parameters for the application template if creating the instance from an
apptemplate. - Name string
- Instance name.
- Name
Template string - If you want the instance name to be automatically generated based on IP addresses, you can provide a name template instead of specifying the name manually. The template should include a placeholder that will be replaced during provisioning. Supported placeholders are:
{ip_octets}(last 3 octets of the IP),{two_ip_octets}, and{one_ip_octet}. - Password
Wo string - For Linux instances, 'username' and 'password' are used to create a new user. When only 'password' is provided, it is set as the password for the default user of the image. For Windows instances, 'username' cannot be specified. Use the 'password' field to set the password for the 'Admin' user on Windows. Use the 'user_data' field to provide a script to create new users on Windows. The password of the Admin user cannot be updated via 'user_data'.
- Password
Wo doubleVersion - Instance password write-only version. Used to trigger updates of the write-only password field.
- Project
Id double - Project ID. If not specified, uses GCORE_CLOUD_PROJECT_ID environment variable.
- Region
Id double - Region ID. If not specified, uses GCORE_CLOUD_REGION_ID environment variable.
- Security
Groups List<CloudInstance Security Group> - Specifies security group UUIDs to be applied to all instance network interfaces.
- Servergroup
Id string Placement group ID for instance placement policy.
Supported group types:
anti-affinity: Ensures instances are placed on different hosts for high availability.affinity: Places instances on the same host for low-latency communication.soft-anti-affinity: Tries to place instances on different hosts but allows sharing if needed.
- Ssh
Key stringName - Specifies the name of the SSH keypair, created via the
/v1/
ssh_keysendpoint. - Dictionary<string, string>
- Key-value tags to associate with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Both tag keys and values have a maximum length of 255 characters. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- User
Data string - String in base64 format. For Linux instances, 'user_data' is ignored when 'password' field is provided. For Windows instances, Admin user password is set by 'password' field and cannot be updated via 'user_data'. Examples of the
user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html - Username string
- For Linux instances, 'username' and 'password' are used to create a new user. For Windows instances, 'username' cannot be specified. Use 'password' field to set the password for the 'Admin' user on Windows.
- Vm
State string - Virtual machine state. Set to 'active' to start the instance or 'stopped' to stop it. Available values: "active", "stopped".
- Flavor string
- The flavor of the instance.
- Interfaces
[]Cloud
Instance Interface Args - A list of network interfaces for the instance. You can create one or more interfaces - private, public, or both.
- Volumes
[]Cloud
Instance Volume Args - List of existing volumes to attach to the instance. Create volumes separately using gcorecloudvolume resource.
- Allow
App boolPorts - Set to
trueif creating the instance from anapptemplate. This allows application ports in the security group for instances created from a marketplace application template. - Configuration map[string]string
- Parameters for the application template if creating the instance from an
apptemplate. - Name string
- Instance name.
- Name
Template string - If you want the instance name to be automatically generated based on IP addresses, you can provide a name template instead of specifying the name manually. The template should include a placeholder that will be replaced during provisioning. Supported placeholders are:
{ip_octets}(last 3 octets of the IP),{two_ip_octets}, and{one_ip_octet}. - Password
Wo string - For Linux instances, 'username' and 'password' are used to create a new user. When only 'password' is provided, it is set as the password for the default user of the image. For Windows instances, 'username' cannot be specified. Use the 'password' field to set the password for the 'Admin' user on Windows. Use the 'user_data' field to provide a script to create new users on Windows. The password of the Admin user cannot be updated via 'user_data'.
- Password
Wo float64Version - Instance password write-only version. Used to trigger updates of the write-only password field.
- Project
Id float64 - Project ID. If not specified, uses GCORE_CLOUD_PROJECT_ID environment variable.
- Region
Id float64 - Region ID. If not specified, uses GCORE_CLOUD_REGION_ID environment variable.
- Security
Groups []CloudInstance Security Group Args - Specifies security group UUIDs to be applied to all instance network interfaces.
- Servergroup
Id string Placement group ID for instance placement policy.
Supported group types:
anti-affinity: Ensures instances are placed on different hosts for high availability.affinity: Places instances on the same host for low-latency communication.soft-anti-affinity: Tries to place instances on different hosts but allows sharing if needed.
- Ssh
Key stringName - Specifies the name of the SSH keypair, created via the
/v1/
ssh_keysendpoint. - map[string]string
- Key-value tags to associate with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Both tag keys and values have a maximum length of 255 characters. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- User
Data string - String in base64 format. For Linux instances, 'user_data' is ignored when 'password' field is provided. For Windows instances, Admin user password is set by 'password' field and cannot be updated via 'user_data'. Examples of the
user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html - Username string
- For Linux instances, 'username' and 'password' are used to create a new user. For Windows instances, 'username' cannot be specified. Use 'password' field to set the password for the 'Admin' user on Windows.
- Vm
State string - Virtual machine state. Set to 'active' to start the instance or 'stopped' to stop it. Available values: "active", "stopped".
- flavor String
- The flavor of the instance.
- interfaces
List<Cloud
Instance Interface> - A list of network interfaces for the instance. You can create one or more interfaces - private, public, or both.
- volumes
List<Cloud
Instance Volume> - List of existing volumes to attach to the instance. Create volumes separately using gcorecloudvolume resource.
- allow
App BooleanPorts - Set to
trueif creating the instance from anapptemplate. This allows application ports in the security group for instances created from a marketplace application template. - configuration Map<String,String>
- Parameters for the application template if creating the instance from an
apptemplate. - name String
- Instance name.
- name
Template String - If you want the instance name to be automatically generated based on IP addresses, you can provide a name template instead of specifying the name manually. The template should include a placeholder that will be replaced during provisioning. Supported placeholders are:
{ip_octets}(last 3 octets of the IP),{two_ip_octets}, and{one_ip_octet}. - password
Wo String - For Linux instances, 'username' and 'password' are used to create a new user. When only 'password' is provided, it is set as the password for the default user of the image. For Windows instances, 'username' cannot be specified. Use the 'password' field to set the password for the 'Admin' user on Windows. Use the 'user_data' field to provide a script to create new users on Windows. The password of the Admin user cannot be updated via 'user_data'.
- password
Wo DoubleVersion - Instance password write-only version. Used to trigger updates of the write-only password field.
- project
Id Double - Project ID. If not specified, uses GCORE_CLOUD_PROJECT_ID environment variable.
- region
Id Double - Region ID. If not specified, uses GCORE_CLOUD_REGION_ID environment variable.
- security
Groups List<CloudInstance Security Group> - Specifies security group UUIDs to be applied to all instance network interfaces.
- servergroup
Id String Placement group ID for instance placement policy.
Supported group types:
anti-affinity: Ensures instances are placed on different hosts for high availability.affinity: Places instances on the same host for low-latency communication.soft-anti-affinity: Tries to place instances on different hosts but allows sharing if needed.
- ssh
Key StringName - Specifies the name of the SSH keypair, created via the
/v1/
ssh_keysendpoint. - Map<String,String>
- Key-value tags to associate with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Both tag keys and values have a maximum length of 255 characters. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- user
Data String - String in base64 format. For Linux instances, 'user_data' is ignored when 'password' field is provided. For Windows instances, Admin user password is set by 'password' field and cannot be updated via 'user_data'. Examples of the
user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html - username String
- For Linux instances, 'username' and 'password' are used to create a new user. For Windows instances, 'username' cannot be specified. Use 'password' field to set the password for the 'Admin' user on Windows.
- vm
State String - Virtual machine state. Set to 'active' to start the instance or 'stopped' to stop it. Available values: "active", "stopped".
- flavor string
- The flavor of the instance.
- interfaces
Cloud
Instance Interface[] - A list of network interfaces for the instance. You can create one or more interfaces - private, public, or both.
- volumes
Cloud
Instance Volume[] - List of existing volumes to attach to the instance. Create volumes separately using gcorecloudvolume resource.
- allow
App booleanPorts - Set to
trueif creating the instance from anapptemplate. This allows application ports in the security group for instances created from a marketplace application template. - configuration {[key: string]: string}
- Parameters for the application template if creating the instance from an
apptemplate. - name string
- Instance name.
- name
Template string - If you want the instance name to be automatically generated based on IP addresses, you can provide a name template instead of specifying the name manually. The template should include a placeholder that will be replaced during provisioning. Supported placeholders are:
{ip_octets}(last 3 octets of the IP),{two_ip_octets}, and{one_ip_octet}. - password
Wo string - For Linux instances, 'username' and 'password' are used to create a new user. When only 'password' is provided, it is set as the password for the default user of the image. For Windows instances, 'username' cannot be specified. Use the 'password' field to set the password for the 'Admin' user on Windows. Use the 'user_data' field to provide a script to create new users on Windows. The password of the Admin user cannot be updated via 'user_data'.
- password
Wo numberVersion - Instance password write-only version. Used to trigger updates of the write-only password field.
- project
Id number - Project ID. If not specified, uses GCORE_CLOUD_PROJECT_ID environment variable.
- region
Id number - Region ID. If not specified, uses GCORE_CLOUD_REGION_ID environment variable.
- security
Groups CloudInstance Security Group[] - Specifies security group UUIDs to be applied to all instance network interfaces.
- servergroup
Id string Placement group ID for instance placement policy.
Supported group types:
anti-affinity: Ensures instances are placed on different hosts for high availability.affinity: Places instances on the same host for low-latency communication.soft-anti-affinity: Tries to place instances on different hosts but allows sharing if needed.
- ssh
Key stringName - Specifies the name of the SSH keypair, created via the
/v1/
ssh_keysendpoint. - {[key: string]: string}
- Key-value tags to associate with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Both tag keys and values have a maximum length of 255 characters. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- user
Data string - String in base64 format. For Linux instances, 'user_data' is ignored when 'password' field is provided. For Windows instances, Admin user password is set by 'password' field and cannot be updated via 'user_data'. Examples of the
user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html - username string
- For Linux instances, 'username' and 'password' are used to create a new user. For Windows instances, 'username' cannot be specified. Use 'password' field to set the password for the 'Admin' user on Windows.
- vm
State string - Virtual machine state. Set to 'active' to start the instance or 'stopped' to stop it. Available values: "active", "stopped".
- flavor str
- The flavor of the instance.
- interfaces
Sequence[Cloud
Instance Interface Args] - A list of network interfaces for the instance. You can create one or more interfaces - private, public, or both.
- volumes
Sequence[Cloud
Instance Volume Args] - List of existing volumes to attach to the instance. Create volumes separately using gcorecloudvolume resource.
- allow_
app_ boolports - Set to
trueif creating the instance from anapptemplate. This allows application ports in the security group for instances created from a marketplace application template. - configuration Mapping[str, str]
- Parameters for the application template if creating the instance from an
apptemplate. - name str
- Instance name.
- name_
template str - If you want the instance name to be automatically generated based on IP addresses, you can provide a name template instead of specifying the name manually. The template should include a placeholder that will be replaced during provisioning. Supported placeholders are:
{ip_octets}(last 3 octets of the IP),{two_ip_octets}, and{one_ip_octet}. - password_
wo str - For Linux instances, 'username' and 'password' are used to create a new user. When only 'password' is provided, it is set as the password for the default user of the image. For Windows instances, 'username' cannot be specified. Use the 'password' field to set the password for the 'Admin' user on Windows. Use the 'user_data' field to provide a script to create new users on Windows. The password of the Admin user cannot be updated via 'user_data'.
- password_
wo_ floatversion - Instance password write-only version. Used to trigger updates of the write-only password field.
- project_
id float - Project ID. If not specified, uses GCORE_CLOUD_PROJECT_ID environment variable.
- region_
id float - Region ID. If not specified, uses GCORE_CLOUD_REGION_ID environment variable.
- security_
groups Sequence[CloudInstance Security Group Args] - Specifies security group UUIDs to be applied to all instance network interfaces.
- servergroup_
id str Placement group ID for instance placement policy.
Supported group types:
anti-affinity: Ensures instances are placed on different hosts for high availability.affinity: Places instances on the same host for low-latency communication.soft-anti-affinity: Tries to place instances on different hosts but allows sharing if needed.
- ssh_
key_ strname - Specifies the name of the SSH keypair, created via the
/v1/
ssh_keysendpoint. - Mapping[str, str]
- Key-value tags to associate with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Both tag keys and values have a maximum length of 255 characters. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- user_
data str - String in base64 format. For Linux instances, 'user_data' is ignored when 'password' field is provided. For Windows instances, Admin user password is set by 'password' field and cannot be updated via 'user_data'. Examples of the
user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html - username str
- For Linux instances, 'username' and 'password' are used to create a new user. For Windows instances, 'username' cannot be specified. Use 'password' field to set the password for the 'Admin' user on Windows.
- vm_
state str - Virtual machine state. Set to 'active' to start the instance or 'stopped' to stop it. Available values: "active", "stopped".
- flavor String
- The flavor of the instance.
- interfaces List<Property Map>
- A list of network interfaces for the instance. You can create one or more interfaces - private, public, or both.
- volumes List<Property Map>
- List of existing volumes to attach to the instance. Create volumes separately using gcorecloudvolume resource.
- allow
App BooleanPorts - Set to
trueif creating the instance from anapptemplate. This allows application ports in the security group for instances created from a marketplace application template. - configuration Map<String>
- Parameters for the application template if creating the instance from an
apptemplate. - name String
- Instance name.
- name
Template String - If you want the instance name to be automatically generated based on IP addresses, you can provide a name template instead of specifying the name manually. The template should include a placeholder that will be replaced during provisioning. Supported placeholders are:
{ip_octets}(last 3 octets of the IP),{two_ip_octets}, and{one_ip_octet}. - password
Wo String - For Linux instances, 'username' and 'password' are used to create a new user. When only 'password' is provided, it is set as the password for the default user of the image. For Windows instances, 'username' cannot be specified. Use the 'password' field to set the password for the 'Admin' user on Windows. Use the 'user_data' field to provide a script to create new users on Windows. The password of the Admin user cannot be updated via 'user_data'.
- password
Wo NumberVersion - Instance password write-only version. Used to trigger updates of the write-only password field.
- project
Id Number - Project ID. If not specified, uses GCORE_CLOUD_PROJECT_ID environment variable.
- region
Id Number - Region ID. If not specified, uses GCORE_CLOUD_REGION_ID environment variable.
- security
Groups List<Property Map> - Specifies security group UUIDs to be applied to all instance network interfaces.
- servergroup
Id String Placement group ID for instance placement policy.
Supported group types:
anti-affinity: Ensures instances are placed on different hosts for high availability.affinity: Places instances on the same host for low-latency communication.soft-anti-affinity: Tries to place instances on different hosts but allows sharing if needed.
- ssh
Key StringName - Specifies the name of the SSH keypair, created via the
/v1/
ssh_keysendpoint. - Map<String>
- Key-value tags to associate with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Both tag keys and values have a maximum length of 255 characters. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- user
Data String - String in base64 format. For Linux instances, 'user_data' is ignored when 'password' field is provided. For Windows instances, Admin user password is set by 'password' field and cannot be updated via 'user_data'. Examples of the
user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html - username String
- For Linux instances, 'username' and 'password' are used to create a new user. For Windows instances, 'username' cannot be specified. Use 'password' field to set the password for the 'Admin' user on Windows.
- vm
State String - Virtual machine state. Set to 'active' to start the instance or 'stopped' to stop it. Available values: "active", "stopped".
Outputs
All input properties are implicitly available as output properties. Additionally, the CloudInstance resource produces the following output properties:
- Addresses
Dictionary<string, Immutable
Array<Cloud Instance Addresses>> - Map of
network_nameto list of addresses in that network - Blackhole
Ports List<CloudInstance Blackhole Port> - IP addresses of the instances that are blackholed by DDoS mitigation system
- Created
At string - Datetime when instance was created
- Creator
Task stringId - Task that created this entity
- Ddos
Profile CloudInstance Ddos Profile - Advanced DDoS protection profile. It is always
nullif query parameterwith_ddos=trueis not set. - Fixed
Ip List<CloudAssignments Instance Fixed Ip Assignment> - Fixed IP assigned to instance
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Description string - Instance description
- Instance
Isolation CloudInstance Instance Isolation - Instance isolation information
- Region string
- Region name
- Status string
- Instance status Available values: "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING", "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE", "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED", "UNKNOWN", "VERIFY_RESIZE".
- Task
State string - Task state
- Addresses
map[string][]Cloud
Instance Addresses - Map of
network_nameto list of addresses in that network - Blackhole
Ports []CloudInstance Blackhole Port - IP addresses of the instances that are blackholed by DDoS mitigation system
- Created
At string - Datetime when instance was created
- Creator
Task stringId - Task that created this entity
- Ddos
Profile CloudInstance Ddos Profile - Advanced DDoS protection profile. It is always
nullif query parameterwith_ddos=trueis not set. - Fixed
Ip []CloudAssignments Instance Fixed Ip Assignment - Fixed IP assigned to instance
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Description string - Instance description
- Instance
Isolation CloudInstance Instance Isolation - Instance isolation information
- Region string
- Region name
- Status string
- Instance status Available values: "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING", "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE", "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED", "UNKNOWN", "VERIFY_RESIZE".
- Task
State string - Task state
- addresses
Map<String,List<Cloud
Instance Addresses>> - Map of
network_nameto list of addresses in that network - blackhole
Ports List<CloudInstance Blackhole Port> - IP addresses of the instances that are blackholed by DDoS mitigation system
- created
At String - Datetime when instance was created
- creator
Task StringId - Task that created this entity
- ddos
Profile CloudInstance Ddos Profile - Advanced DDoS protection profile. It is always
nullif query parameterwith_ddos=trueis not set. - fixed
Ip List<CloudAssignments Instance Fixed Ip Assignment> - Fixed IP assigned to instance
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Description String - Instance description
- instance
Isolation CloudInstance Instance Isolation - Instance isolation information
- region String
- Region name
- status String
- Instance status Available values: "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING", "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE", "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED", "UNKNOWN", "VERIFY_RESIZE".
- task
State String - Task state
- addresses
{[key: string]: Cloud
Instance Addresses[]} - Map of
network_nameto list of addresses in that network - blackhole
Ports CloudInstance Blackhole Port[] - IP addresses of the instances that are blackholed by DDoS mitigation system
- created
At string - Datetime when instance was created
- creator
Task stringId - Task that created this entity
- ddos
Profile CloudInstance Ddos Profile - Advanced DDoS protection profile. It is always
nullif query parameterwith_ddos=trueis not set. - fixed
Ip CloudAssignments Instance Fixed Ip Assignment[] - Fixed IP assigned to instance
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Description string - Instance description
- instance
Isolation CloudInstance Instance Isolation - Instance isolation information
- region string
- Region name
- status string
- Instance status Available values: "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING", "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE", "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED", "UNKNOWN", "VERIFY_RESIZE".
- task
State string - Task state
- addresses
Mapping[str, Sequence[Cloud
Instance Addresses]] - Map of
network_nameto list of addresses in that network - blackhole_
ports Sequence[CloudInstance Blackhole Port] - IP addresses of the instances that are blackholed by DDoS mitigation system
- created_
at str - Datetime when instance was created
- creator_
task_ strid - Task that created this entity
- ddos_
profile CloudInstance Ddos Profile - Advanced DDoS protection profile. It is always
nullif query parameterwith_ddos=trueis not set. - fixed_
ip_ Sequence[Cloudassignments Instance Fixed Ip Assignment] - Fixed IP assigned to instance
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
description str - Instance description
- instance_
isolation CloudInstance Instance Isolation - Instance isolation information
- region str
- Region name
- status str
- Instance status Available values: "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING", "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE", "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED", "UNKNOWN", "VERIFY_RESIZE".
- task_
state str - Task state
- addresses Map<List<Property Map>>
- Map of
network_nameto list of addresses in that network - blackhole
Ports List<Property Map> - IP addresses of the instances that are blackholed by DDoS mitigation system
- created
At String - Datetime when instance was created
- creator
Task StringId - Task that created this entity
- ddos
Profile Property Map - Advanced DDoS protection profile. It is always
nullif query parameterwith_ddos=trueis not set. - fixed
Ip List<Property Map>Assignments - Fixed IP assigned to instance
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Description String - Instance description
- instance
Isolation Property Map - Instance isolation information
- region String
- Region name
- status String
- Instance status Available values: "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING", "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE", "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED", "UNKNOWN", "VERIFY_RESIZE".
- task
State String - Task state
Look up Existing CloudInstance Resource
Get an existing CloudInstance 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?: CloudInstanceState, opts?: CustomResourceOptions): CloudInstance@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
addresses: Optional[Mapping[str, Sequence[CloudInstanceAddressesArgs]]] = None,
allow_app_ports: Optional[bool] = None,
blackhole_ports: Optional[Sequence[CloudInstanceBlackholePortArgs]] = None,
configuration: Optional[Mapping[str, str]] = None,
created_at: Optional[str] = None,
creator_task_id: Optional[str] = None,
ddos_profile: Optional[CloudInstanceDdosProfileArgs] = None,
fixed_ip_assignments: Optional[Sequence[CloudInstanceFixedIpAssignmentArgs]] = None,
flavor: Optional[str] = None,
instance_description: Optional[str] = None,
instance_isolation: Optional[CloudInstanceInstanceIsolationArgs] = None,
interfaces: Optional[Sequence[CloudInstanceInterfaceArgs]] = None,
name: Optional[str] = None,
name_template: Optional[str] = None,
password_wo: Optional[str] = None,
password_wo_version: Optional[float] = None,
project_id: Optional[float] = None,
region: Optional[str] = None,
region_id: Optional[float] = None,
security_groups: Optional[Sequence[CloudInstanceSecurityGroupArgs]] = None,
servergroup_id: Optional[str] = None,
ssh_key_name: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
task_state: Optional[str] = None,
user_data: Optional[str] = None,
username: Optional[str] = None,
vm_state: Optional[str] = None,
volumes: Optional[Sequence[CloudInstanceVolumeArgs]] = None) -> CloudInstancefunc GetCloudInstance(ctx *Context, name string, id IDInput, state *CloudInstanceState, opts ...ResourceOption) (*CloudInstance, error)public static CloudInstance Get(string name, Input<string> id, CloudInstanceState? state, CustomResourceOptions? opts = null)public static CloudInstance get(String name, Output<String> id, CloudInstanceState state, CustomResourceOptions options)resources: _: type: gcore:CloudInstance 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.
- Addresses
Dictionary<string, Immutable
Array<Cloud Instance Addresses Args>> - Map of
network_nameto list of addresses in that network - Allow
App boolPorts - Set to
trueif creating the instance from anapptemplate. This allows application ports in the security group for instances created from a marketplace application template. - Blackhole
Ports List<CloudInstance Blackhole Port> - IP addresses of the instances that are blackholed by DDoS mitigation system
- Configuration Dictionary<string, string>
- Parameters for the application template if creating the instance from an
apptemplate. - Created
At string - Datetime when instance was created
- Creator
Task stringId - Task that created this entity
- Ddos
Profile CloudInstance Ddos Profile - Advanced DDoS protection profile. It is always
nullif query parameterwith_ddos=trueis not set. - Fixed
Ip List<CloudAssignments Instance Fixed Ip Assignment> - Fixed IP assigned to instance
- Flavor string
- The flavor of the instance.
- Instance
Description string - Instance description
- Instance
Isolation CloudInstance Instance Isolation - Instance isolation information
- Interfaces
List<Cloud
Instance Interface> - A list of network interfaces for the instance. You can create one or more interfaces - private, public, or both.
- Name string
- Instance name.
- Name
Template string - If you want the instance name to be automatically generated based on IP addresses, you can provide a name template instead of specifying the name manually. The template should include a placeholder that will be replaced during provisioning. Supported placeholders are:
{ip_octets}(last 3 octets of the IP),{two_ip_octets}, and{one_ip_octet}. - Password
Wo string - For Linux instances, 'username' and 'password' are used to create a new user. When only 'password' is provided, it is set as the password for the default user of the image. For Windows instances, 'username' cannot be specified. Use the 'password' field to set the password for the 'Admin' user on Windows. Use the 'user_data' field to provide a script to create new users on Windows. The password of the Admin user cannot be updated via 'user_data'.
- Password
Wo doubleVersion - Instance password write-only version. Used to trigger updates of the write-only password field.
- Project
Id double - Project ID. If not specified, uses GCORE_CLOUD_PROJECT_ID environment variable.
- Region string
- Region name
- Region
Id double - Region ID. If not specified, uses GCORE_CLOUD_REGION_ID environment variable.
- Security
Groups List<CloudInstance Security Group> - Specifies security group UUIDs to be applied to all instance network interfaces.
- Servergroup
Id string Placement group ID for instance placement policy.
Supported group types:
anti-affinity: Ensures instances are placed on different hosts for high availability.affinity: Places instances on the same host for low-latency communication.soft-anti-affinity: Tries to place instances on different hosts but allows sharing if needed.
- Ssh
Key stringName - Specifies the name of the SSH keypair, created via the
/v1/
ssh_keysendpoint. - Status string
- Instance status Available values: "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING", "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE", "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED", "UNKNOWN", "VERIFY_RESIZE".
- Dictionary<string, string>
- Key-value tags to associate with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Both tag keys and values have a maximum length of 255 characters. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- Task
State string - Task state
- User
Data string - String in base64 format. For Linux instances, 'user_data' is ignored when 'password' field is provided. For Windows instances, Admin user password is set by 'password' field and cannot be updated via 'user_data'. Examples of the
user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html - Username string
- For Linux instances, 'username' and 'password' are used to create a new user. For Windows instances, 'username' cannot be specified. Use 'password' field to set the password for the 'Admin' user on Windows.
- Vm
State string - Virtual machine state. Set to 'active' to start the instance or 'stopped' to stop it. Available values: "active", "stopped".
- Volumes
List<Cloud
Instance Volume> - List of existing volumes to attach to the instance. Create volumes separately using gcorecloudvolume resource.
- Addresses
map[string][]Cloud
Instance Addresses Args - Map of
network_nameto list of addresses in that network - Allow
App boolPorts - Set to
trueif creating the instance from anapptemplate. This allows application ports in the security group for instances created from a marketplace application template. - Blackhole
Ports []CloudInstance Blackhole Port Args - IP addresses of the instances that are blackholed by DDoS mitigation system
- Configuration map[string]string
- Parameters for the application template if creating the instance from an
apptemplate. - Created
At string - Datetime when instance was created
- Creator
Task stringId - Task that created this entity
- Ddos
Profile CloudInstance Ddos Profile Args - Advanced DDoS protection profile. It is always
nullif query parameterwith_ddos=trueis not set. - Fixed
Ip []CloudAssignments Instance Fixed Ip Assignment Args - Fixed IP assigned to instance
- Flavor string
- The flavor of the instance.
- Instance
Description string - Instance description
- Instance
Isolation CloudInstance Instance Isolation Args - Instance isolation information
- Interfaces
[]Cloud
Instance Interface Args - A list of network interfaces for the instance. You can create one or more interfaces - private, public, or both.
- Name string
- Instance name.
- Name
Template string - If you want the instance name to be automatically generated based on IP addresses, you can provide a name template instead of specifying the name manually. The template should include a placeholder that will be replaced during provisioning. Supported placeholders are:
{ip_octets}(last 3 octets of the IP),{two_ip_octets}, and{one_ip_octet}. - Password
Wo string - For Linux instances, 'username' and 'password' are used to create a new user. When only 'password' is provided, it is set as the password for the default user of the image. For Windows instances, 'username' cannot be specified. Use the 'password' field to set the password for the 'Admin' user on Windows. Use the 'user_data' field to provide a script to create new users on Windows. The password of the Admin user cannot be updated via 'user_data'.
- Password
Wo float64Version - Instance password write-only version. Used to trigger updates of the write-only password field.
- Project
Id float64 - Project ID. If not specified, uses GCORE_CLOUD_PROJECT_ID environment variable.
- Region string
- Region name
- Region
Id float64 - Region ID. If not specified, uses GCORE_CLOUD_REGION_ID environment variable.
- Security
Groups []CloudInstance Security Group Args - Specifies security group UUIDs to be applied to all instance network interfaces.
- Servergroup
Id string Placement group ID for instance placement policy.
Supported group types:
anti-affinity: Ensures instances are placed on different hosts for high availability.affinity: Places instances on the same host for low-latency communication.soft-anti-affinity: Tries to place instances on different hosts but allows sharing if needed.
- Ssh
Key stringName - Specifies the name of the SSH keypair, created via the
/v1/
ssh_keysendpoint. - Status string
- Instance status Available values: "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING", "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE", "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED", "UNKNOWN", "VERIFY_RESIZE".
- map[string]string
- Key-value tags to associate with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Both tag keys and values have a maximum length of 255 characters. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- Task
State string - Task state
- User
Data string - String in base64 format. For Linux instances, 'user_data' is ignored when 'password' field is provided. For Windows instances, Admin user password is set by 'password' field and cannot be updated via 'user_data'. Examples of the
user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html - Username string
- For Linux instances, 'username' and 'password' are used to create a new user. For Windows instances, 'username' cannot be specified. Use 'password' field to set the password for the 'Admin' user on Windows.
- Vm
State string - Virtual machine state. Set to 'active' to start the instance or 'stopped' to stop it. Available values: "active", "stopped".
- Volumes
[]Cloud
Instance Volume Args - List of existing volumes to attach to the instance. Create volumes separately using gcorecloudvolume resource.
- addresses
Map<String,List<Cloud
Instance Addresses Args>> - Map of
network_nameto list of addresses in that network - allow
App BooleanPorts - Set to
trueif creating the instance from anapptemplate. This allows application ports in the security group for instances created from a marketplace application template. - blackhole
Ports List<CloudInstance Blackhole Port> - IP addresses of the instances that are blackholed by DDoS mitigation system
- configuration Map<String,String>
- Parameters for the application template if creating the instance from an
apptemplate. - created
At String - Datetime when instance was created
- creator
Task StringId - Task that created this entity
- ddos
Profile CloudInstance Ddos Profile - Advanced DDoS protection profile. It is always
nullif query parameterwith_ddos=trueis not set. - fixed
Ip List<CloudAssignments Instance Fixed Ip Assignment> - Fixed IP assigned to instance
- flavor String
- The flavor of the instance.
- instance
Description String - Instance description
- instance
Isolation CloudInstance Instance Isolation - Instance isolation information
- interfaces
List<Cloud
Instance Interface> - A list of network interfaces for the instance. You can create one or more interfaces - private, public, or both.
- name String
- Instance name.
- name
Template String - If you want the instance name to be automatically generated based on IP addresses, you can provide a name template instead of specifying the name manually. The template should include a placeholder that will be replaced during provisioning. Supported placeholders are:
{ip_octets}(last 3 octets of the IP),{two_ip_octets}, and{one_ip_octet}. - password
Wo String - For Linux instances, 'username' and 'password' are used to create a new user. When only 'password' is provided, it is set as the password for the default user of the image. For Windows instances, 'username' cannot be specified. Use the 'password' field to set the password for the 'Admin' user on Windows. Use the 'user_data' field to provide a script to create new users on Windows. The password of the Admin user cannot be updated via 'user_data'.
- password
Wo DoubleVersion - Instance password write-only version. Used to trigger updates of the write-only password field.
- project
Id Double - Project ID. If not specified, uses GCORE_CLOUD_PROJECT_ID environment variable.
- region String
- Region name
- region
Id Double - Region ID. If not specified, uses GCORE_CLOUD_REGION_ID environment variable.
- security
Groups List<CloudInstance Security Group> - Specifies security group UUIDs to be applied to all instance network interfaces.
- servergroup
Id String Placement group ID for instance placement policy.
Supported group types:
anti-affinity: Ensures instances are placed on different hosts for high availability.affinity: Places instances on the same host for low-latency communication.soft-anti-affinity: Tries to place instances on different hosts but allows sharing if needed.
- ssh
Key StringName - Specifies the name of the SSH keypair, created via the
/v1/
ssh_keysendpoint. - status String
- Instance status Available values: "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING", "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE", "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED", "UNKNOWN", "VERIFY_RESIZE".
- Map<String,String>
- Key-value tags to associate with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Both tag keys and values have a maximum length of 255 characters. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- task
State String - Task state
- user
Data String - String in base64 format. For Linux instances, 'user_data' is ignored when 'password' field is provided. For Windows instances, Admin user password is set by 'password' field and cannot be updated via 'user_data'. Examples of the
user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html - username String
- For Linux instances, 'username' and 'password' are used to create a new user. For Windows instances, 'username' cannot be specified. Use 'password' field to set the password for the 'Admin' user on Windows.
- vm
State String - Virtual machine state. Set to 'active' to start the instance or 'stopped' to stop it. Available values: "active", "stopped".
- volumes
List<Cloud
Instance Volume> - List of existing volumes to attach to the instance. Create volumes separately using gcorecloudvolume resource.
- addresses
{[key: string]: Cloud
Instance Addresses Args[]} - Map of
network_nameto list of addresses in that network - allow
App booleanPorts - Set to
trueif creating the instance from anapptemplate. This allows application ports in the security group for instances created from a marketplace application template. - blackhole
Ports CloudInstance Blackhole Port[] - IP addresses of the instances that are blackholed by DDoS mitigation system
- configuration {[key: string]: string}
- Parameters for the application template if creating the instance from an
apptemplate. - created
At string - Datetime when instance was created
- creator
Task stringId - Task that created this entity
- ddos
Profile CloudInstance Ddos Profile - Advanced DDoS protection profile. It is always
nullif query parameterwith_ddos=trueis not set. - fixed
Ip CloudAssignments Instance Fixed Ip Assignment[] - Fixed IP assigned to instance
- flavor string
- The flavor of the instance.
- instance
Description string - Instance description
- instance
Isolation CloudInstance Instance Isolation - Instance isolation information
- interfaces
Cloud
Instance Interface[] - A list of network interfaces for the instance. You can create one or more interfaces - private, public, or both.
- name string
- Instance name.
- name
Template string - If you want the instance name to be automatically generated based on IP addresses, you can provide a name template instead of specifying the name manually. The template should include a placeholder that will be replaced during provisioning. Supported placeholders are:
{ip_octets}(last 3 octets of the IP),{two_ip_octets}, and{one_ip_octet}. - password
Wo string - For Linux instances, 'username' and 'password' are used to create a new user. When only 'password' is provided, it is set as the password for the default user of the image. For Windows instances, 'username' cannot be specified. Use the 'password' field to set the password for the 'Admin' user on Windows. Use the 'user_data' field to provide a script to create new users on Windows. The password of the Admin user cannot be updated via 'user_data'.
- password
Wo numberVersion - Instance password write-only version. Used to trigger updates of the write-only password field.
- project
Id number - Project ID. If not specified, uses GCORE_CLOUD_PROJECT_ID environment variable.
- region string
- Region name
- region
Id number - Region ID. If not specified, uses GCORE_CLOUD_REGION_ID environment variable.
- security
Groups CloudInstance Security Group[] - Specifies security group UUIDs to be applied to all instance network interfaces.
- servergroup
Id string Placement group ID for instance placement policy.
Supported group types:
anti-affinity: Ensures instances are placed on different hosts for high availability.affinity: Places instances on the same host for low-latency communication.soft-anti-affinity: Tries to place instances on different hosts but allows sharing if needed.
- ssh
Key stringName - Specifies the name of the SSH keypair, created via the
/v1/
ssh_keysendpoint. - status string
- Instance status Available values: "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING", "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE", "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED", "UNKNOWN", "VERIFY_RESIZE".
- {[key: string]: string}
- Key-value tags to associate with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Both tag keys and values have a maximum length of 255 characters. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- task
State string - Task state
- user
Data string - String in base64 format. For Linux instances, 'user_data' is ignored when 'password' field is provided. For Windows instances, Admin user password is set by 'password' field and cannot be updated via 'user_data'. Examples of the
user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html - username string
- For Linux instances, 'username' and 'password' are used to create a new user. For Windows instances, 'username' cannot be specified. Use 'password' field to set the password for the 'Admin' user on Windows.
- vm
State string - Virtual machine state. Set to 'active' to start the instance or 'stopped' to stop it. Available values: "active", "stopped".
- volumes
Cloud
Instance Volume[] - List of existing volumes to attach to the instance. Create volumes separately using gcorecloudvolume resource.
- addresses
Mapping[str, Sequence[Cloud
Instance Addresses Args]] - Map of
network_nameto list of addresses in that network - allow_
app_ boolports - Set to
trueif creating the instance from anapptemplate. This allows application ports in the security group for instances created from a marketplace application template. - blackhole_
ports Sequence[CloudInstance Blackhole Port Args] - IP addresses of the instances that are blackholed by DDoS mitigation system
- configuration Mapping[str, str]
- Parameters for the application template if creating the instance from an
apptemplate. - created_
at str - Datetime when instance was created
- creator_
task_ strid - Task that created this entity
- ddos_
profile CloudInstance Ddos Profile Args - Advanced DDoS protection profile. It is always
nullif query parameterwith_ddos=trueis not set. - fixed_
ip_ Sequence[Cloudassignments Instance Fixed Ip Assignment Args] - Fixed IP assigned to instance
- flavor str
- The flavor of the instance.
- instance_
description str - Instance description
- instance_
isolation CloudInstance Instance Isolation Args - Instance isolation information
- interfaces
Sequence[Cloud
Instance Interface Args] - A list of network interfaces for the instance. You can create one or more interfaces - private, public, or both.
- name str
- Instance name.
- name_
template str - If you want the instance name to be automatically generated based on IP addresses, you can provide a name template instead of specifying the name manually. The template should include a placeholder that will be replaced during provisioning. Supported placeholders are:
{ip_octets}(last 3 octets of the IP),{two_ip_octets}, and{one_ip_octet}. - password_
wo str - For Linux instances, 'username' and 'password' are used to create a new user. When only 'password' is provided, it is set as the password for the default user of the image. For Windows instances, 'username' cannot be specified. Use the 'password' field to set the password for the 'Admin' user on Windows. Use the 'user_data' field to provide a script to create new users on Windows. The password of the Admin user cannot be updated via 'user_data'.
- password_
wo_ floatversion - Instance password write-only version. Used to trigger updates of the write-only password field.
- project_
id float - Project ID. If not specified, uses GCORE_CLOUD_PROJECT_ID environment variable.
- region str
- Region name
- region_
id float - Region ID. If not specified, uses GCORE_CLOUD_REGION_ID environment variable.
- security_
groups Sequence[CloudInstance Security Group Args] - Specifies security group UUIDs to be applied to all instance network interfaces.
- servergroup_
id str Placement group ID for instance placement policy.
Supported group types:
anti-affinity: Ensures instances are placed on different hosts for high availability.affinity: Places instances on the same host for low-latency communication.soft-anti-affinity: Tries to place instances on different hosts but allows sharing if needed.
- ssh_
key_ strname - Specifies the name of the SSH keypair, created via the
/v1/
ssh_keysendpoint. - status str
- Instance status Available values: "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING", "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE", "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED", "UNKNOWN", "VERIFY_RESIZE".
- Mapping[str, str]
- Key-value tags to associate with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Both tag keys and values have a maximum length of 255 characters. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- task_
state str - Task state
- user_
data str - String in base64 format. For Linux instances, 'user_data' is ignored when 'password' field is provided. For Windows instances, Admin user password is set by 'password' field and cannot be updated via 'user_data'. Examples of the
user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html - username str
- For Linux instances, 'username' and 'password' are used to create a new user. For Windows instances, 'username' cannot be specified. Use 'password' field to set the password for the 'Admin' user on Windows.
- vm_
state str - Virtual machine state. Set to 'active' to start the instance or 'stopped' to stop it. Available values: "active", "stopped".
- volumes
Sequence[Cloud
Instance Volume Args] - List of existing volumes to attach to the instance. Create volumes separately using gcorecloudvolume resource.
- addresses Map<List<Property Map>>
- Map of
network_nameto list of addresses in that network - allow
App BooleanPorts - Set to
trueif creating the instance from anapptemplate. This allows application ports in the security group for instances created from a marketplace application template. - blackhole
Ports List<Property Map> - IP addresses of the instances that are blackholed by DDoS mitigation system
- configuration Map<String>
- Parameters for the application template if creating the instance from an
apptemplate. - created
At String - Datetime when instance was created
- creator
Task StringId - Task that created this entity
- ddos
Profile Property Map - Advanced DDoS protection profile. It is always
nullif query parameterwith_ddos=trueis not set. - fixed
Ip List<Property Map>Assignments - Fixed IP assigned to instance
- flavor String
- The flavor of the instance.
- instance
Description String - Instance description
- instance
Isolation Property Map - Instance isolation information
- interfaces List<Property Map>
- A list of network interfaces for the instance. You can create one or more interfaces - private, public, or both.
- name String
- Instance name.
- name
Template String - If you want the instance name to be automatically generated based on IP addresses, you can provide a name template instead of specifying the name manually. The template should include a placeholder that will be replaced during provisioning. Supported placeholders are:
{ip_octets}(last 3 octets of the IP),{two_ip_octets}, and{one_ip_octet}. - password
Wo String - For Linux instances, 'username' and 'password' are used to create a new user. When only 'password' is provided, it is set as the password for the default user of the image. For Windows instances, 'username' cannot be specified. Use the 'password' field to set the password for the 'Admin' user on Windows. Use the 'user_data' field to provide a script to create new users on Windows. The password of the Admin user cannot be updated via 'user_data'.
- password
Wo NumberVersion - Instance password write-only version. Used to trigger updates of the write-only password field.
- project
Id Number - Project ID. If not specified, uses GCORE_CLOUD_PROJECT_ID environment variable.
- region String
- Region name
- region
Id Number - Region ID. If not specified, uses GCORE_CLOUD_REGION_ID environment variable.
- security
Groups List<Property Map> - Specifies security group UUIDs to be applied to all instance network interfaces.
- servergroup
Id String Placement group ID for instance placement policy.
Supported group types:
anti-affinity: Ensures instances are placed on different hosts for high availability.affinity: Places instances on the same host for low-latency communication.soft-anti-affinity: Tries to place instances on different hosts but allows sharing if needed.
- ssh
Key StringName - Specifies the name of the SSH keypair, created via the
/v1/
ssh_keysendpoint. - status String
- Instance status Available values: "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING", "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE", "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED", "UNKNOWN", "VERIFY_RESIZE".
- Map<String>
- Key-value tags to associate with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Both tag keys and values have a maximum length of 255 characters. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- task
State String - Task state
- user
Data String - String in base64 format. For Linux instances, 'user_data' is ignored when 'password' field is provided. For Windows instances, Admin user password is set by 'password' field and cannot be updated via 'user_data'. Examples of the
user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html - username String
- For Linux instances, 'username' and 'password' are used to create a new user. For Windows instances, 'username' cannot be specified. Use 'password' field to set the password for the 'Admin' user on Windows.
- vm
State String - Virtual machine state. Set to 'active' to start the instance or 'stopped' to stop it. Available values: "active", "stopped".
- volumes List<Property Map>
- List of existing volumes to attach to the instance. Create volumes separately using gcorecloudvolume resource.
Supporting Types
CloudInstanceAddresses, CloudInstanceAddressesArgs
- Addr string
- Interface
Name string - Interface name. Defaults to
nulland is returned asnullin the API response if not set. - Subnet
Id string - Subnet
Name string - Type string
- A public IP address will be assigned to the instance. Available values: "external", "subnet", "anysubnet", "reservedfixed_ip".
- Addr string
- Interface
Name string - Interface name. Defaults to
nulland is returned asnullin the API response if not set. - Subnet
Id string - Subnet
Name string - Type string
- A public IP address will be assigned to the instance. Available values: "external", "subnet", "anysubnet", "reservedfixed_ip".
- addr String
- interface
Name String - Interface name. Defaults to
nulland is returned asnullin the API response if not set. - subnet
Id String - subnet
Name String - type String
- A public IP address will be assigned to the instance. Available values: "external", "subnet", "anysubnet", "reservedfixed_ip".
- addr string
- interface
Name string - Interface name. Defaults to
nulland is returned asnullin the API response if not set. - subnet
Id string - subnet
Name string - type string
- A public IP address will be assigned to the instance. Available values: "external", "subnet", "anysubnet", "reservedfixed_ip".
- addr str
- interface_
name str - Interface name. Defaults to
nulland is returned asnullin the API response if not set. - subnet_
id str - subnet_
name str - type str
- A public IP address will be assigned to the instance. Available values: "external", "subnet", "anysubnet", "reservedfixed_ip".
- addr String
- interface
Name String - Interface name. Defaults to
nulland is returned asnullin the API response if not set. - subnet
Id String - subnet
Name String - type String
- A public IP address will be assigned to the instance. Available values: "external", "subnet", "anysubnet", "reservedfixed_ip".
CloudInstanceBlackholePort, CloudInstanceBlackholePortArgs
- Alarm
End string - A date-time string giving the time that the alarm ended. If not yet ended, time will be given as 0001-01-01T00:00:00Z
- Alarm
Start string - A date-time string giving the time that the alarm started
- Alarm
State string - Current state of alarm Available values: "ACKREQ", "ALARM", "ARCHIVED", "CLEAR", "CLEARING", "CLEARINGFAIL", "ENDGRACE", "ENDWAIT", "MANUALCLEAR", "MANUALCLEARING", "MANUALCLEARINGFAIL", "MANUALMITIGATING", "MANUALSTARTING", "MANUALSTARTINGFAIL", "MITIGATING", "STARTING", "STARTINGFAIL", "STARTWAIT", "ackreq", "alarm", "archived", "clear", "clearing", "clearingfail", "endgrace", "endwait", "manualclear", "manualclearing", "manualclearingfail", "manualmitigating", "manualstarting", "manualstartingfail", "mitigating", "startwait", "starting", "startingfail".
- Alert
Duration string - Total alert duration
- Destination
Ip string - Notification destination IP address
- Id double
- Alarm
End string - A date-time string giving the time that the alarm ended. If not yet ended, time will be given as 0001-01-01T00:00:00Z
- Alarm
Start string - A date-time string giving the time that the alarm started
- Alarm
State string - Current state of alarm Available values: "ACKREQ", "ALARM", "ARCHIVED", "CLEAR", "CLEARING", "CLEARINGFAIL", "ENDGRACE", "ENDWAIT", "MANUALCLEAR", "MANUALCLEARING", "MANUALCLEARINGFAIL", "MANUALMITIGATING", "MANUALSTARTING", "MANUALSTARTINGFAIL", "MITIGATING", "STARTING", "STARTINGFAIL", "STARTWAIT", "ackreq", "alarm", "archived", "clear", "clearing", "clearingfail", "endgrace", "endwait", "manualclear", "manualclearing", "manualclearingfail", "manualmitigating", "manualstarting", "manualstartingfail", "mitigating", "startwait", "starting", "startingfail".
- Alert
Duration string - Total alert duration
- Destination
Ip string - Notification destination IP address
- Id float64
- alarm
End String - A date-time string giving the time that the alarm ended. If not yet ended, time will be given as 0001-01-01T00:00:00Z
- alarm
Start String - A date-time string giving the time that the alarm started
- alarm
State String - Current state of alarm Available values: "ACKREQ", "ALARM", "ARCHIVED", "CLEAR", "CLEARING", "CLEARINGFAIL", "ENDGRACE", "ENDWAIT", "MANUALCLEAR", "MANUALCLEARING", "MANUALCLEARINGFAIL", "MANUALMITIGATING", "MANUALSTARTING", "MANUALSTARTINGFAIL", "MITIGATING", "STARTING", "STARTINGFAIL", "STARTWAIT", "ackreq", "alarm", "archived", "clear", "clearing", "clearingfail", "endgrace", "endwait", "manualclear", "manualclearing", "manualclearingfail", "manualmitigating", "manualstarting", "manualstartingfail", "mitigating", "startwait", "starting", "startingfail".
- alert
Duration String - Total alert duration
- destination
Ip String - Notification destination IP address
- id Double
- alarm
End string - A date-time string giving the time that the alarm ended. If not yet ended, time will be given as 0001-01-01T00:00:00Z
- alarm
Start string - A date-time string giving the time that the alarm started
- alarm
State string - Current state of alarm Available values: "ACKREQ", "ALARM", "ARCHIVED", "CLEAR", "CLEARING", "CLEARINGFAIL", "ENDGRACE", "ENDWAIT", "MANUALCLEAR", "MANUALCLEARING", "MANUALCLEARINGFAIL", "MANUALMITIGATING", "MANUALSTARTING", "MANUALSTARTINGFAIL", "MITIGATING", "STARTING", "STARTINGFAIL", "STARTWAIT", "ackreq", "alarm", "archived", "clear", "clearing", "clearingfail", "endgrace", "endwait", "manualclear", "manualclearing", "manualclearingfail", "manualmitigating", "manualstarting", "manualstartingfail", "mitigating", "startwait", "starting", "startingfail".
- alert
Duration string - Total alert duration
- destination
Ip string - Notification destination IP address
- id number
- alarm_
end str - A date-time string giving the time that the alarm ended. If not yet ended, time will be given as 0001-01-01T00:00:00Z
- alarm_
start str - A date-time string giving the time that the alarm started
- alarm_
state str - Current state of alarm Available values: "ACKREQ", "ALARM", "ARCHIVED", "CLEAR", "CLEARING", "CLEARINGFAIL", "ENDGRACE", "ENDWAIT", "MANUALCLEAR", "MANUALCLEARING", "MANUALCLEARINGFAIL", "MANUALMITIGATING", "MANUALSTARTING", "MANUALSTARTINGFAIL", "MITIGATING", "STARTING", "STARTINGFAIL", "STARTWAIT", "ackreq", "alarm", "archived", "clear", "clearing", "clearingfail", "endgrace", "endwait", "manualclear", "manualclearing", "manualclearingfail", "manualmitigating", "manualstarting", "manualstartingfail", "mitigating", "startwait", "starting", "startingfail".
- alert_
duration str - Total alert duration
- destination_
ip str - Notification destination IP address
- id float
- alarm
End String - A date-time string giving the time that the alarm ended. If not yet ended, time will be given as 0001-01-01T00:00:00Z
- alarm
Start String - A date-time string giving the time that the alarm started
- alarm
State String - Current state of alarm Available values: "ACKREQ", "ALARM", "ARCHIVED", "CLEAR", "CLEARING", "CLEARINGFAIL", "ENDGRACE", "ENDWAIT", "MANUALCLEAR", "MANUALCLEARING", "MANUALCLEARINGFAIL", "MANUALMITIGATING", "MANUALSTARTING", "MANUALSTARTINGFAIL", "MITIGATING", "STARTING", "STARTINGFAIL", "STARTWAIT", "ackreq", "alarm", "archived", "clear", "clearing", "clearingfail", "endgrace", "endwait", "manualclear", "manualclearing", "manualclearingfail", "manualmitigating", "manualstarting", "manualstartingfail", "mitigating", "startwait", "starting", "startingfail".
- alert
Duration String - Total alert duration
- destination
Ip String - Notification destination IP address
- id Number
CloudInstanceDdosProfile, CloudInstanceDdosProfileArgs
- Fields
List<Cloud
Instance Ddos Profile Field> - List of configured field values for the protection profile
- Id double
- Unique identifier for the DDoS protection profile
- Options
Cloud
Instance Ddos Profile Options - Configuration options controlling profile activation and BGP routing
- Profile
Template CloudInstance Ddos Profile Profile Template - Complete template configuration data used for this profile
- Profile
Template stringDescription - Detailed description of the protection template used for this profile
- Protocols
List<Cloud
Instance Ddos Profile Protocol> - List of network protocols and ports configured for protection
- Site string
- Geographic site identifier where the protection is deployed
- Status
Cloud
Instance Ddos Profile Status - Current operational status and any error information for the profile
- Fields
[]Cloud
Instance Ddos Profile Field - List of configured field values for the protection profile
- Id float64
- Unique identifier for the DDoS protection profile
- Options
Cloud
Instance Ddos Profile Options - Configuration options controlling profile activation and BGP routing
- Profile
Template CloudInstance Ddos Profile Profile Template - Complete template configuration data used for this profile
- Profile
Template stringDescription - Detailed description of the protection template used for this profile
- Protocols
[]Cloud
Instance Ddos Profile Protocol - List of network protocols and ports configured for protection
- Site string
- Geographic site identifier where the protection is deployed
- Status
Cloud
Instance Ddos Profile Status - Current operational status and any error information for the profile
- fields
List<Cloud
Instance Ddos Profile Field> - List of configured field values for the protection profile
- id Double
- Unique identifier for the DDoS protection profile
- options
Cloud
Instance Ddos Profile Options - Configuration options controlling profile activation and BGP routing
- profile
Template CloudInstance Ddos Profile Profile Template - Complete template configuration data used for this profile
- profile
Template StringDescription - Detailed description of the protection template used for this profile
- protocols
List<Cloud
Instance Ddos Profile Protocol> - List of network protocols and ports configured for protection
- site String
- Geographic site identifier where the protection is deployed
- status
Cloud
Instance Ddos Profile Status - Current operational status and any error information for the profile
- fields
Cloud
Instance Ddos Profile Field[] - List of configured field values for the protection profile
- id number
- Unique identifier for the DDoS protection profile
- options
Cloud
Instance Ddos Profile Options - Configuration options controlling profile activation and BGP routing
- profile
Template CloudInstance Ddos Profile Profile Template - Complete template configuration data used for this profile
- profile
Template stringDescription - Detailed description of the protection template used for this profile
- protocols
Cloud
Instance Ddos Profile Protocol[] - List of network protocols and ports configured for protection
- site string
- Geographic site identifier where the protection is deployed
- status
Cloud
Instance Ddos Profile Status - Current operational status and any error information for the profile
- fields
Sequence[Cloud
Instance Ddos Profile Field] - List of configured field values for the protection profile
- id float
- Unique identifier for the DDoS protection profile
- options
Cloud
Instance Ddos Profile Options - Configuration options controlling profile activation and BGP routing
- profile_
template CloudInstance Ddos Profile Profile Template - Complete template configuration data used for this profile
- profile_
template_ strdescription - Detailed description of the protection template used for this profile
- protocols
Sequence[Cloud
Instance Ddos Profile Protocol] - List of network protocols and ports configured for protection
- site str
- Geographic site identifier where the protection is deployed
- status
Cloud
Instance Ddos Profile Status - Current operational status and any error information for the profile
- fields List<Property Map>
- List of configured field values for the protection profile
- id Number
- Unique identifier for the DDoS protection profile
- options Property Map
- Configuration options controlling profile activation and BGP routing
- profile
Template Property Map - Complete template configuration data used for this profile
- profile
Template StringDescription - Detailed description of the protection template used for this profile
- protocols List<Property Map>
- List of network protocols and ports configured for protection
- site String
- Geographic site identifier where the protection is deployed
- status Property Map
- Current operational status and any error information for the profile
CloudInstanceDdosProfileField, CloudInstanceDdosProfileFieldArgs
- Base
Field double - ID of DDoS profile field
- Default string
- Predefined default value for the field if not specified
- Description string
- Detailed description explaining the field's purpose and usage guidelines
- Field
Name string - Name of DDoS profile field
- Field
Type string - Data type classification of the field (e.g., string, integer, array)
- Field
Value string - Complex value. Only one of 'value' or 'field_value' must be specified.
- Id double
- Unique identifier for the DDoS protection field
- Name string
- Human-readable name of the protection field
- Required bool
- Indicates whether this field must be provided when creating a protection profile
- Validation
Schema string - JSON schema defining validation rules and constraints for the field value
- Value string
- Basic type value. Only one of 'value' or 'field_value' must be specified.
- Base
Field float64 - ID of DDoS profile field
- Default string
- Predefined default value for the field if not specified
- Description string
- Detailed description explaining the field's purpose and usage guidelines
- Field
Name string - Name of DDoS profile field
- Field
Type string - Data type classification of the field (e.g., string, integer, array)
- Field
Value string - Complex value. Only one of 'value' or 'field_value' must be specified.
- Id float64
- Unique identifier for the DDoS protection field
- Name string
- Human-readable name of the protection field
- Required bool
- Indicates whether this field must be provided when creating a protection profile
- Validation
Schema string - JSON schema defining validation rules and constraints for the field value
- Value string
- Basic type value. Only one of 'value' or 'field_value' must be specified.
- base
Field Double - ID of DDoS profile field
- default_ String
- Predefined default value for the field if not specified
- description String
- Detailed description explaining the field's purpose and usage guidelines
- field
Name String - Name of DDoS profile field
- field
Type String - Data type classification of the field (e.g., string, integer, array)
- field
Value String - Complex value. Only one of 'value' or 'field_value' must be specified.
- id Double
- Unique identifier for the DDoS protection field
- name String
- Human-readable name of the protection field
- required Boolean
- Indicates whether this field must be provided when creating a protection profile
- validation
Schema String - JSON schema defining validation rules and constraints for the field value
- value String
- Basic type value. Only one of 'value' or 'field_value' must be specified.
- base
Field number - ID of DDoS profile field
- default string
- Predefined default value for the field if not specified
- description string
- Detailed description explaining the field's purpose and usage guidelines
- field
Name string - Name of DDoS profile field
- field
Type string - Data type classification of the field (e.g., string, integer, array)
- field
Value string - Complex value. Only one of 'value' or 'field_value' must be specified.
- id number
- Unique identifier for the DDoS protection field
- name string
- Human-readable name of the protection field
- required boolean
- Indicates whether this field must be provided when creating a protection profile
- validation
Schema string - JSON schema defining validation rules and constraints for the field value
- value string
- Basic type value. Only one of 'value' or 'field_value' must be specified.
- base_
field float - ID of DDoS profile field
- default str
- Predefined default value for the field if not specified
- description str
- Detailed description explaining the field's purpose and usage guidelines
- field_
name str - Name of DDoS profile field
- field_
type str - Data type classification of the field (e.g., string, integer, array)
- field_
value str - Complex value. Only one of 'value' or 'field_value' must be specified.
- id float
- Unique identifier for the DDoS protection field
- name str
- Human-readable name of the protection field
- required bool
- Indicates whether this field must be provided when creating a protection profile
- validation_
schema str - JSON schema defining validation rules and constraints for the field value
- value str
- Basic type value. Only one of 'value' or 'field_value' must be specified.
- base
Field Number - ID of DDoS profile field
- default String
- Predefined default value for the field if not specified
- description String
- Detailed description explaining the field's purpose and usage guidelines
- field
Name String - Name of DDoS profile field
- field
Type String - Data type classification of the field (e.g., string, integer, array)
- field
Value String - Complex value. Only one of 'value' or 'field_value' must be specified.
- id Number
- Unique identifier for the DDoS protection field
- name String
- Human-readable name of the protection field
- required Boolean
- Indicates whether this field must be provided when creating a protection profile
- validation
Schema String - JSON schema defining validation rules and constraints for the field value
- value String
- Basic type value. Only one of 'value' or 'field_value' must be specified.
CloudInstanceDdosProfileOptions, CloudInstanceDdosProfileOptionsArgs
CloudInstanceDdosProfileProfileTemplate, CloudInstanceDdosProfileProfileTemplateArgs
- Description string
- Detailed description explaining the template's purpose and use cases
- Fields
List<Cloud
Instance Ddos Profile Profile Template Field> - List of configurable fields that define the template's protection parameters
- Id double
- Unique identifier for the DDoS protection template
- Name string
- Human-readable name of the protection template
- Description string
- Detailed description explaining the template's purpose and use cases
- Fields
[]Cloud
Instance Ddos Profile Profile Template Field - List of configurable fields that define the template's protection parameters
- Id float64
- Unique identifier for the DDoS protection template
- Name string
- Human-readable name of the protection template
- description String
- Detailed description explaining the template's purpose and use cases
- fields
List<Cloud
Instance Ddos Profile Profile Template Field> - List of configurable fields that define the template's protection parameters
- id Double
- Unique identifier for the DDoS protection template
- name String
- Human-readable name of the protection template
- description string
- Detailed description explaining the template's purpose and use cases
- fields
Cloud
Instance Ddos Profile Profile Template Field[] - List of configurable fields that define the template's protection parameters
- id number
- Unique identifier for the DDoS protection template
- name string
- Human-readable name of the protection template
- description str
- Detailed description explaining the template's purpose and use cases
- fields
Sequence[Cloud
Instance Ddos Profile Profile Template Field] - List of configurable fields that define the template's protection parameters
- id float
- Unique identifier for the DDoS protection template
- name str
- Human-readable name of the protection template
- description String
- Detailed description explaining the template's purpose and use cases
- fields List<Property Map>
- List of configurable fields that define the template's protection parameters
- id Number
- Unique identifier for the DDoS protection template
- name String
- Human-readable name of the protection template
CloudInstanceDdosProfileProfileTemplateField, CloudInstanceDdosProfileProfileTemplateFieldArgs
- Default string
- Predefined default value for the field if not specified
- Description string
- Detailed description explaining the field's purpose and usage guidelines
- Field
Type string - Data type classification of the field (e.g., string, integer, array)
- Id double
- Unique identifier for the DDoS protection field
- Name string
- Human-readable name of the protection field
- Required bool
- Indicates whether this field must be provided when creating a protection profile
- Validation
Schema string - JSON schema defining validation rules and constraints for the field value
- Default string
- Predefined default value for the field if not specified
- Description string
- Detailed description explaining the field's purpose and usage guidelines
- Field
Type string - Data type classification of the field (e.g., string, integer, array)
- Id float64
- Unique identifier for the DDoS protection field
- Name string
- Human-readable name of the protection field
- Required bool
- Indicates whether this field must be provided when creating a protection profile
- Validation
Schema string - JSON schema defining validation rules and constraints for the field value
- default_ String
- Predefined default value for the field if not specified
- description String
- Detailed description explaining the field's purpose and usage guidelines
- field
Type String - Data type classification of the field (e.g., string, integer, array)
- id Double
- Unique identifier for the DDoS protection field
- name String
- Human-readable name of the protection field
- required Boolean
- Indicates whether this field must be provided when creating a protection profile
- validation
Schema String - JSON schema defining validation rules and constraints for the field value
- default string
- Predefined default value for the field if not specified
- description string
- Detailed description explaining the field's purpose and usage guidelines
- field
Type string - Data type classification of the field (e.g., string, integer, array)
- id number
- Unique identifier for the DDoS protection field
- name string
- Human-readable name of the protection field
- required boolean
- Indicates whether this field must be provided when creating a protection profile
- validation
Schema string - JSON schema defining validation rules and constraints for the field value
- default str
- Predefined default value for the field if not specified
- description str
- Detailed description explaining the field's purpose and usage guidelines
- field_
type str - Data type classification of the field (e.g., string, integer, array)
- id float
- Unique identifier for the DDoS protection field
- name str
- Human-readable name of the protection field
- required bool
- Indicates whether this field must be provided when creating a protection profile
- validation_
schema str - JSON schema defining validation rules and constraints for the field value
- default String
- Predefined default value for the field if not specified
- description String
- Detailed description explaining the field's purpose and usage guidelines
- field
Type String - Data type classification of the field (e.g., string, integer, array)
- id Number
- Unique identifier for the DDoS protection field
- name String
- Human-readable name of the protection field
- required Boolean
- Indicates whether this field must be provided when creating a protection profile
- validation
Schema String - JSON schema defining validation rules and constraints for the field value
CloudInstanceDdosProfileProtocol, CloudInstanceDdosProfileProtocolArgs
CloudInstanceDdosProfileStatus, CloudInstanceDdosProfileStatusArgs
- Error
Description string - Detailed error message describing any issues with the profile operation
- Status string
- Current operational status of the DDoS protection profile
- Error
Description string - Detailed error message describing any issues with the profile operation
- Status string
- Current operational status of the DDoS protection profile
- error
Description String - Detailed error message describing any issues with the profile operation
- status String
- Current operational status of the DDoS protection profile
- error
Description string - Detailed error message describing any issues with the profile operation
- status string
- Current operational status of the DDoS protection profile
- error_
description str - Detailed error message describing any issues with the profile operation
- status str
- Current operational status of the DDoS protection profile
- error
Description String - Detailed error message describing any issues with the profile operation
- status String
- Current operational status of the DDoS protection profile
CloudInstanceFixedIpAssignment, CloudInstanceFixedIpAssignmentArgs
- external bool
- Is network external
- ip_
address str - Ip address
- subnet_
id str - Interface subnet id
CloudInstanceInstanceIsolation, CloudInstanceInstanceIsolationArgs
- Reason string
- The reason of instance isolation if it is isolated from external internet.
- Reason string
- The reason of instance isolation if it is isolated from external internet.
- reason String
- The reason of instance isolation if it is isolated from external internet.
- reason string
- The reason of instance isolation if it is isolated from external internet.
- reason str
- The reason of instance isolation if it is isolated from external internet.
- reason String
- The reason of instance isolation if it is isolated from external internet.
CloudInstanceInterface, CloudInstanceInterfaceArgs
- Type string
- A public IP address will be assigned to the instance. Available values: "external", "subnet", "anysubnet", "reservedfixed_ip".
- Floating
Ip CloudInstance Interface Floating Ip - Allows the instance to have a public IP that can be reached from the internet.
- Interface
Name string - Interface name. Defaults to
nulland is returned asnullin the API response if not set. - Ip
Address string - IP address assigned to this interface. Can be specified for subnet type, computed for other types.
- Ip
Family string - Specify
ipv4,ipv6, ordualto enable both. Available values: "dual", "ipv4", "ipv6". - Network
Id string - The network where the instance will be connected.
- Port
Id string - Port ID for the interface. Required for reservedfixedip type, computed for other types.
- Security
Groups List<CloudInstance Interface Security Group> - Specifies security group UUIDs to be applied to the instance network interface.
- Subnet
Id string - The instance will get an IP address from this subnet.
- Type string
- A public IP address will be assigned to the instance. Available values: "external", "subnet", "anysubnet", "reservedfixed_ip".
- Floating
Ip CloudInstance Interface Floating Ip - Allows the instance to have a public IP that can be reached from the internet.
- Interface
Name string - Interface name. Defaults to
nulland is returned asnullin the API response if not set. - Ip
Address string - IP address assigned to this interface. Can be specified for subnet type, computed for other types.
- Ip
Family string - Specify
ipv4,ipv6, ordualto enable both. Available values: "dual", "ipv4", "ipv6". - Network
Id string - The network where the instance will be connected.
- Port
Id string - Port ID for the interface. Required for reservedfixedip type, computed for other types.
- Security
Groups []CloudInstance Interface Security Group - Specifies security group UUIDs to be applied to the instance network interface.
- Subnet
Id string - The instance will get an IP address from this subnet.
- type String
- A public IP address will be assigned to the instance. Available values: "external", "subnet", "anysubnet", "reservedfixed_ip".
- floating
Ip CloudInstance Interface Floating Ip - Allows the instance to have a public IP that can be reached from the internet.
- interface
Name String - Interface name. Defaults to
nulland is returned asnullin the API response if not set. - ip
Address String - IP address assigned to this interface. Can be specified for subnet type, computed for other types.
- ip
Family String - Specify
ipv4,ipv6, ordualto enable both. Available values: "dual", "ipv4", "ipv6". - network
Id String - The network where the instance will be connected.
- port
Id String - Port ID for the interface. Required for reservedfixedip type, computed for other types.
- security
Groups List<CloudInstance Interface Security Group> - Specifies security group UUIDs to be applied to the instance network interface.
- subnet
Id String - The instance will get an IP address from this subnet.
- type string
- A public IP address will be assigned to the instance. Available values: "external", "subnet", "anysubnet", "reservedfixed_ip".
- floating
Ip CloudInstance Interface Floating Ip - Allows the instance to have a public IP that can be reached from the internet.
- interface
Name string - Interface name. Defaults to
nulland is returned asnullin the API response if not set. - ip
Address string - IP address assigned to this interface. Can be specified for subnet type, computed for other types.
- ip
Family string - Specify
ipv4,ipv6, ordualto enable both. Available values: "dual", "ipv4", "ipv6". - network
Id string - The network where the instance will be connected.
- port
Id string - Port ID for the interface. Required for reservedfixedip type, computed for other types.
- security
Groups CloudInstance Interface Security Group[] - Specifies security group UUIDs to be applied to the instance network interface.
- subnet
Id string - The instance will get an IP address from this subnet.
- type str
- A public IP address will be assigned to the instance. Available values: "external", "subnet", "anysubnet", "reservedfixed_ip".
- floating_
ip CloudInstance Interface Floating Ip - Allows the instance to have a public IP that can be reached from the internet.
- interface_
name str - Interface name. Defaults to
nulland is returned asnullin the API response if not set. - ip_
address str - IP address assigned to this interface. Can be specified for subnet type, computed for other types.
- ip_
family str - Specify
ipv4,ipv6, ordualto enable both. Available values: "dual", "ipv4", "ipv6". - network_
id str - The network where the instance will be connected.
- port_
id str - Port ID for the interface. Required for reservedfixedip type, computed for other types.
- security_
groups Sequence[CloudInstance Interface Security Group] - Specifies security group UUIDs to be applied to the instance network interface.
- subnet_
id str - The instance will get an IP address from this subnet.
- type String
- A public IP address will be assigned to the instance. Available values: "external", "subnet", "anysubnet", "reservedfixed_ip".
- floating
Ip Property Map - Allows the instance to have a public IP that can be reached from the internet.
- interface
Name String - Interface name. Defaults to
nulland is returned asnullin the API response if not set. - ip
Address String - IP address assigned to this interface. Can be specified for subnet type, computed for other types.
- ip
Family String - Specify
ipv4,ipv6, ordualto enable both. Available values: "dual", "ipv4", "ipv6". - network
Id String - The network where the instance will be connected.
- port
Id String - Port ID for the interface. Required for reservedfixedip type, computed for other types.
- security
Groups List<Property Map> - Specifies security group UUIDs to be applied to the instance network interface.
- subnet
Id String - The instance will get an IP address from this subnet.
CloudInstanceInterfaceFloatingIp, CloudInstanceInterfaceFloatingIpArgs
- Source string
- A new floating IP will be created and attached to the instance. A floating IP is a public IP that makes the instance accessible from the internet, even if it only has a private IP. It works like SNAT, allowing outgoing and incoming traffic. Available values: "new", "existing".
- Existing
Floating stringId - An existing available floating IP id must be specified if the source is set to
existing
- Source string
- A new floating IP will be created and attached to the instance. A floating IP is a public IP that makes the instance accessible from the internet, even if it only has a private IP. It works like SNAT, allowing outgoing and incoming traffic. Available values: "new", "existing".
- Existing
Floating stringId - An existing available floating IP id must be specified if the source is set to
existing
- source String
- A new floating IP will be created and attached to the instance. A floating IP is a public IP that makes the instance accessible from the internet, even if it only has a private IP. It works like SNAT, allowing outgoing and incoming traffic. Available values: "new", "existing".
- existing
Floating StringId - An existing available floating IP id must be specified if the source is set to
existing
- source string
- A new floating IP will be created and attached to the instance. A floating IP is a public IP that makes the instance accessible from the internet, even if it only has a private IP. It works like SNAT, allowing outgoing and incoming traffic. Available values: "new", "existing".
- existing
Floating stringId - An existing available floating IP id must be specified if the source is set to
existing
- source str
- A new floating IP will be created and attached to the instance. A floating IP is a public IP that makes the instance accessible from the internet, even if it only has a private IP. It works like SNAT, allowing outgoing and incoming traffic. Available values: "new", "existing".
- existing_
floating_ strid - An existing available floating IP id must be specified if the source is set to
existing
- source String
- A new floating IP will be created and attached to the instance. A floating IP is a public IP that makes the instance accessible from the internet, even if it only has a private IP. It works like SNAT, allowing outgoing and incoming traffic. Available values: "new", "existing".
- existing
Floating StringId - An existing available floating IP id must be specified if the source is set to
existing
CloudInstanceInterfaceSecurityGroup, CloudInstanceInterfaceSecurityGroupArgs
- Id string
- Resource ID
- Id string
- Resource ID
- id String
- Resource ID
- id string
- Resource ID
- id str
- Resource ID
- id String
- Resource ID
CloudInstanceSecurityGroup, CloudInstanceSecurityGroupArgs
- Id string
- Resource ID
- Id string
- Resource ID
- id String
- Resource ID
- id string
- Resource ID
- id str
- Resource ID
- id String
- Resource ID
CloudInstanceVolume, CloudInstanceVolumeArgs
- Volume
Id string - ID of an existing volume to attach to the instance.
- Attachment
Tag string - Block device attachment tag. Used to identify the device in the guest OS (e.g., 'vdb', 'data-disk'). Not exposed in user-visible tags.
- Boot
Index double - Boot device index (creation-only). 0 = primary boot, positive = secondary bootable, negative = not bootable. Cannot be changed after instance creation.
- Volume
Id string - ID of an existing volume to attach to the instance.
- Attachment
Tag string - Block device attachment tag. Used to identify the device in the guest OS (e.g., 'vdb', 'data-disk'). Not exposed in user-visible tags.
- Boot
Index float64 - Boot device index (creation-only). 0 = primary boot, positive = secondary bootable, negative = not bootable. Cannot be changed after instance creation.
- volume
Id String - ID of an existing volume to attach to the instance.
- attachment
Tag String - Block device attachment tag. Used to identify the device in the guest OS (e.g., 'vdb', 'data-disk'). Not exposed in user-visible tags.
- boot
Index Double - Boot device index (creation-only). 0 = primary boot, positive = secondary bootable, negative = not bootable. Cannot be changed after instance creation.
- volume
Id string - ID of an existing volume to attach to the instance.
- attachment
Tag string - Block device attachment tag. Used to identify the device in the guest OS (e.g., 'vdb', 'data-disk'). Not exposed in user-visible tags.
- boot
Index number - Boot device index (creation-only). 0 = primary boot, positive = secondary bootable, negative = not bootable. Cannot be changed after instance creation.
- volume_
id str - ID of an existing volume to attach to the instance.
- attachment_
tag str - Block device attachment tag. Used to identify the device in the guest OS (e.g., 'vdb', 'data-disk'). Not exposed in user-visible tags.
- boot_
index float - Boot device index (creation-only). 0 = primary boot, positive = secondary bootable, negative = not bootable. Cannot be changed after instance creation.
- volume
Id String - ID of an existing volume to attach to the instance.
- attachment
Tag String - Block device attachment tag. Used to identify the device in the guest OS (e.g., 'vdb', 'data-disk'). Not exposed in user-visible tags.
- boot
Index Number - Boot device index (creation-only). 0 = primary boot, positive = secondary bootable, negative = not bootable. Cannot be changed after instance creation.
Import
$ pulumi import gcore:index/cloudInstance:CloudInstance example '<project_id>/<region_id>/<instance_id>'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcoreTerraform Provider.
published on Tuesday, Mar 24, 2026 by g-core
