scaleway.datawarehouse.Database
Creates and manages Scaleway Data Warehouse databases within a deployment. For more information refer to the product documentation.
Example Usage
Basic
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
const main = new scaleway.datawarehouse.Deployment("main", {
name: "my-datawarehouse",
version: "v25",
replicaCount: 1,
cpuMin: 2,
cpuMax: 4,
ramPerCpu: 4,
password: "thiZ_is_v&ry_s3cret",
});
const mainDatabase = new scaleway.datawarehouse.Database("main", {
deploymentId: main.id,
name: "my_database",
});
import pulumi
import pulumiverse_scaleway as scaleway
main = scaleway.datawarehouse.Deployment("main",
name="my-datawarehouse",
version="v25",
replica_count=1,
cpu_min=2,
cpu_max=4,
ram_per_cpu=4,
password="thiZ_is_v&ry_s3cret")
main_database = scaleway.datawarehouse.Database("main",
deployment_id=main.id,
name="my_database")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/datawarehouse"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
main, err := datawarehouse.NewDeployment(ctx, "main", &datawarehouse.DeploymentArgs{
Name: pulumi.String("my-datawarehouse"),
Version: pulumi.String("v25"),
ReplicaCount: pulumi.Int(1),
CpuMin: pulumi.Int(2),
CpuMax: pulumi.Int(4),
RamPerCpu: pulumi.Int(4),
Password: pulumi.String("thiZ_is_v&ry_s3cret"),
})
if err != nil {
return err
}
_, err = datawarehouse.NewDatabase(ctx, "main", &datawarehouse.DatabaseArgs{
DeploymentId: main.ID(),
Name: pulumi.String("my_database"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
var main = new Scaleway.Datawarehouse.Deployment("main", new()
{
Name = "my-datawarehouse",
Version = "v25",
ReplicaCount = 1,
CpuMin = 2,
CpuMax = 4,
RamPerCpu = 4,
Password = "thiZ_is_v&ry_s3cret",
});
var mainDatabase = new Scaleway.Datawarehouse.Database("main", new()
{
DeploymentId = main.Id,
Name = "my_database",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.datawarehouse.Deployment;
import com.pulumi.scaleway.datawarehouse.DeploymentArgs;
import com.pulumi.scaleway.datawarehouse.Database;
import com.pulumi.scaleway.datawarehouse.DatabaseArgs;
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 main = new Deployment("main", DeploymentArgs.builder()
.name("my-datawarehouse")
.version("v25")
.replicaCount(1)
.cpuMin(2)
.cpuMax(4)
.ramPerCpu(4)
.password("thiZ_is_v&ry_s3cret")
.build());
var mainDatabase = new Database("mainDatabase", DatabaseArgs.builder()
.deploymentId(main.id())
.name("my_database")
.build());
}
}
resources:
main:
type: scaleway:datawarehouse:Deployment
properties:
name: my-datawarehouse
version: v25
replicaCount: 1
cpuMin: 2
cpuMax: 4
ramPerCpu: 4
password: thiZ_is_v&ry_s3cret
mainDatabase:
type: scaleway:datawarehouse:Database
name: main
properties:
deploymentId: ${main.id}
name: my_database
Create Database Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);@overload
def Database(resource_name: str,
args: DatabaseArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Database(resource_name: str,
opts: Optional[ResourceOptions] = None,
deployment_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None)func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)
public Database(String name, DatabaseArgs args)
public Database(String name, DatabaseArgs args, CustomResourceOptions options)
type: scaleway:datawarehouse:Database
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 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.
- args DatabaseArgs
- 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 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.
- name String
- The unique name of the resource.
- args DatabaseArgs
- 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 scalewayDatabaseResource = new Scaleway.Datawarehouse.Database("scalewayDatabaseResource", new()
{
DeploymentId = "string",
Name = "string",
Region = "string",
});
example, err := datawarehouse.NewDatabase(ctx, "scalewayDatabaseResource", &datawarehouse.DatabaseArgs{
DeploymentId: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
})
var scalewayDatabaseResource = new com.pulumi.scaleway.datawarehouse.Database("scalewayDatabaseResource", com.pulumi.scaleway.datawarehouse.DatabaseArgs.builder()
.deploymentId("string")
.name("string")
.region("string")
.build());
scaleway_database_resource = scaleway.datawarehouse.Database("scalewayDatabaseResource",
deployment_id="string",
name="string",
region="string")
const scalewayDatabaseResource = new scaleway.datawarehouse.Database("scalewayDatabaseResource", {
deploymentId: "string",
name: "string",
region: "string",
});
type: scaleway:datawarehouse:Database
properties:
deploymentId: string
name: string
region: string
Database 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 Database resource accepts the following input properties:
- Deployment
Id string - ID of the Data Warehouse deployment to which this database belongs.
- Name string
- Name of the database.
- Region string
region) The region in which the database should be created.
- Deployment
Id string - ID of the Data Warehouse deployment to which this database belongs.
- Name string
- Name of the database.
- Region string
region) The region in which the database should be created.
- deployment
Id String - ID of the Data Warehouse deployment to which this database belongs.
- name String
- Name of the database.
- region String
region) The region in which the database should be created.
- deployment
Id string - ID of the Data Warehouse deployment to which this database belongs.
- name string
- Name of the database.
- region string
region) The region in which the database should be created.
- deployment_
id str - ID of the Data Warehouse deployment to which this database belongs.
- name str
- Name of the database.
- region str
region) The region in which the database should be created.
- deployment
Id String - ID of the Data Warehouse deployment to which this database belongs.
- name String
- Name of the database.
- region String
region) The region in which the database should be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:
Look up 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): Database@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
deployment_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
size: Optional[int] = None) -> Databasefunc 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)public static Database get(String name, Output<String> id, DatabaseState state, CustomResourceOptions options)resources: _: type: scaleway:datawarehouse:Database 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.
- Deployment
Id string - ID of the Data Warehouse deployment to which this database belongs.
- Name string
- Name of the database.
- Region string
region) The region in which the database should be created.- Size int
- Size of the database in GB.
- Deployment
Id string - ID of the Data Warehouse deployment to which this database belongs.
- Name string
- Name of the database.
- Region string
region) The region in which the database should be created.- Size int
- Size of the database in GB.
- deployment
Id String - ID of the Data Warehouse deployment to which this database belongs.
- name String
- Name of the database.
- region String
region) The region in which the database should be created.- size Integer
- Size of the database in GB.
- deployment
Id string - ID of the Data Warehouse deployment to which this database belongs.
- name string
- Name of the database.
- region string
region) The region in which the database should be created.- size number
- Size of the database in GB.
- deployment_
id str - ID of the Data Warehouse deployment to which this database belongs.
- name str
- Name of the database.
- region str
region) The region in which the database should be created.- size int
- Size of the database in GB.
- deployment
Id String - ID of the Data Warehouse deployment to which this database belongs.
- name String
- Name of the database.
- region String
region) The region in which the database should be created.- size Number
- Size of the database in GB.
Import
Data Warehouse databases can be imported using the {region}/{deployment_id}/{name}, e.g.
bash
$ pulumi import scaleway:datawarehouse/database:Database main fr-par/11111111-1111-1111-1111-111111111111/my_database
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scalewayTerraform Provider.
