The Automation API is now available. No CLI. No human-in-the-loop. Just your code. Learn More

Instance

Provides a Civo Instance resource. This can be used to create, modify, and delete Instances.

Create a Instance Resource

def Instance(resource_name: str, opts: Optional[ResourceOptions] = None, firewall_id: Optional[str] = None, hostname: Optional[str] = None, initial_user: Optional[str] = None, network_id: Optional[str] = None, notes: Optional[str] = None, public_ip_required: Optional[str] = None, reverse_dns: Optional[str] = None, script: Optional[str] = None, size: Optional[str] = None, sshkey_id: Optional[str] = None, tags: Optional[Sequence[str]] = None, template: Optional[str] = None)
func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args InstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args InstanceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args InstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Instance Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Instance resource accepts the following input properties:

Hostname string

The Instance hostname.

FirewallId string

The ID of the firewall to use, from the current list. If left blank or not sent, the default firewall will be used (open to all).

InitialUser string

The name of the initial user created on the server (optional; this will default to the template’s default_username and fallback to civo).

NetworkId string

This must be the ID of the network from the network listing (optional; default network used when not specified).

Notes string

Add some notes to the instance.

PublicIpRequired string

This should be either false, true or move_ip_from:intances_id.

ReverseDns string

A fully qualified domain name that should be used as the instance’s IP’s reverse DNS (optional, uses the hostname if unspecified).

Script string

the contents of a script that will be uploaded to /usr/local/bin/civo-user-init-script on your instance, read/write/executable only by root and then will be executed at the end of the cloud initialization

Size string

The name of the size, from the current list, e.g. g2.small (required).

SshkeyId string

The ID of an already uploaded SSH public key to use for login to the default user (optional; if one isn’t provided a random password will be set and returned in the initial_password field).

Tags List<string>

An optional list of tags, represented as a key, value pair.

Template string

The ID for the template to use to build the instance.

Hostname string

The Instance hostname.

FirewallId string

The ID of the firewall to use, from the current list. If left blank or not sent, the default firewall will be used (open to all).

InitialUser string

The name of the initial user created on the server (optional; this will default to the template’s default_username and fallback to civo).

NetworkId string

This must be the ID of the network from the network listing (optional; default network used when not specified).

Notes string

Add some notes to the instance.

PublicIpRequired string

This should be either false, true or move_ip_from:intances_id.

ReverseDns string

A fully qualified domain name that should be used as the instance’s IP’s reverse DNS (optional, uses the hostname if unspecified).

Script string

the contents of a script that will be uploaded to /usr/local/bin/civo-user-init-script on your instance, read/write/executable only by root and then will be executed at the end of the cloud initialization

Size string

The name of the size, from the current list, e.g. g2.small (required).

SshkeyId string

The ID of an already uploaded SSH public key to use for login to the default user (optional; if one isn’t provided a random password will be set and returned in the initial_password field).

Tags []string

An optional list of tags, represented as a key, value pair.

Template string

The ID for the template to use to build the instance.

hostname string

The Instance hostname.

firewallId string

The ID of the firewall to use, from the current list. If left blank or not sent, the default firewall will be used (open to all).

initialUser string

The name of the initial user created on the server (optional; this will default to the template’s default_username and fallback to civo).

networkId string

This must be the ID of the network from the network listing (optional; default network used when not specified).

notes string

Add some notes to the instance.

publicIpRequired string

This should be either false, true or move_ip_from:intances_id.

reverseDns string

A fully qualified domain name that should be used as the instance’s IP’s reverse DNS (optional, uses the hostname if unspecified).

script string

the contents of a script that will be uploaded to /usr/local/bin/civo-user-init-script on your instance, read/write/executable only by root and then will be executed at the end of the cloud initialization

size string

The name of the size, from the current list, e.g. g2.small (required).

sshkeyId string

The ID of an already uploaded SSH public key to use for login to the default user (optional; if one isn’t provided a random password will be set and returned in the initial_password field).

tags string[]

An optional list of tags, represented as a key, value pair.

template string

The ID for the template to use to build the instance.

hostname str

The Instance hostname.

firewall_id str

The ID of the firewall to use, from the current list. If left blank or not sent, the default firewall will be used (open to all).

initial_user str

The name of the initial user created on the server (optional; this will default to the template’s default_username and fallback to civo).

network_id str

This must be the ID of the network from the network listing (optional; default network used when not specified).

notes str

Add some notes to the instance.

public_ip_required str

This should be either false, true or move_ip_from:intances_id.

reverse_dns str

A fully qualified domain name that should be used as the instance’s IP’s reverse DNS (optional, uses the hostname if unspecified).

