openstack.database.Instance
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,
});
}
}
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/database"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := database.NewInstance(ctx, "test", &database.InstanceArgs{
Datastore: &database.InstanceDatastoreArgs{
Type: pulumi.String("mysql"),
Version: pulumi.String("mysql-5.7"),
},
FlavorId: pulumi.String("31792d21-c355-4587-9290-56c1ed0ca376"),
Networks: database.InstanceNetworkArray{
&database.InstanceNetworkArgs{
Uuid: pulumi.String("c0612505-caf2-4fb0-b7cb-56a0240a2b12"),
},
},
Region: pulumi.String("region-test"),
Size: pulumi.Int(8),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.database.Instance;
import com.pulumi.openstack.database.InstanceArgs;
import com.pulumi.openstack.database.inputs.InstanceDatastoreArgs;
import com.pulumi.openstack.database.inputs.InstanceNetworkArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var test = new Instance("test", InstanceArgs.builder()
.datastore(InstanceDatastoreArgs.builder()
.type("mysql")
.version("mysql-5.7")
.build())
.flavorId("31792d21-c355-4587-9290-56c1ed0ca376")
.networks(InstanceNetworkArgs.builder()
.uuid("c0612505-caf2-4fb0-b7cb-56a0240a2b12")
.build())
.region("region-test")
.size(8)
.build());
}
}
import pulumi
import pulumi_openstack as openstack
test = openstack.database.Instance("test",
datastore=openstack.database.InstanceDatastoreArgs(
type="mysql",
version="mysql-5.7",
),
flavor_id="31792d21-c355-4587-9290-56c1ed0ca376",
networks=[openstack.database.InstanceNetworkArgs(
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,
});
resources:
test:
type: openstack:database:Instance
properties:
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 Instance Resource
new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
@overload
def Instance(resource_name: str,
opts: Optional[ResourceOptions] = None,
configuration_id: Optional[str] = None,
databases: Optional[Sequence[InstanceDatabaseArgs]] = None,
datastore: Optional[InstanceDatastoreArgs] = None,
flavor_id: Optional[str] = None,
name: Optional[str] = None,
networks: Optional[Sequence[InstanceNetworkArgs]] = None,
region: Optional[str] = None,
size: Optional[int] = None,
users: Optional[Sequence[InstanceUserArgs]] = None)
@overload
def Instance(resource_name: str,
args: InstanceArgs,
opts: Optional[ResourceOptions] = None)
func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
public Instance(String name, InstanceArgs args)
public Instance(String name, InstanceArgs args, CustomResourceOptions options)
type: openstack:database:Instance
properties: # The arguments to resource properties.
options: # 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.
- resource_name str
- The unique name of the resource.
- args InstanceArgs
- 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 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.
- name String
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- options 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 Architecture and Concepts docs.
Inputs
The Instance resource accepts the following input properties:
- Datastore
Pulumi.
Open Stack. Database. Inputs. Instance Datastore Args 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.
- Configuration
Id string Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.
- Databases
List<Pulumi.
Open Stack. Database. Inputs. Instance Database Args> An array of database name, charset and collate. The database object structure is documented below.
- Flavor
Id 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.
Open Stack. Database. Inputs. Instance Network Args> 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.
Open Stack. Database. Inputs. Instance User Args> An array of username, password, host and databases. The user object structure is documented below.
- Datastore
Instance
Datastore Args 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.
- Configuration
Id string Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.
- Databases
[]Instance
Database Args An array of database name, charset and collate. The database object structure is documented below.
- Flavor
Id 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
[]Instance
Network Args 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
[]Instance
User Args An array of username, password, host and databases. The user object structure is documented below.
- datastore
Instance
Datastore Args An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.
- size Integer
Specifies the volume size in GB. Changing this creates new instance.
- configuration
Id String Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.
- databases
List<Instance
Database Args> An array of database name, charset and collate. The database object structure is documented below.
- flavor
Id 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<Instance
Network Args> 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<Instance
User Args> An array of username, password, host and databases. The user object structure is documented below.
- datastore
Instance
Datastore Args 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.
- configuration
Id string Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.
- databases
Instance
Database Args[] An array of database name, charset and collate. The database object structure is documented below.
- flavor
Id 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
Instance
Network Args[] 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
Instance
User Args[] An array of username, password, host and databases. The user object structure is documented below.
- datastore
Instance
Datastore Args 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.
- configuration_
id str Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.
- databases
Sequence[Instance
Database Args] 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
Sequence[Instance
Network Args] 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
Sequence[Instance
User Args] An array of username, password, host and databases. The user object structure is documented below.
- datastore Property Map
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.
- configuration
Id String Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.
- databases List<Property Map>
An array of database name, charset and collate. The database object structure is documented below.
- flavor
Id 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<Property Map>
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<Property Map>
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:
Look up 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,
addresses: Optional[Sequence[str]] = None,
configuration_id: Optional[str] = None,
databases: Optional[Sequence[InstanceDatabaseArgs]] = None,
datastore: Optional[InstanceDatastoreArgs] = None,
flavor_id: Optional[str] = None,
name: Optional[str] = None,
networks: Optional[Sequence[InstanceNetworkArgs]] = None,
region: Optional[str] = None,
size: Optional[int] = None,
users: Optional[Sequence[InstanceUserArgs]] = 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)
public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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 List<string>
A list of IP addresses assigned to the instance.
- Configuration
Id string Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.
- Databases
List<Pulumi.
Open Stack. Database. Inputs. Instance Database Args> An array of database name, charset and collate. The database object structure is documented below.
- Datastore
Pulumi.
Open Stack. Database. Inputs. Instance Datastore Args An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.
- Flavor
Id 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.
Open Stack. Database. Inputs. Instance Network Args> 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.
Open Stack. Database. Inputs. Instance User Args> An array of username, password, host and databases. The user object structure is documented below.
- Addresses []string
A list of IP addresses assigned to the instance.
- Configuration
Id string Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.
- Databases
[]Instance
Database Args An array of database name, charset and collate. The database object structure is documented below.
- Datastore
Instance
Datastore Args An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.
- Flavor
Id 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
[]Instance
Network Args 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
[]Instance
User Args An array of username, password, host and databases. The user object structure is documented below.
- addresses List<String>
A list of IP addresses assigned to the instance.
- configuration
Id String Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.
- databases
List<Instance
Database Args> An array of database name, charset and collate. The database object structure is documented below.
- datastore
Instance
Datastore Args An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.
- flavor
Id 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<Instance
Network Args> 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 Integer
Specifies the volume size in GB. Changing this creates new instance.
- users
List<Instance
User Args> An array of username, password, host and databases. The user object structure is documented below.
- addresses string[]
A list of IP addresses assigned to the instance.
- configuration
Id string Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.
- databases
Instance
Database Args[] An array of database name, charset and collate. The database object structure is documented below.
- datastore
Instance
Datastore Args An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.
- flavor
Id 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
Instance
Network Args[] 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
Instance
User Args[] An array of username, password, host and databases. The user object structure is documented below.
- addresses Sequence[str]
A list of IP addresses assigned to the instance.
- configuration_
id str Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.
- databases
Sequence[Instance
Database Args] An array of database name, charset and collate. The database object structure is documented below.
- datastore
Instance
Datastore Args 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
Sequence[Instance
Network Args] 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 int
Specifies the volume size in GB. Changing this creates new instance.
- users
Sequence[Instance
User Args] An array of username, password, host and databases. The user object structure is documented below.
- addresses List<String>
A list of IP addresses assigned to the instance.
- configuration
Id String Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.
- databases List<Property Map>
An array of database name, charset and collate. The database object structure is documented below.
- datastore Property Map
An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.
- flavor
Id 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<Property Map>
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 List<Property Map>
An array of username, password, host and databases. The user object structure is documented below.
Supporting Types
InstanceDatabase
InstanceDatastore
InstanceNetwork
- Fixed
Ip stringV4 Specifies a fixed IPv4 address to be used on this network. Changing this creates a new instance.
- Fixed
Ip stringV6 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.
- Fixed
Ip stringV4 Specifies a fixed IPv4 address to be used on this network. Changing this creates a new instance.
- Fixed
Ip stringV6 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.
- fixed
Ip StringV4 Specifies a fixed IPv4 address to be used on this network. Changing this creates a new instance.
- fixed
Ip StringV6 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.
- fixed
Ip stringV4 Specifies a fixed IPv4 address to be used on this network. Changing this creates a new instance.
- fixed
Ip stringV6 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.
- fixed_
ip_ strv4 Specifies a fixed IPv4 address to be used on this network. Changing this creates a new instance.
- fixed_
ip_ strv6 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.
- fixed
Ip StringV4 Specifies a fixed IPv4 address to be used on this network. Changing this creates a new instance.
- fixed
Ip StringV6 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.
InstanceUser
- 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 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 str
Database to be created on new instance. Changing this creates a new instance.
- databases Sequence[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.
- 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.
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
openstack
Terraform Provider.