Database
Example Usage
using Pulumi;
using Aiven = Pulumi.Aiven;
class MyStack : Stack
{
public MyStack()
{
var mydatabase = new Aiven.Database("mydatabase", new Aiven.DatabaseArgs
{
DatabaseName = "<DATABASE_NAME>",
Project = aiven_project.Myproject.Project,
ServiceName = aiven_service.Myservice.Service_name,
});
}
}
Coming soon!
import pulumi
import pulumi_aiven as aiven
mydatabase = aiven.Database("mydatabase",
database_name="<DATABASE_NAME>",
project=aiven_project["myproject"]["project"],
service_name=aiven_service["myservice"]["service_name"])import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const mydatabase = new aiven.Database("mydatabase", {
databaseName: "<DATABASE_NAME>",
project: aiven_project_myproject.project,
serviceName: aiven_service_myservice.serviceName,
});Create a Database Resource
new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);def Database(resource_name, opts=None, database_name=None, lc_collate=None, lc_ctype=None, project=None, service_name=None, termination_protection=None, __props__=None);func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args DatabaseArgs
- 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 DatabaseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Database Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Database resource accepts the following input properties:
- Database
Name string Service database name
- Project string
Project to link the database to
- Service
Name string Service to link the database to
- Lc
Collate string Default string sort order (LC_COLLATE) of the database. Default value: en_US.UTF-8
- Lc
Ctype string Default character classification (LC_CTYPE) of the database. Default value: en_US.UTF-8
- Termination
Protection bool It is a Terraform client-side deletion protections, which prevents the database from being deleted by Terraform. It is recommended to enable this for any production databases containing critical data.
- Database
Name string Service database name
- Project string
Project to link the database to
- Service
Name string Service to link the database to
- Lc
Collate string Default string sort order (LC_COLLATE) of the database. Default value: en_US.UTF-8
- Lc
Ctype string Default character classification (LC_CTYPE) of the database. Default value: en_US.UTF-8
- Termination
Protection bool It is a Terraform client-side deletion protections, which prevents the database from being deleted by Terraform. It is recommended to enable this for any production databases containing critical data.
- database
Name string Service database name
- project string
Project to link the database to
- service
Name string Service to link the database to
- lc
Collate string Default string sort order (LC_COLLATE) of the database. Default value: en_US.UTF-8
- lc
Ctype string Default character classification (LC_CTYPE) of the database. Default value: en_US.UTF-8
- termination
Protection boolean It is a Terraform client-side deletion protections, which prevents the database from being deleted by Terraform. It is recommended to enable this for any production databases containing critical data.
- database_
name str Service database name
- project str
Project to link the database to
- service_
name str Service to link the database to
- lc_
collate str Default string sort order (LC_COLLATE) of the database. Default value: en_US.UTF-8
- lc_
ctype str Default character classification (LC_CTYPE) of the database. Default value: en_US.UTF-8
- termination_
protection bool It is a Terraform client-side deletion protections, which prevents the database from being deleted by Terraform. It is recommended to enable this for any production databases containing critical data.
Outputs
All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:
Look up an Existing Database Resource
Get an existing Database 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?: DatabaseState, opts?: CustomResourceOptions): Databasestatic get(resource_name, id, opts=None, database_name=None, lc_collate=None, lc_ctype=None, project=None, service_name=None, termination_protection=None, __props__=None);func GetDatabase(ctx *Context, name string, id IDInput, state *DatabaseState, opts ...ResourceOption) (*Database, error)public static Database Get(string name, Input<string> id, DatabaseState? 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:
- Database
Name string Service database name
- Lc
Collate string Default string sort order (LC_COLLATE) of the database. Default value: en_US.UTF-8
- Lc
Ctype string Default character classification (LC_CTYPE) of the database. Default value: en_US.UTF-8
- Project string
Project to link the database to
- Service
Name string Service to link the database to
- Termination
Protection bool It is a Terraform client-side deletion protections, which prevents the database from being deleted by Terraform. It is recommended to enable this for any production databases containing critical data.
- Database
Name string Service database name
- Lc
Collate string Default string sort order (LC_COLLATE) of the database. Default value: en_US.UTF-8
- Lc
Ctype string Default character classification (LC_CTYPE) of the database. Default value: en_US.UTF-8
- Project string
Project to link the database to
- Service
Name string Service to link the database to
- Termination
Protection bool It is a Terraform client-side deletion protections, which prevents the database from being deleted by Terraform. It is recommended to enable this for any production databases containing critical data.
- database
Name string Service database name
- lc
Collate string Default string sort order (LC_COLLATE) of the database. Default value: en_US.UTF-8
- lc
Ctype string Default character classification (LC_CTYPE) of the database. Default value: en_US.UTF-8
- project string
Project to link the database to
- service
Name string Service to link the database to
- termination
Protection boolean It is a Terraform client-side deletion protections, which prevents the database from being deleted by Terraform. It is recommended to enable this for any production databases containing critical data.
- database_
name str Service database name
- lc_
collate str Default string sort order (LC_COLLATE) of the database. Default value: en_US.UTF-8
- lc_
ctype str Default character classification (LC_CTYPE) of the database. Default value: en_US.UTF-8
- project str
Project to link the database to
- service_
name str Service to link the database to
- termination_
protection bool It is a Terraform client-side deletion protections, which prevents the database from being deleted by Terraform. It is recommended to enable this for any production databases containing critical data.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aivenTerraform Provider.