1. Packages
  2. Aiven Provider
  3. API Docs
  4. ClickhouseGrant
Aiven v6.36.0 published on Thursday, Mar 13, 2025 by Pulumi

aiven.ClickhouseGrant

Explore with Pulumi AI

Creates and manages ClickHouse grants to give users and roles privileges to a ClickHouse service.

Note:

  • Users cannot have the same name as roles.
  • To grant a privilege on all tables of a database, omit the table and only keep the database. Don’t use table="*".
  • Changes first revoke all grants and then reissue the remaining grants for convergence.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";

const exampleRole = new aiven.ClickhouseRole("example_role", {
    project: exampleProject.project,
    serviceName: exampleClickhouse.serviceName,
    role: "example-role",
});
// Grant privileges to the example role.
const rolePrivileges = new aiven.ClickhouseGrant("role_privileges", {
    project: exampleProject.project,
    serviceName: exampleClickhouse.serviceName,
    role: exampleRole.role,
    privilegeGrants: [
        {
            privilege: "INSERT",
            database: exampleDb.name,
            table: "example-table",
        },
        {
            privilege: "SELECT",
            database: exampleDb.name,
        },
    ],
});
// Grant the role to the user.
const exampleUser = new aiven.ClickhouseUser("example_user", {
    project: exampleProject.project,
    serviceName: exampleClickhouse.serviceName,
    username: "example-user",
});
const userRoleAssignment = new aiven.ClickhouseGrant("user_role_assignment", {
    project: exampleProject.project,
    serviceName: exampleClickhouse.serviceName,
    user: exampleUser.username,
    roleGrants: [{
        role: exampleRole.role,
    }],
});
Copy
import pulumi
import pulumi_aiven as aiven

example_role = aiven.ClickhouseRole("example_role",
    project=example_project["project"],
    service_name=example_clickhouse["serviceName"],
    role="example-role")
# Grant privileges to the example role.
role_privileges = aiven.ClickhouseGrant("role_privileges",
    project=example_project["project"],
    service_name=example_clickhouse["serviceName"],
    role=example_role.role,
    privilege_grants=[
        {
            "privilege": "INSERT",
            "database": example_db["name"],
            "table": "example-table",
        },
        {
            "privilege": "SELECT",
            "database": example_db["name"],
        },
    ])
# Grant the role to the user.
example_user = aiven.ClickhouseUser("example_user",
    project=example_project["project"],
    service_name=example_clickhouse["serviceName"],
    username="example-user")