script str

the contents of a script that will be uploaded to /usr/local/bin/civo-user-init-script on your instance, read/write/executable only by root and then will be executed at the end of the cloud initialization

size str

The name of the size, from the current list, e.g. g2.small (required).

sshkey_id str

The ID of an already uploaded SSH public key to use for login to the default user (optional; if one isn’t provided a random password will be set and returned in the initial_password field).

tags Sequence[str]

An optional list of tags, represented as a key, value pair.

template str

The ID for the template to use to build the instance.

Outputs

All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:

CpuCores int

Total cpu of the inatance.

CreatedAt string

The date of creation of the instance

DiskGb int

The size of the disk.

Id string
The provider-assigned unique ID for this managed resource.
InitialPassword string

Instance initial password

PrivateIp string

The private ip.

PseudoIp string

Is the ip that is used to route the public ip from the internet to the instance using NAT

PublicIp string

The public ip.

RamMb int

Total ram of the instance.

Status string

The status of the instance

CpuCores int

Total cpu of the inatance.

CreatedAt string

The date of creation of the instance

DiskGb int

The size of the disk.

Id string
The provider-assigned unique ID for this managed resource.
InitialPassword string

Instance initial password

PrivateIp string

The private ip.

PseudoIp string

Is the ip that is used to route the public ip from the internet to the instance using NAT

PublicIp string

The public ip.

RamMb int

Total ram of the instance.

Status string

The status of the instance

cpuCores number

Total cpu of the inatance.

createdAt string

The date of creation of the instance

diskGb number

The size of the disk.

id string
The provider-assigned unique ID for this managed resource.
initialPassword string

Instance initial password

privateIp string

The private ip.

pseudoIp string

Is the ip that is used to route the public ip from the internet to the instance using NAT

publicIp string

The public ip.

ramMb number

Total ram of the instance.

status string

The status of the instance

cpu_cores int

Total cpu of the inatance.

created_at str

The date of creation of the instance

disk_gb int

The size of the disk.

id str
The provider-assigned unique ID for this managed resource.
initial_password str

Instance initial password

private_ip str

The private ip.

pseudo_ip str

Is the ip that is used to route the public ip from the internet to the instance using NAT

public_ip str

The public ip.

ram_mb int

Total ram of the instance.

status str

The status of the instance

Look up an Existing Instance Resource

Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instance
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, cpu_cores: Optional[int] = None, created_at: Optional[str] = None, disk_gb: Optional[int] = None, firewall_id: Optional[str] = None, hostname: Optional[str] = None, initial_password: Optional[str] = None, initial_user: Optional[str] = None, network_id: Optional[str] = None, notes: Optional[str] = None, private_ip: Optional[str] = None, pseudo_ip: Optional[str] = None, public_ip: Optional[str] = None, public_ip_required: Optional[str] = None, ram_mb: Optional[int] = None, reverse_dns: Optional[str] = None, script: Optional[str] = None, size: Optional[str] = None, sshkey_id: Optional[str] = None, status: Optional[str] = None, tags: Optional[Sequence[str]] = None, template: Optional[str] = None) -> Instance
func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

CpuCores int

Total cpu of the inatance.

CreatedAt string

The date of creation of the instance

DiskGb int

The size of the disk.

FirewallId string

The ID of the firewall to use, from the current list. If left blank or not sent, the default firewall will be used (open to all).

Hostname string

The Instance hostname.

InitialPassword string

Instance initial password

InitialUser string

The name of the initial user created on the server (optional; this will default to the template’s default_username and fallback to civo).

NetworkId string

This must be the ID of the network from the network listing (optional; default network used when not specified).

Notes string

Add some notes to the instance.

PrivateIp string

The private ip.

PseudoIp string

Is the ip that is used to route the public ip from the internet to the instance using NAT

PublicIp string

The public ip.

PublicIpRequired string

This should be either false, true or move_ip_from:intances_id.

RamMb int

Total ram of the instance.

ReverseDns string

A fully qualified domain name that should be used as the instance’s IP’s reverse DNS (optional, uses the hostname if unspecified).

Script string

the contents of a script that will be uploaded to /usr/local/bin/civo-user-init-script on your instance, read/write/executable only by root and then will be executed at the end of the cloud initialization

Size string

The name of the size, from the current list, e.g. g2.small (required).

SshkeyId string

The ID of an already uploaded SSH public key to use for login to the default user (optional; if one isn’t provided a random password will be set and returned in the initial_password field).

Status string

The status of the instance

Tags List<string>

An optional list of tags, represented as a key, value pair.

