ClickhouseRole

The Clickhouse Role resource allows the creation and management of Roles in Aiven Clickhouse services

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aiven = Pulumi.Aiven;

return await Deployment.RunAsync(() => 
{
    var bar = new Aiven.Clickhouse("bar", new()
    {
        Project = "example-project",
        CloudName = "google-europe-west1",
        Plan = "startup-beta-8",
        ServiceName = "example-service",
        MaintenanceWindowDow = "monday",
        MaintenanceWindowTime = "10:00:00",
    });

    var foo = new Aiven.ClickhouseRole("foo", new()
    {
        ServiceName = bar.ServiceName,
        Project = bar.Project,
        Role = "writer",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aiven/sdk/v5/go/aiven"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		bar, err := aiven.NewClickhouse(ctx, "bar", &aiven.ClickhouseArgs{
			Project:               pulumi.String("example-project"),
			CloudName:             pulumi.String("google-europe-west1"),
			Plan:                  pulumi.String("startup-beta-8"),
			ServiceName:           pulumi.String("example-service"),
			MaintenanceWindowDow:  pulumi.String("monday"),
			MaintenanceWindowTime: pulumi.String("10:00:00"),
		})
		if err != nil {
			return err
		}
		_, err = aiven.NewClickhouseRole(ctx, "foo", &aiven.ClickhouseRoleArgs{
			ServiceName: bar.ServiceName,
			Project:     bar.Project,
			Role:        pulumi.String("writer"),
		})
		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.aiven.Clickhouse;
import com.pulumi.aiven.ClickhouseArgs;
import com.pulumi.aiven.ClickhouseRole;
import com.pulumi.aiven.ClickhouseRoleArgs;
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 bar = new Clickhouse("bar", ClickhouseArgs.builder()        
            .project("example-project")
            .cloudName("google-europe-west1")
            .plan("startup-beta-8")
            .serviceName("example-service")
            .maintenanceWindowDow("monday")
            .maintenanceWindowTime("10:00:00")
            .build());

        var foo = new ClickhouseRole("foo", ClickhouseRoleArgs.builder()        
            .serviceName(bar.serviceName())
            .project(bar.project())
            .role("writer")
            .build());

    }
}
import pulumi
import pulumi_aiven as aiven

bar = aiven.Clickhouse("bar",
    project="example-project",
    cloud_name="google-europe-west1",
    plan="startup-beta-8",
    service_name="example-service",
    maintenance_window_dow="monday",
    maintenance_window_time="10:00:00")
foo = aiven.ClickhouseRole("foo",
    service_name=bar.service_name,
    project=bar.project,
    role="writer")
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";

const bar = new aiven.Clickhouse("bar", {
    project: "example-project",
    cloudName: "google-europe-west1",
    plan: "startup-beta-8",
    serviceName: "example-service",
    maintenanceWindowDow: "monday",
    maintenanceWindowTime: "10:00:00",
});
const foo = new aiven.ClickhouseRole("foo", {
    serviceName: bar.serviceName,
    project: bar.project,
    role: "writer",
});
resources:
  bar:
    type: aiven:Clickhouse
    properties:
      project: example-project
      cloudName: google-europe-west1
      plan: startup-beta-8
      serviceName: example-service
      maintenanceWindowDow: monday
      maintenanceWindowTime: 10:00:00
  foo:
    type: aiven:ClickhouseRole
    properties:
      serviceName: ${bar.serviceName}
      project: ${bar.project}
      role: writer

Create ClickhouseRole Resource

new ClickhouseRole(name: string, args: ClickhouseRoleArgs, opts?: CustomResourceOptions);
@overload
def ClickhouseRole(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   project: Optional[str] = None,
                   role: Optional[str] = None,
                   service_name: Optional[str] = None)
@overload
def ClickhouseRole(resource_name: str,
                   args: ClickhouseRoleArgs,
                   opts: Optional[ResourceOptions] = None)
func NewClickhouseRole(ctx *Context, name string, args ClickhouseRoleArgs, opts ...ResourceOption) (*ClickhouseRole, error)
public ClickhouseRole(string name, ClickhouseRoleArgs args, CustomResourceOptions? opts = null)
public ClickhouseRole(String name, ClickhouseRoleArgs args)
public ClickhouseRole(String name, ClickhouseRoleArgs args, CustomResourceOptions options)
type: aiven:ClickhouseRole
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ClickhouseRoleArgs
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 ClickhouseRoleArgs
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 ClickhouseRoleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ClickhouseRoleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ClickhouseRoleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ClickhouseRole 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 ClickhouseRole resource accepts the following input properties:

Project string

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

Role string

The role that is to be created. This property cannot be changed, doing so forces recreation of the resource.

ServiceName string

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

Project string

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

Role string

The role that is to be created. This property cannot be changed, doing so forces recreation of the resource.

ServiceName string

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

project String

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

role String

The role that is to be created. This property cannot be changed, doing so forces recreation of the resource.

serviceName String

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

project string

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

role string

The role that is to be created. This property cannot be changed, doing so forces recreation of the resource.

serviceName string

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

project str

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

role str

The role that is to be created. This property cannot be changed, doing so forces recreation of the resource.

service_name str

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

project String

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

role String

The role that is to be created. This property cannot be changed, doing so forces recreation of the resource.

serviceName String

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the ClickhouseRole 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 ClickhouseRole Resource

Get an existing ClickhouseRole 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?: ClickhouseRoleState, opts?: CustomResourceOptions): ClickhouseRole
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        project: Optional[str] = None,
        role: Optional[str] = None,
        service_name: Optional[str] = None) -> ClickhouseRole
func GetClickhouseRole(ctx *Context, name string, id IDInput, state *ClickhouseRoleState, opts ...ResourceOption) (*ClickhouseRole, error)
public static ClickhouseRole Get(string name, Input<string> id, ClickhouseRoleState? state, CustomResourceOptions? opts = null)
public static ClickhouseRole get(String name, Output<String> id, ClickhouseRoleState 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.
The following state arguments are supported:
Project string

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

Role string

The role that is to be created. This property cannot be changed, doing so forces recreation of the resource.

ServiceName string

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

Project string

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

Role string

The role that is to be created. This property cannot be changed, doing so forces recreation of the resource.

ServiceName string

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

project String

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

role String

The role that is to be created. This property cannot be changed, doing so forces recreation of the resource.

serviceName String

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

project string

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

role string

The role that is to be created. This property cannot be changed, doing so forces recreation of the resource.

serviceName string

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

project str

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

role str

The role that is to be created. This property cannot be changed, doing so forces recreation of the resource.

service_name str

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

project String

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

role String

The role that is to be created. This property cannot be changed, doing so forces recreation of the resource.

serviceName String

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

Import

 $ pulumi import aiven:index/clickhouseRole:ClickhouseRole foo project/service_name/role

Package Details

Repository
https://github.com/pulumi/pulumi-aiven
License
Apache-2.0
Notes

This Pulumi package is based on the aiven Terraform Provider.