Instance

Manages a V1 DB instance resource within OpenStack.

Example Usage

Instance

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var test = new OpenStack.Database.Instance("test", new OpenStack.Database.InstanceArgs
        {
            Datastore = new OpenStack.Database.Inputs.InstanceDatastoreArgs
            {
                Type = "mysql",
                Version = "mysql-5.7",
            },
            FlavorId = "31792d21-c355-4587-9290-56c1ed0ca376",
            Networks = 
            {
                new OpenStack.Database.Inputs.InstanceNetworkArgs
                {
                    Uuid = "c0612505-caf2-4fb0-b7cb-56a0240a2b12",
                },
            },
            Region = "region-test",
            Size = 8,
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

test = openstack.database.Instance("test",
    datastore={
        "type": "mysql",
        "version": "mysql-5.7",
    },
    flavor_id="31792d21-c355-4587-9290-56c1ed0ca376",
    networks=[{
        "uuid": "c0612505-caf2-4fb0-b7cb-56a0240a2b12",
    }],
    region="region-test",
    size=8)
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const test = new openstack.database.Instance("test", {
    datastore: {
        type: "mysql",
        version: "mysql-5.7",
    },
    flavorId: "31792d21-c355-4587-9290-56c1ed0ca376",
    networks: [{
        uuid: "c0612505-caf2-4fb0-b7cb-56a0240a2b12",
    }],
    region: "region-test",
    size: 8,
});

Create a Instance Resource

def Instance(resource_name, opts=None, configuration_id=None, databases=None, datastore=None, flavor_id=None, name=None, networks=None, region=None, size=None, users=None, __props__=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:

Datastore Pulumi.OpenStack.Database.Inputs.InstanceDatastoreArgs

An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.

Size int

Specifies the volume size in GB. Changing this creates new instance.

ConfigurationId string

Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.

Databases List<Pulumi.OpenStack.Database.Inputs.InstanceDatabaseArgs>

An array of database name, charset and collate. The database object structure is documented below.

FlavorId string

The flavor ID of the desired flavor for the instance. Changing this creates new instance.

Name string

Database to be created on new instance. Changing this creates a new instance.

Networks List<Pulumi.OpenStack.Database.Inputs.InstanceNetworkArgs>

An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new instance.

Region string

The region in which to create the db instance. Changing this creates a new instance.

Users List<Pulumi.OpenStack.Database.Inputs.InstanceUserArgs>

An array of username, password, host and databases. The user object structure is documented below.

Datastore InstanceDatastore

An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.

Size int

Specifies the volume size in GB. Changing this creates new instance.

ConfigurationId string

Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.

Databases []InstanceDatabase

An array of database name, charset and collate. The database object structure is documented below.

FlavorId string

The flavor ID of the desired flavor for the instance. Changing this creates new instance.

Name string

Database to be created on new instance. Changing this creates a new instance.

Networks []InstanceNetwork

An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new instance.

Region string

The region in which to create the db instance. Changing this creates a new instance.

Users []InstanceUser

An array of username, password, host and databases. The user object structure is documented below.

datastore InstanceDatastore

An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.

size number

Specifies the volume size in GB. Changing this creates new instance.

configurationId string

Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.

databases InstanceDatabase[]

An array of database name, charset and collate. The database object structure is documented below.

flavorId string

The flavor ID of the desired flavor for the instance. Changing this creates new instance.

name string

Database to be created on new instance. Changing this creates a new instance.

networks InstanceNetwork[]

An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new instance.

region string

The region in which to create the db instance. Changing this creates a new instance.

users InstanceUser[]

An array of username, password, host and databases. The user object structure is documented below.

datastore Dict[InstanceDatastore]

An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.

size float

Specifies the volume size in GB. Changing this creates new instance.

configuration_id str

Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.

databases List[InstanceDatabase]

An array of database name, charset and collate. The database object structure is documented below.

flavor_id str

The flavor ID of the desired flavor for the instance. Changing this creates new instance.

name str

Database to be created on new instance. Changing this creates a new instance.

networks List[InstanceNetwork]

An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new instance.

region str

The region in which to create the db instance. Changing this creates a new instance.

users List[InstanceUser]

An array of username, password, host and databases. The user object structure is documented below.

Outputs

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

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

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
static get(resource_name, id, opts=None, configuration_id=None, databases=None, datastore=None, flavor_id=None, name=None, networks=None, region=None, size=None, users=None, __props__=None);
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:

ConfigurationId string

Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.

Databases List<Pulumi.OpenStack.Database.Inputs.InstanceDatabaseArgs>

An array of database name, charset and collate. The database object structure is documented below.

Datastore Pulumi.OpenStack.Database.Inputs.InstanceDatastoreArgs

An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.

FlavorId string

The flavor ID of the desired flavor for the instance. Changing this creates new instance.

Name string

Database to be created on new instance. Changing this creates a new instance.

Networks List<Pulumi.OpenStack.Database.Inputs.InstanceNetworkArgs>

An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new instance.

Region string

The region in which to create the db instance. Changing this creates a new instance.

Size int

Specifies the volume size in GB. Changing this creates new instance.

Users List<Pulumi.OpenStack.Database.Inputs.InstanceUserArgs>

An array of username, password, host and databases. The user object structure is documented below.

ConfigurationId string

Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.

Databases []InstanceDatabase

An array of database name, charset and collate. The database object structure is documented below.

Datastore InstanceDatastore

An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.

FlavorId string

The flavor ID of the desired flavor for the instance. Changing this creates new instance.

Name string

Database to be created on new instance. Changing this creates a new instance.

Networks []InstanceNetwork

An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new instance.

Region string

The region in which to create the db instance. Changing this creates a new instance.

Size int

Specifies the volume size in GB. Changing this creates new instance.

Users []InstanceUser

An array of username, password, host and databases. The user object structure is documented below.

configurationId string

Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.

databases InstanceDatabase[]

An array of database name, charset and collate. The database object structure is documented below.

datastore InstanceDatastore

An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.

flavorId string

The flavor ID of the desired flavor for the instance. Changing this creates new instance.

name string

Database to be created on new instance. Changing this creates a new instance.

networks InstanceNetwork[]

An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new instance.

region string

The region in which to create the db instance. Changing this creates a new instance.

size number

Specifies the volume size in GB. Changing this creates new instance.

users InstanceUser[]

An array of username, password, host and databases. The user object structure is documented below.

configuration_id str

Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.

databases List[InstanceDatabase]

An array of database name, charset and collate. The database object structure is documented below.

datastore Dict[InstanceDatastore]

An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.

flavor_id str

The flavor ID of the desired flavor for the instance. Changing this creates new instance.

name str

Database to be created on new instance. Changing this creates a new instance.

networks List[InstanceNetwork]

An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new instance.

region str

The region in which to create the db instance. Changing this creates a new instance.

size float

Specifies the volume size in GB. Changing this creates new instance.

users List[InstanceUser]

An array of username, password, host and databases. The user object structure is documented below.

Supporting Types

InstanceDatabase

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

Database to be created on new instance. Changing this creates a new instance.

Charset string

Database character set. Changing this creates a new instance.

Collate string

Database collation. Changing this creates a new instance.

Name string

Database to be created on new instance. Changing this creates a new instance.

Charset string

Database character set. Changing this creates a new instance.

Collate string

Database collation. Changing this creates a new instance.

name string

Database to be created on new instance. Changing this creates a new instance.

charset string

Database character set. Changing this creates a new instance.

collate string

Database collation. Changing this creates a new instance.

name str

Database to be created on new instance. Changing this creates a new instance.

charset str

Database character set. Changing this creates a new instance.

collate str

Database collation. Changing this creates a new instance.

InstanceDatastore

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Type string

Database engine type to be used in new instance. Changing this creates a new instance.

Version string

Version of database engine type to be used in new instance. Changing this creates a new instance.

Type string

Database engine type to be used in new instance. Changing this creates a new instance.

Version string

Version of database engine type to be used in new instance. Changing this creates a new instance.

type string

Database engine type to be used in new instance. Changing this creates a new instance.

version string

Version of database engine type to be used in new instance. Changing this creates a new instance.

type str

Database engine type to be used in new instance. Changing this creates a new instance.

version str

Version of database engine type to be used in new instance. Changing this creates a new instance.

InstanceNetwork

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

FixedIpV4 string

Specifies a fixed IPv4 address to be used on this network. Changing this creates a new instance.

FixedIpV6 string

Specifies a fixed IPv6 address to be used on this network. Changing this creates a new instance.

Port string

The port UUID of a network to attach to the instance. Changing this creates a new instance.

Uuid string

The network UUID to attach to the instance. Changing this creates a new instance.

FixedIpV4 string

Specifies a fixed IPv4 address to be used on this network. Changing this creates a new instance.

FixedIpV6 string

Specifies a fixed IPv6 address to be used on this network. Changing this creates a new instance.

Port string

The port UUID of a network to attach to the instance. Changing this creates a new instance.

Uuid string

The network UUID to attach to the instance. Changing this creates a new instance.

fixedIpV4 string

Specifies a fixed IPv4 address to be used on this network. Changing this creates a new instance.

fixedIpV6 string

Specifies a fixed IPv6 address to be used on this network. Changing this creates a new instance.

port string

The port UUID of a network to attach to the instance. Changing this creates a new instance.

uuid string

The network UUID to attach to the instance. Changing this creates a new instance.

fixedIpV4 str

Specifies a fixed IPv4 address to be used on this network. Changing this creates a new instance.

fixedIpV6 str

Specifies a fixed IPv6 address to be used on this network. Changing this creates a new instance.

port str

The port UUID of a network to attach to the instance. Changing this creates a new instance.

uuid str

The network UUID to attach to the instance. Changing this creates a new instance.

InstanceUser

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

Database to be created on new instance. Changing this creates a new instance.

Databases List<string>

A list of databases that user will have access to. If not specified, user has access to all databases on th einstance. Changing this creates a new instance.

Host string

An ip address or % sign indicating what ip addresses can connect with this user credentials. Changing this creates a new instance.

Password string

User’s password. Changing this creates a new instance.

Name string

Database to be created on new instance. Changing this creates a new instance.

Databases []string

A list of databases that user will have access to. If not specified, user has access to all databases on th einstance. Changing this creates a new instance.

Host string

An ip address or % sign indicating what ip addresses can connect with this user credentials. Changing this creates a new instance.

Password string

User’s password. Changing this creates a new instance.

name string

Database to be created on new instance. Changing this creates a new instance.

databases string[]

A list of databases that user will have access to. If not specified, user has access to all databases on th einstance. Changing this creates a new instance.

host string

An ip address or % sign indicating what ip addresses can connect with this user credentials. Changing this creates a new instance.

password string

User’s password. Changing this creates a new instance.

name str

Database to be created on new instance. Changing this creates a new instance.

databases List[str]

A list of databases that user will have access to. If not specified, user has access to all databases on th einstance. Changing this creates a new instance.

host str

An ip address or % sign indicating what ip addresses can connect with this user credentials. Changing this creates a new instance.

password str

User’s password. Changing this creates a new instance.

Package Details

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