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,
}],
});
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,
}])
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
})
}
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,
},
},
});
});
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());
}
}
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}
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 string
- The unique name of the resource.
- args ClickhouseGrantArgs
- 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 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 string
- The unique name of the resource.
- args ClickhouseGrantArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClickhouseGrantArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
clickhouse_grant_resource = aiven.ClickhouseGrant("clickhouseGrantResource",
project="string",
service_name="string",
privilege_grants=[aiven.ClickhouseGrantPrivilegeGrantArgs(
database="string",
column="string",
privilege="string",
table="string",
with_grant=False,
)],
role="string",
role_grants=[aiven.ClickhouseGrantRoleGrantArgs(
role="string",
)],
user="string")
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",
});
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
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
The ClickhouseGrant resource accepts the following input properties:
- Project 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.
- Service
Name 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.
- Privilege
Grants List<ClickhouseGrant Privilege Grant> - Grant privileges. Changing this property forces recreation of the resource.
- Role 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.
- Role
Grants List<ClickhouseGrant Role Grant> - Grant roles. Changing this property forces recreation of the resource.
- User 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 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.
- Service
Name 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.
- Privilege
Grants []ClickhouseGrant Privilege Grant Args - Grant privileges. Changing this property forces recreation of the resource.
- Role 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.
- Role
Grants []ClickhouseGrant Role Grant Args - Grant roles. Changing this property forces recreation of the resource.
- User 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 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.
- service
Name 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.
- privilege
Grants List<ClickhouseGrant Privilege Grant> - Grant privileges. Changing this property forces recreation of the resource.
- role 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.
- role
Grants List<ClickhouseGrant Role Grant> - Grant roles. Changing this property forces recreation of the resource.
- user 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 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.
- service
Name 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.
- privilege
Grants ClickhouseGrant Privilege Grant[] - Grant privileges. Changing this property forces recreation of the resource.
- role 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.
- role
Grants ClickhouseGrant Role Grant[] - Grant roles. Changing this property forces recreation of the resource.
- user 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 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 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 Sequence[ClickhouseGrant Privilege Grant Args] - Grant privileges. Changing this property forces recreation of the resource.
- role 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 Sequence[ClickhouseGrant Role Grant Args] - Grant roles. Changing this property forces recreation of the resource.
- user 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 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.
- service
Name 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.
- privilege
Grants List<Property Map> - Grant privileges. Changing this property forces recreation of the resource.
- role 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.
- role
Grants List<Property Map> - Grant roles. Changing this property forces recreation of the resource.
- user 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)
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.
- Privilege
Grants List<ClickhouseGrant Privilege Grant> - Grant privileges. Changing this property forces recreation of the resource.
- Project 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 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.
- Role
Grants List<ClickhouseGrant Role Grant> - Grant roles. Changing this property forces recreation of the resource.
- Service
Name 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 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 []ClickhouseGrant Privilege Grant Args - Grant privileges. Changing this property forces recreation of the resource.
- Project 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 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.
- Role
Grants []ClickhouseGrant Role Grant Args - Grant roles. Changing this property forces recreation of the resource.
- Service
Name 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 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 List<ClickhouseGrant Privilege Grant> - Grant privileges. Changing this property forces recreation of the resource.
- project 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 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.
- role
Grants List<ClickhouseGrant Role Grant> - Grant roles. Changing this property forces recreation of the resource.
- service
Name 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 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 ClickhouseGrant Privilege Grant[] - Grant privileges. Changing this property forces recreation of the resource.
- project 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 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.
- role
Grants ClickhouseGrant Role Grant[] - Grant roles. Changing this property forces recreation of the resource.
- service
Name 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 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 Sequence[ClickhouseGrant Privilege Grant Args] - Grant privileges. Changing this property forces recreation of the resource.
- project 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 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 Sequence[ClickhouseGrant Role Grant Args] - Grant roles. Changing this property forces recreation of the resource.
- service_
name 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 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.
- privilege
Grants List<Property Map> - Grant privileges. Changing this property forces recreation of the resource.
- project 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 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.
- role
Grants List<Property Map> - Grant roles. Changing this property forces recreation of the resource.
- service
Name 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 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 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 string
- The column to grant access to. Changing this property forces recreation of the resource.
- Privilege 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 string
- The table to grant access to. Changing this property forces recreation of the resource.
- With
Grant bool - Allow grantees to grant their privileges to other grantees. Changing this property forces recreation of the resource.
- Database 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 string
- The column to grant access to. Changing this property forces recreation of the resource.
- Privilege 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 string
- The table to grant access to. Changing this property forces recreation of the resource.
- With
Grant bool - Allow grantees to grant their privileges to other grantees. Changing this property forces recreation of the resource.
- database 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 String
- The column to grant access to. Changing this property forces recreation of the resource.
- privilege 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 String
- The table to grant access to. Changing this property forces recreation of the resource.
- with
Grant Boolean - Allow grantees to grant their privileges to other grantees. Changing this property forces recreation of the resource.
- database 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 string
- The column to grant access to. Changing this property forces recreation of the resource.
- privilege 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 string
- The table to grant access to. Changing this property forces recreation of the resource.
- with
Grant boolean - Allow grantees to grant their privileges to other grantees. Changing this property forces recreation of the resource.
- database 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 str
- The column to grant access to. Changing this property forces recreation of the resource.
- privilege 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 str
- The table to grant access to. Changing this property forces recreation of the resource.
- with_
grant bool - Allow grantees to grant their privileges to other grantees. Changing this property forces recreation of the resource.
- database 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 String
- The column to grant access to. Changing this property forces recreation of the resource.
- privilege 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 String
- The table to grant access to. Changing this property forces recreation of the resource.
- with
Grant Boolean - Allow grantees to grant their privileges to other grantees. Changing this property forces recreation of the resource.
ClickhouseGrantRoleGrant, ClickhouseGrantRoleGrantArgs
- Role 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 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 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 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 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 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
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.