user_role_assignment = aiven.ClickhouseGrant("user_role_assignment",
    project=example_project["project"],
    service_name=example_clickhouse["serviceName"],
    user=example_user.username,
    role_grants=[{
        "role": example_role.role,
    }])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleRole, err := aiven.NewClickhouseRole(ctx, "example_role", &aiven.ClickhouseRoleArgs{
			Project:     pulumi.Any(exampleProject.Project),
			ServiceName: pulumi.Any(exampleClickhouse.ServiceName),
			Role:        pulumi.String("example-role"),
		})
		if err != nil {
			return err
		}
		// Grant privileges to the example role.
		_, err = aiven.NewClickhouseGrant(ctx, "role_privileges", &aiven.ClickhouseGrantArgs{
			Project:     pulumi.Any(exampleProject.Project),
			ServiceName: pulumi.Any(exampleClickhouse.ServiceName),
			Role:        exampleRole.Role,
			PrivilegeGrants: aiven.ClickhouseGrantPrivilegeGrantArray{
				&aiven.ClickhouseGrantPrivilegeGrantArgs{
					Privilege: pulumi.String("INSERT"),
					Database:  pulumi.Any(exampleDb.Name),
					Table:     pulumi.String("example-table"),
				},
				&aiven.ClickhouseGrantPrivilegeGrantArgs{
					Privilege: pulumi.String("SELECT"),
					Database:  pulumi.Any(exampleDb.Name),
				},
			},
		})
		if err != nil {
			return err
		}
		// Grant the role to the user.
		exampleUser, err := aiven.NewClickhouseUser(ctx, "example_user", &aiven.ClickhouseUserArgs{
			Project:     pulumi.Any(exampleProject.Project),
			ServiceName: pulumi.Any(exampleClickhouse.ServiceName),
			Username:    pulumi.String("example-user"),
		})
		if err != nil {
			return err
		}
		_, err = aiven.NewClickhouseGrant(ctx, "user_role_assignment", &aiven.ClickhouseGrantArgs{
			Project:     pulumi.Any(exampleProject.Project),
			ServiceName: pulumi.Any(exampleClickhouse.ServiceName),
			User:        exampleUser.Username,
			RoleGrants: aiven.ClickhouseGrantRoleGrantArray{
				&aiven.ClickhouseGrantRoleGrantArgs{
					Role: exampleRole.Role,
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aiven = Pulumi.Aiven;

return await Deployment.RunAsync(() => 
{
    var exampleRole = new Aiven.ClickhouseRole("example_role", new()
    {
        Project = exampleProject.Project,
        ServiceName = exampleClickhouse.ServiceName,
        Role = "example-role",
    });

    // Grant privileges to the example role.
    var rolePrivileges = new Aiven.ClickhouseGrant("role_privileges", new()
    {
        Project = exampleProject.Project,
        ServiceName = exampleClickhouse.ServiceName,
        Role = exampleRole.Role,
        PrivilegeGrants = new[]
        {
            new Aiven.Inputs.ClickhouseGrantPrivilegeGrantArgs
            {
                Privilege = "INSERT",
                Database = exampleDb.Name,
                Table = "example-table",
            },
            new Aiven.Inputs.ClickhouseGrantPrivilegeGrantArgs
            {
                Privilege = "SELECT",
                Database = exampleDb.Name,
            },
        },
    });

    // Grant the role to the user.
    var exampleUser = new Aiven.ClickhouseUser("example_user", new()
    {
        Project = exampleProject.Project,
        ServiceName = exampleClickhouse.ServiceName,
        Username = "example-user",
    });

    var userRoleAssignment = new Aiven.ClickhouseGrant("user_role_assignment", new()
    {
        Project = exampleProject.Project,
        ServiceName = exampleClickhouse.ServiceName,
        User = exampleUser.Username,
        RoleGrants = new[]
        {
            new Aiven.Inputs.ClickhouseGrantRoleGrantArgs
            {
                Role = exampleRole.Role,
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aiven.ClickhouseRole;
import com.pulumi.aiven.ClickhouseRoleArgs;
import com.pulumi.aiven.ClickhouseGrant;
import com.pulumi.aiven.ClickhouseGrantArgs;
import com.pulumi.aiven.inputs.ClickhouseGrantPrivilegeGrantArgs;
import com.pulumi.aiven.ClickhouseUser;
import com.pulumi.aiven.ClickhouseUserArgs;
import com.pulumi.aiven.inputs.ClickhouseGrantRoleGrantArgs;
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 exampleRole = new ClickhouseRole("exampleRole", ClickhouseRoleArgs.builder()
            .project(exampleProject.project())
            .serviceName(exampleClickhouse.serviceName())
            .role("example-role")
            .build());

        // Grant privileges to the example role.
        var rolePrivileges = new ClickhouseGrant("rolePrivileges", ClickhouseGrantArgs.builder()
            .project(exampleProject.project())
            .serviceName(exampleClickhouse.serviceName())
            .role(exampleRole.role())
            .privilegeGrants(            
                ClickhouseGrantPrivilegeGrantArgs.builder()
                    .privilege("INSERT")
                    .database(exampleDb.name())
                    .table("example-table")
                    .build(),
                ClickhouseGrantPrivilegeGrantArgs.builder()
                    .privilege("SELECT")
                    .database(exampleDb.name())
                    .build())
            .build());

        // Grant the role to the user.
        var exampleUser = new ClickhouseUser("exampleUser", ClickhouseUserArgs.builder()
            .project(exampleProject.project())
            .serviceName(exampleClickhouse.serviceName())
            .username("example-user")
            .build());

        var userRoleAssignment = new ClickhouseGrant("userRoleAssignment", ClickhouseGrantArgs.builder()
            .project(exampleProject.project())
            .serviceName(exampleClickhouse.serviceName())
            .user(exampleUser.username())
            .roleGrants(ClickhouseGrantRoleGrantArgs.builder()
                .role(exampleRole.role())
                .build())
            .build());

    }
}
Copy
resources:
  exampleRole:
    type: aiven:ClickhouseRole
    name: example_role
    properties:
      project: ${exampleProject.project}
      serviceName: ${exampleClickhouse.serviceName}
      role: example-role
  # Grant privileges to the example role.
  rolePrivileges:
    type: aiven:ClickhouseGrant
    name: role_privileges
    properties:
      project: ${exampleProject.project}
      serviceName: ${exampleClickhouse.serviceName}
      role: ${exampleRole.role}
      privilegeGrants:
        - privilege: INSERT
          database: ${exampleDb.name}
          table: example-table
        - privilege: SELECT
          database: ${exampleDb.name}
  # Grant the role to the user.
  exampleUser:
    type: aiven:ClickhouseUser
    name: example_user
    properties:
      project: ${exampleProject.project}
      serviceName: ${exampleClickhouse.serviceName}
      username: example-user
  userRoleAssignment:
    type: aiven:ClickhouseGrant
    name: user_role_assignment
    properties:
      project: ${exampleProject.project}
      serviceName: ${exampleClickhouse.serviceName}
      user: ${exampleUser.username}
      roleGrants:
        - role: ${exampleRole.role}
Copy

Create ClickhouseGrant Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ClickhouseGrant(name: string, args: ClickhouseGrantArgs, opts?: CustomResourceOptions);
@overload
def ClickhouseGrant(resource_name: str,
                    args: ClickhouseGrantArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def ClickhouseGrant(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    project: Optional[str] = None,
                    service_name: Optional[str] = None,
                    privilege_grants: Optional[Sequence[ClickhouseGrantPrivilegeGrantArgs]] = None,
                    role: Optional[str] = None,
                    role_grants: Optional[Sequence[ClickhouseGrantRoleGrantArgs]] = None,
                    user: Optional[str] = None)
func NewClickhouseGrant(ctx *Context, name string, args ClickhouseGrantArgs, opts ...ResourceOption) (*ClickhouseGrant, error)
public ClickhouseGrant(string name, ClickhouseGrantArgs args, CustomResourceOptions? opts = null)
public ClickhouseGrant(String name, ClickhouseGrantArgs args)
public ClickhouseGrant(String name, ClickhouseGrantArgs args, CustomResourceOptions options)
type: aiven:ClickhouseGrant
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ClickhouseGrantArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ClickhouseGrantArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ClickhouseGrantArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ClickhouseGrantArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ClickhouseGrantArgs
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 clickhouseGrantResource = new Aiven.ClickhouseGrant("clickhouseGrantResource", new()
{
    Project = "string",
    ServiceName = "string",
    PrivilegeGrants = new[]
    {
        new Aiven.Inputs.ClickhouseGrantPrivilegeGrantArgs
        {
            Database = "string",
            Column = "string",
            Privilege = "string",
            Table = "string",
            WithGrant = false,
        },
    },
    Role = "string",
    RoleGrants = new[]
    {
        new Aiven.Inputs.ClickhouseGrantRoleGrantArgs
        {
            Role = "string",
        },
    },
    User = "string",
});
Copy
example, err := aiven.NewClickhouseGrant(ctx, "clickhouseGrantResource", &aiven.ClickhouseGrantArgs{
	Project:     pulumi.String("string"),
	ServiceName: pulumi.String("string"),
	PrivilegeGrants: aiven.ClickhouseGrantPrivilegeGrantArray{
		&aiven.ClickhouseGrantPrivilegeGrantArgs{
			Database:  pulumi.String("string"),
			Column:    pulumi.String("string"),
			Privilege: pulumi.String("string"),
			Table:     pulumi.String("string"),
			WithGrant: pulumi.Bool(false),
		},
	},
	Role: pulumi.String("string"),
	RoleGrants: aiven.ClickhouseGrantRoleGrantArray{
		&aiven.ClickhouseGrantRoleGrantArgs{
			Role: pulumi.String("string"),
		},
	},
	User: pulumi.String("string"),
})
Copy
var clickhouseGrantResource = new ClickhouseGrant("clickhouseGrantResource", ClickhouseGrantArgs.builder()
    .project("string")
    .serviceName("string")
    .privilegeGrants(ClickhouseGrantPrivilegeGrantArgs.builder()
        .database("string")
        .column("string")
        .privilege("string")
        .table("string")
        .withGrant(false)
        .build())
    .role("string")
    .roleGrants(ClickhouseGrantRoleGrantArgs.builder()
        .role("string")
        .build())
    .user("string")
    .build());
Copy
clickhouse_grant_resource = aiven.ClickhouseGrant("clickhouseGrantResource",
    project="string",
    service_name="string",
    privilege_grants=[{
        "database": "string",
        "column": "string",
        "privilege": "string",
        "table": "string",
        "with_grant": False,
    }],
    role="string",
    role_grants=[{
        "role": "string",
    }],
    user="string")
Copy
const clickhouseGrantResource = new aiven.ClickhouseGrant("clickhouseGrantResource", {
    project: "string",
    serviceName: "string",
    privilegeGrants: [{
        database: "string",
        column: "string",
        privilege: "string",
        table: "string",
        withGrant: false,
    }],
    role: "string",
    roleGrants: [{
        role: "string",
    }],
    user: "string",
});
Copy
type: aiven:ClickhouseGrant
properties:
    privilegeGrants:
        - column: string
          database: string
          privilege: string
          table: string
          withGrant: false
    project: string
    role: string
    roleGrants:
        - role: string
    serviceName: string
    user: string
Copy

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

Project
This property is required.
Changes to this property will trigger replacement.
string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
PrivilegeGrants Changes to this property will trigger replacement. List<ClickhouseGrantPrivilegeGrant>
Grant privileges. Changing this property forces recreation of the resource.
Role Changes to this property will trigger replacement. string
The role to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
RoleGrants Changes to this property will trigger replacement. List<ClickhouseGrantRoleGrant>
Grant roles. Changing this property forces recreation of the resource.
User Changes to this property will trigger replacement. string
The user to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Project
This property is required.
Changes to this property will trigger replacement.
string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
PrivilegeGrants Changes to this property will trigger replacement. []ClickhouseGrantPrivilegeGrantArgs
Grant privileges. Changing this property forces recreation of the resource.
Role Changes to this property will trigger replacement. string
The role to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
RoleGrants Changes to this property will trigger replacement. []ClickhouseGrantRoleGrantArgs
Grant roles. Changing this property forces recreation of the resource.
User Changes to this property will trigger replacement. string
The user to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
project
This property is required.
Changes to this property will trigger replacement.
String
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
privilegeGrants Changes to this property will trigger replacement. List<ClickhouseGrantPrivilegeGrant>
Grant privileges. Changing this property forces recreation of the resource.
role Changes to this property will trigger replacement. String
The role to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
roleGrants Changes to this property will trigger replacement. List<ClickhouseGrantRoleGrant>
Grant roles. Changing this property forces recreation of the resource.
user Changes to this property will trigger replacement. String
The user to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
project
This property is required.
Changes to this property will trigger replacement.
string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
serviceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
privilegeGrants Changes to this property will trigger replacement. ClickhouseGrantPrivilegeGrant[]
Grant privileges. Changing this property forces recreation of the resource.
role Changes to this property will trigger replacement. string
The role to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
roleGrants Changes to this property will trigger replacement. ClickhouseGrantRoleGrant[]
Grant roles. Changing this property forces recreation of the resource.
user Changes to this property will trigger replacement. string
The user to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
project
This property is required.
Changes to this property will trigger replacement.
str
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
service_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
privilege_grants Changes to this property will trigger replacement. Sequence[ClickhouseGrantPrivilegeGrantArgs]
Grant privileges. Changing this property forces recreation of the resource.
role Changes to this property will trigger replacement. str
The role to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
role_grants Changes to this property will trigger replacement. Sequence[ClickhouseGrantRoleGrantArgs]
Grant roles. Changing this property forces recreation of the resource.
user Changes to this property will trigger replacement. str
The user to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
project
This property is required.
Changes to this property will trigger replacement.
String
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
privilegeGrants Changes to this property will trigger replacement. List<Property Map>
Grant privileges. Changing this property forces recreation of the resource.
role Changes to this property will trigger replacement. String
The role to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
roleGrants Changes to this property will trigger replacement. List<Property Map>
Grant roles. Changing this property forces recreation of the resource.
user Changes to this property will trigger replacement. String
The user to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.

Outputs

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

Get an existing ClickhouseGrant 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?: ClickhouseGrantState, opts?: CustomResourceOptions): ClickhouseGrant
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        privilege_grants: Optional[Sequence[ClickhouseGrantPrivilegeGrantArgs]] = None,
        project: Optional[str] = None,
        role: Optional[str] = None,
        role_grants: Optional[Sequence[ClickhouseGrantRoleGrantArgs]] = None,
        service_name: Optional[str] = None,
        user: Optional[str] = None) -> ClickhouseGrant
func GetClickhouseGrant(ctx *Context, name string, id IDInput, state *ClickhouseGrantState, opts ...ResourceOption) (*ClickhouseGrant, error)
public static ClickhouseGrant Get(string name, Input<string> id, ClickhouseGrantState? state, CustomResourceOptions? opts = null)
public static ClickhouseGrant get(String name, Output<String> id, ClickhouseGrantState state, CustomResourceOptions options)
resources:  _:    type: aiven:ClickhouseGrant    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
PrivilegeGrants Changes to this property will trigger replacement. List<ClickhouseGrantPrivilegeGrant>
Grant privileges. Changing this property forces recreation of the resource.
Project Changes to this property will trigger replacement. string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Role Changes to this property will trigger replacement. string
The role to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
RoleGrants Changes to this property will trigger replacement. List<ClickhouseGrantRoleGrant>
Grant roles. Changing this property forces recreation of the resource.
ServiceName Changes to this property will trigger replacement. string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
User Changes to this property will trigger replacement. string
The user to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
PrivilegeGrants Changes to this property will trigger replacement. []ClickhouseGrantPrivilegeGrantArgs
Grant privileges. Changing this property forces recreation of the resource.
Project Changes to this property will trigger replacement. string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Role Changes to this property will trigger replacement. string
The role to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
RoleGrants Changes to this property will trigger replacement. []ClickhouseGrantRoleGrantArgs
Grant roles. Changing this property forces recreation of the resource.
ServiceName Changes to this property will trigger replacement. string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
User Changes to this property will trigger replacement. string
The user to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
privilegeGrants Changes to this property will trigger replacement. List<ClickhouseGrantPrivilegeGrant>
Grant privileges. Changing this property forces recreation of the resource.
project Changes to this property will trigger replacement. String
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
role Changes to this property will trigger replacement. String
The role to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
roleGrants Changes to this property will trigger replacement. List<ClickhouseGrantRoleGrant>
Grant roles. Changing this property forces recreation of the resource.
serviceName Changes to this property will trigger replacement. String
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
user Changes to this property will trigger replacement. String
The user to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
privilegeGrants Changes to this property will trigger replacement. ClickhouseGrantPrivilegeGrant[]
Grant privileges. Changing this property forces recreation of the resource.
project Changes to this property will trigger replacement. string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
role Changes to this property will trigger replacement. string
The role to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
roleGrants Changes to this property will trigger replacement. ClickhouseGrantRoleGrant[]
Grant roles. Changing this property forces recreation of the resource.
serviceName Changes to this property will trigger replacement. string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
user Changes to this property will trigger replacement. string
The user to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
privilege_grants Changes to this property will trigger replacement. Sequence[ClickhouseGrantPrivilegeGrantArgs]
Grant privileges. Changing this property forces recreation of the resource.
project Changes to this property will trigger replacement. str
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
role Changes to this property will trigger replacement. str
The role to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
role_grants Changes to this property will trigger replacement. Sequence[ClickhouseGrantRoleGrantArgs]
Grant roles. Changing this property forces recreation of the resource.
service_name Changes to this property will trigger replacement. str
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
user Changes to this property will trigger replacement. str
The user to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
privilegeGrants Changes to this property will trigger replacement. List<Property Map>
Grant privileges. Changing this property forces recreation of the resource.
project Changes to this property will trigger replacement. String
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
role Changes to this property will trigger replacement. String
The role to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
roleGrants Changes to this property will trigger replacement. List<Property Map>
Grant roles. Changing this property forces recreation of the resource.
serviceName Changes to this property will trigger replacement. String
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
user Changes to this property will trigger replacement. String
The user to grant privileges or roles to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.

Supporting Types

ClickhouseGrantPrivilegeGrant
, ClickhouseGrantPrivilegeGrantArgs

Database
This property is required.
Changes to this property will trigger replacement.
string
The database to grant access to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Column Changes to this property will trigger replacement. string
The column to grant access to. Changing this property forces recreation of the resource.
Privilege Changes to this property will trigger replacement. string
The privileges to grant. For example: INSERT, SELECT, CREATE TABLE. A complete list is available in the ClickHouse documentation. Changing this property forces recreation of the resource.
Table Changes to this property will trigger replacement. string
The table to grant access to. Changing this property forces recreation of the resource.
WithGrant Changes to this property will trigger replacement. bool
Allow grantees to grant their privileges to other grantees. Changing this property forces recreation of the resource.
Database
This property is required.
Changes to this property will trigger replacement.
string
The database to grant access to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Column Changes to this property will trigger replacement. string
The column to grant access to. Changing this property forces recreation of the resource.
Privilege Changes to this property will trigger replacement. string
The privileges to grant. For example: INSERT, SELECT, CREATE TABLE. A complete list is available in the ClickHouse documentation. Changing this property forces recreation of the resource.
Table Changes to this property will trigger replacement. string
The table to grant access to. Changing this property forces recreation of the resource.
WithGrant Changes to this property will trigger replacement. bool
Allow grantees to grant their privileges to other grantees. Changing this property forces recreation of the resource.
database
This property is required.
Changes to this property will trigger replacement.
String
The database to grant access to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
column Changes to this property will trigger replacement. String
The column to grant access to. Changing this property forces recreation of the resource.
privilege Changes to this property will trigger replacement. String
The privileges to grant. For example: INSERT, SELECT, CREATE TABLE. A complete list is available in the ClickHouse documentation. Changing this property forces recreation of the resource.
table Changes to this property will trigger replacement. String
The table to grant access to. Changing this property forces recreation of the resource.
withGrant Changes to this property will trigger replacement. Boolean
Allow grantees to grant their privileges to other grantees. Changing this property forces recreation of the resource.
database
This property is required.
Changes to this property will trigger replacement.
string
The database to grant access to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
column Changes to this property will trigger replacement. string
The column to grant access to. Changing this property forces recreation of the resource.
privilege Changes to this property will trigger replacement. string
The privileges to grant. For example: INSERT, SELECT, CREATE TABLE. A complete list is available in the ClickHouse documentation. Changing this property forces recreation of the resource.
table Changes to this property will trigger replacement. string
The table to grant access to. Changing this property forces recreation of the resource.
withGrant Changes to this property will trigger replacement. boolean
Allow grantees to grant their privileges to other grantees. Changing this property forces recreation of the resource.
database
This property is required.
Changes to this property will trigger replacement.
str
The database to grant access to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
column Changes to this property will trigger replacement. str
The column to grant access to. Changing this property forces recreation of the resource.
privilege Changes to this property will trigger replacement. str
The privileges to grant. For example: INSERT, SELECT, CREATE TABLE. A complete list is available in the ClickHouse documentation. Changing this property forces recreation of the resource.
table Changes to this property will trigger replacement. str
The table to grant access to. Changing this property forces recreation of the resource.
with_grant Changes to this property will trigger replacement. bool
Allow grantees to grant their privileges to other grantees. Changing this property forces recreation of the resource.
database
This property is required.
Changes to this property will trigger replacement.
String
The database to grant access to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
column Changes to this property will trigger replacement. String
The column to grant access to. Changing this property forces recreation of the resource.
privilege Changes to this property will trigger replacement. String
The privileges to grant. For example: INSERT, SELECT, CREATE TABLE. A complete list is available in the ClickHouse documentation. Changing this property forces recreation of the resource.
table Changes to this property will trigger replacement. String
The table to grant access to. Changing this property forces recreation of the resource.
withGrant Changes to this property will trigger replacement. Boolean
Allow grantees to grant their privileges to other grantees. Changing this property forces recreation of the resource.

ClickhouseGrantRoleGrant
, ClickhouseGrantRoleGrantArgs

Role Changes to this property will trigger replacement. string
The roles to grant. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Role Changes to this property will trigger replacement. string
The roles to grant. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
role Changes to this property will trigger replacement. String
The roles to grant. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
role Changes to this property will trigger replacement. string
The roles to grant. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
role Changes to this property will trigger replacement. str
The roles to grant. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
role Changes to this property will trigger replacement. String
The roles to grant. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.

Import

$ pulumi import aiven:index/clickhouseGrant:ClickhouseGrant example_grant PROJECT/SERVICE_NAME/ID
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Aiven pulumi/pulumi-aiven
License
Apache-2.0
Notes
This Pulumi package is based on the aiven Terraform Provider.