Template string

The ID for the template to use to build the instance.

CpuCores int

Total cpu of the inatance.

CreatedAt string

The date of creation of the instance

DiskGb int

The size of the disk.

FirewallId string

The ID of the firewall to use, from the current list. If left blank or not sent, the default firewall will be used (open to all).

Hostname string

The Instance hostname.

InitialPassword string

Instance initial password

InitialUser string

The name of the initial user created on the server (optional; this will default to the template’s default_username and fallback to civo).

NetworkId string

This must be the ID of the network from the network listing (optional; default network used when not specified).

Notes string

Add some notes to the instance.

PrivateIp string

The private ip.

PseudoIp string

Is the ip that is used to route the public ip from the internet to the instance using NAT

PublicIp string

The public ip.

PublicIpRequired string

This should be either false, true or move_ip_from:intances_id.

RamMb int

Total ram of the instance.

ReverseDns string

A fully qualified domain name that should be used as the instance’s IP’s reverse DNS (optional, uses the hostname if unspecified).

Script string

the contents of a script that will be uploaded to /usr/local/bin/civo-user-init-script on your instance, read/write/executable only by root and then will be executed at the end of the cloud initialization

Size string

The name of the size, from the current list, e.g. g2.small (required).

SshkeyId string

The ID of an already uploaded SSH public key to use for login to the default user (optional; if one isn’t provided a random password will be set and returned in the initial_password field).

Status string

The status of the instance

Tags []string

An optional list of tags, represented as a key, value pair.

Template string

The ID for the template to use to build the instance.

cpuCores number

Total cpu of the inatance.

createdAt string

The date of creation of the instance

diskGb number

The size of the disk.

firewallId string

The ID of the firewall to use, from the current list. If left blank or not sent, the default firewall will be used (open to all).

hostname string

The Instance hostname.

initialPassword string

Instance initial password

initialUser string

The name of the initial user created on the server (optional; this will default to the template’s default_username and fallback to civo).

networkId string

This must be the ID of the network from the network listing (optional; default network used when not specified).

notes string

Add some notes to the instance.

privateIp string

The private ip.

pseudoIp string

Is the ip that is used to route the public ip from the internet to the instance using NAT

publicIp string

The public ip.

publicIpRequired string

This should be either false, true or move_ip_from:intances_id.

ramMb number

Total ram of the instance.

reverseDns string

A fully qualified domain name that should be used as the instance’s IP’s reverse DNS (optional, uses the hostname if unspecified).

script string

the contents of a script that will be uploaded to /usr/local/bin/civo-user-init-script on your instance, read/write/executable only by root and then will be executed at the end of the cloud initialization

size string

The name of the size, from the current list, e.g. g2.small (required).

sshkeyId string

The ID of an already uploaded SSH public key to use for login to the default user (optional; if one isn’t provided a random password will be set and returned in the initial_password field).

status string

The status of the instance

tags string[]

An optional list of tags, represented as a key, value pair.

template string

The ID for the template to use to build the instance.

cpu_cores int

Total cpu of the inatance.

created_at str

The date of creation of the instance

disk_gb int

The size of the disk.

firewall_id str

The ID of the firewall to use, from the current list. If left blank or not sent, the default firewall will be used (open to all).

hostname str

The Instance hostname.

initial_password str

Instance initial password

initial_user str

The name of the initial user created on the server (optional; this will default to the template’s default_username and fallback to civo).

network_id str

This must be the ID of the network from the network listing (optional; default network used when not specified).

notes str

Add some notes to the instance.

private_ip str

The private ip.

pseudo_ip str

Is the ip that is used to route the public ip from the internet to the instance using NAT

public_ip str

The public ip.

public_ip_required str

This should be either false, true or move_ip_from:intances_id.

ram_mb int

Total ram of the instance.

reverse_dns str

A fully qualified domain name that should be used as the instance’s IP’s reverse DNS (optional, uses the hostname if unspecified).

script str

the contents of a script that will be uploaded to /usr/local/bin/civo-user-init-script on your instance, read/write/executable only by root and then will be executed at the end of the cloud initialization

size str

The name of the size, from the current list, e.g. g2.small (required).

sshkey_id str

The ID of an already uploaded SSH public key to use for login to the default user (optional; if one isn’t provided a random password will be set and returned in the initial_password field).

status str

The status of the instance

tags Sequence[str]

An optional list of tags, represented as a key, value pair.

template str

The ID for the template to use to build the instance.

Package Details

Repository
https://github.com/pulumi/pulumi-civo
License
Apache-2.0
Notes
This Pulumi package is based on the civo Terraform Provider.