scaleway.datawarehouse.User
Creates and manages Scaleway Data Warehouse users 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 mainUser = new scaleway.datawarehouse.User("main", {
deploymentId: main.id,
name: "my_user",
password: "user_password_123",
});
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_user = scaleway.datawarehouse.User("main",
deployment_id=main.id,
name="my_user",
password="user_password_123")
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.NewUser(ctx, "main", &datawarehouse.UserArgs{
DeploymentId: main.ID(),
Name: pulumi.String("my_user"),
Password: pulumi.String("user_password_123"),
})
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 mainUser = new Scaleway.Datawarehouse.User("main", new()
{
DeploymentId = main.Id,
Name = "my_user",
Password = "user_password_123",
});
});
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.User;
import com.pulumi.scaleway.datawarehouse.UserArgs;
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 mainUser = new User("mainUser", UserArgs.builder()
.deploymentId(main.id())
.name("my_user")
.password("user_password_123")
.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
mainUser:
type: scaleway:datawarehouse:User
name: main
properties:
deploymentId: ${main.id}
name: my_user
password: user_password_123
Admin User
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 admin = new scaleway.datawarehouse.User("admin", {
deploymentId: main.id,
name: "admin_user",
password: "admin_password_456",
isAdmin: true,
});
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")
admin = scaleway.datawarehouse.User("admin",
deployment_id=main.id,
name="admin_user",
password="admin_password_456",
is_admin=True)
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.NewUser(ctx, "admin", &datawarehouse.UserArgs{
DeploymentId: main.ID(),
Name: pulumi.String("admin_user"),
Password: pulumi.String("admin_password_456"),
IsAdmin: pulumi.Bool(true),
})
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 admin = new Scaleway.Datawarehouse.User("admin", new()
{
DeploymentId = main.Id,
Name = "admin_user",
Password = "admin_password_456",
IsAdmin = true,
});
});
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.User;
import com.pulumi.scaleway.datawarehouse.UserArgs;
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 admin = new User("admin", UserArgs.builder()
.deploymentId(main.id())
.name("admin_user")
.password("admin_password_456")
.isAdmin(true)
.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
admin:
type: scaleway:datawarehouse:User
properties:
deploymentId: ${main.id}
name: admin_user
password: admin_password_456
isAdmin: true
Create User Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new User(name: string, args: UserArgs, opts?: CustomResourceOptions);@overload
def User(resource_name: str,
args: UserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def User(resource_name: str,
opts: Optional[ResourceOptions] = None,
deployment_id: Optional[str] = None,
password: Optional[str] = None,
is_admin: Optional[bool] = None,
name: Optional[str] = None,
region: Optional[str] = None)func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)public User(string name, UserArgs args, CustomResourceOptions? opts = null)type: scaleway:datawarehouse:User
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 UserArgs
- 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 UserArgs
- 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 UserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserArgs
- 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 scalewayUserResource = new Scaleway.Datawarehouse.User("scalewayUserResource", new()
{
DeploymentId = "string",
Password = "string",
IsAdmin = false,
Name = "string",
Region = "string",
});
example, err := datawarehouse.NewUser(ctx, "scalewayUserResource", &datawarehouse.UserArgs{
DeploymentId: pulumi.String("string"),
Password: pulumi.String("string"),
IsAdmin: pulumi.Bool(false),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
})
var scalewayUserResource = new com.pulumi.scaleway.datawarehouse.User("scalewayUserResource", com.pulumi.scaleway.datawarehouse.UserArgs.builder()
.deploymentId("string")
.password("string")
.isAdmin(false)
.name("string")
.region("string")
.build());
scaleway_user_resource = scaleway.datawarehouse.User("scalewayUserResource",
deployment_id="string",
password="string",
is_admin=False,
name="string",
region="string")
const scalewayUserResource = new scaleway.datawarehouse.User("scalewayUserResource", {
deploymentId: "string",
password: "string",
isAdmin: false,
name: "string",
region: "string",
});
type: scaleway:datawarehouse:User
properties:
deploymentId: string
isAdmin: false
name: string
password: string
region: string
User 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 User resource accepts the following input properties:
- Deployment
Id string - ID of the Data Warehouse deployment to which this user belongs.
- Password string
- Password for the ClickHouse user.
- Is
Admin bool - Whether the user has administrator privileges. Defaults to
false. - Name string
- Name of the ClickHouse user.
- Region string
region) The region in which the user should be created.
- Deployment
Id string - ID of the Data Warehouse deployment to which this user belongs.
- Password string
- Password for the ClickHouse user.
- Is
Admin bool - Whether the user has administrator privileges. Defaults to
false. - Name string
- Name of the ClickHouse user.
- Region string
region) The region in which the user should be created.
- deployment
Id String - ID of the Data Warehouse deployment to which this user belongs.
- password String
- Password for the ClickHouse user.
- is
Admin Boolean - Whether the user has administrator privileges. Defaults to
false. - name String
- Name of the ClickHouse user.
- region String
region) The region in which the user should be created.
- deployment
Id string - ID of the Data Warehouse deployment to which this user belongs.
- password string
- Password for the ClickHouse user.
- is
Admin boolean - Whether the user has administrator privileges. Defaults to
false. - name string
- Name of the ClickHouse user.
- region string
region) The region in which the user should be created.
- deployment_
id str - ID of the Data Warehouse deployment to which this user belongs.
- password str
- Password for the ClickHouse user.
- is_
admin bool - Whether the user has administrator privileges. Defaults to
false. - name str
- Name of the ClickHouse user.
- region str
region) The region in which the user should be created.
- deployment
Id String - ID of the Data Warehouse deployment to which this user belongs.
- password String
- Password for the ClickHouse user.
- is
Admin Boolean - Whether the user has administrator privileges. Defaults to
false. - name String
- Name of the ClickHouse user.
- region String
region) The region in which the user should be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the User 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 string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing User Resource
Get an existing User 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?: UserState, opts?: CustomResourceOptions): User@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
deployment_id: Optional[str] = None,
is_admin: Optional[bool] = None,
name: Optional[str] = None,
password: Optional[str] = None,
region: Optional[str] = None) -> Userfunc GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)public static User get(String name, Output<String> id, UserState state, CustomResourceOptions options)resources: _: type: scaleway:datawarehouse:User 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 user belongs.
- Is
Admin bool - Whether the user has administrator privileges. Defaults to
false. - Name string
- Name of the ClickHouse user.
- Password string
- Password for the ClickHouse user.
- Region string
region) The region in which the user should be created.
- Deployment
Id string - ID of the Data Warehouse deployment to which this user belongs.
- Is
Admin bool - Whether the user has administrator privileges. Defaults to
false. - Name string
- Name of the ClickHouse user.
- Password string
- Password for the ClickHouse user.
- Region string
region) The region in which the user should be created.
- deployment
Id String - ID of the Data Warehouse deployment to which this user belongs.
- is
Admin Boolean - Whether the user has administrator privileges. Defaults to
false. - name String
- Name of the ClickHouse user.
- password String
- Password for the ClickHouse user.
- region String
region) The region in which the user should be created.
- deployment
Id string - ID of the Data Warehouse deployment to which this user belongs.
- is
Admin boolean - Whether the user has administrator privileges. Defaults to
false. - name string
- Name of the ClickHouse user.
- password string
- Password for the ClickHouse user.
- region string
region) The region in which the user should be created.
- deployment_
id str - ID of the Data Warehouse deployment to which this user belongs.
- is_
admin bool - Whether the user has administrator privileges. Defaults to
false. - name str
- Name of the ClickHouse user.
- password str
- Password for the ClickHouse user.
- region str
region) The region in which the user should be created.
- deployment
Id String - ID of the Data Warehouse deployment to which this user belongs.
- is
Admin Boolean - Whether the user has administrator privileges. Defaults to
false. - name String
- Name of the ClickHouse user.
- password String
- Password for the ClickHouse user.
- region String
region) The region in which the user should be created.
Import
Data Warehouse users can be imported using the {region}/{deployment_id}/{name}, e.g.
bash
$ pulumi import scaleway:datawarehouse/user:User main fr-par/11111111-1111-1111-1111-111111111111/my_user
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.
