1. Packages
  2. Aiven
  3. API Docs
  4. ClickhouseGrant
Aiven v6.18.0 published on Thursday, Jun 27, 2024 by Pulumi

aiven.ClickhouseGrant

Explore with Pulumi AI

aiven logo
Aiven v6.18.0 published on Thursday, Jun 27, 2024 by Pulumi

    The Clickhouse Grant resource allows the creation and management of Grants in Aiven Clickhouse services.

    Notes:

    • Due to a ambiguity in the GRANT syntax in clickhouse you should not have users and roles with the same name. It is not clear if a grant refers to the user or the role.
    • To grant a privilege on all tables of a database, do not write table = “*”. Instead, omit the table and only keep the database.
    • Currently changes will 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 clickhouse = new aiven.Clickhouse("clickhouse", {
        project: aivenProjectName,
        cloudName: "google-europe-west1",
        plan: "startup-8",
        serviceName: "exapmle-clickhouse",
    });
    const demodb = new aiven.ClickhouseDatabase("demodb", {
        project: clickhouse.project,
        serviceName: clickhouse.serviceName,
        name: "demo",
    });
    const demo = new aiven.ClickhouseRole("demo", {
        project: clickhouse.project,
        serviceName: clickhouse.serviceName,
        role: "demo-role",
    });
    const demo_role_grant = new aiven.ClickhouseGrant("demo-role-grant", {
        project: clickhouse.project,
        serviceName: clickhouse.serviceName,
        role: demo.role,
        privilegeGrants: [
            {
                privilege: "INSERT",
                database: demodb.name,
                table: "demo-table",
            },
            {
                privilege: "SELECT",
                database: demodb.name,
            },
        ],
    });
    const demoClickhouseUser = new aiven.ClickhouseUser("demo", {
        project: clickhouse.project,
        serviceName: clickhouse.serviceName,
        username: "demo-user",
    });
    const demo_user_grant = new aiven.ClickhouseGrant("demo-user-grant", {
        project: clickhouse.project,
        serviceName: clickhouse.serviceName,
        user: demoClickhouseUser.username,
        roleGrants: [{
            role: demo.role,
        }],
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    clickhouse = aiven.Clickhouse("clickhouse",
        project=aiven_project_name,
        cloud_name="google-europe-west1",
        plan="startup-8",
        service_name="exapmle-clickhouse")
    demodb = aiven.ClickhouseDatabase("demodb",
        project=clickhouse.project,
        service_name=clickhouse.service_name,
        name="demo")
    demo = aiven.ClickhouseRole("demo",
        project=clickhouse.project,
        service_name=clickhouse.service_name,
        role="demo-role")
    demo_role_grant = aiven.ClickhouseGrant("demo-role-grant",
        project=clickhouse.project,
        service_name=clickhouse.service_name,
        role=demo.role,
        privilege_grants=[
            aiven.ClickhouseGrantPrivilegeGrantArgs(
                privilege="INSERT",
                database=demodb.name,
                table="demo-table",
            ),
            aiven.ClickhouseGrantPrivilegeGrantArgs(
                privilege="SELECT",
                database=demodb.name,
            ),
        ])
    demo_clickhouse_user = aiven.ClickhouseUser("demo",
        project=clickhouse.project,
        service_name=clickhouse.service_name,
        username="demo-user")
    demo_user_grant = aiven.ClickhouseGrant("demo-user-grant",
        project=clickhouse.project,
        service_name=clickhouse.service_name,
        user=demo_clickhouse_user.username,
        role_grants=[aiven.ClickhouseGrantRoleGrantArgs(
            role=demo.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 {
    		clickhouse, err := aiven.NewClickhouse(ctx, "clickhouse", &aiven.ClickhouseArgs{
    			Project:     pulumi.Any(aivenProjectName),
    			CloudName:   pulumi.String("google-europe-west1"),
    			Plan:        pulumi.String("startup-8"),
    			ServiceName: pulumi.String("exapmle-clickhouse"),
    		})
    		if err != nil {
    			return err
    		}
    		demodb, err := aiven.NewClickhouseDatabase(ctx, "demodb", &aiven.ClickhouseDatabaseArgs{
    			Project:     clickhouse.Project,
    			ServiceName: clickhouse.ServiceName,
    			Name:        pulumi.String("demo"),
    		})
    		if err != nil {
    			return err
    		}
    		demo, err := aiven.NewClickhouseRole(ctx, "demo", &aiven.ClickhouseRoleArgs{
    			Project:     clickhouse.Project,
    			ServiceName: clickhouse.ServiceName,
    			Role:        pulumi.String("demo-role"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = aiven.NewClickhouseGrant(ctx, "demo-role-grant", &aiven.ClickhouseGrantArgs{
    			Project:     clickhouse.Project,
    			ServiceName: clickhouse.ServiceName,
    			Role:        demo.Role,
    			PrivilegeGrants: aiven.ClickhouseGrantPrivilegeGrantArray{
    				&aiven.ClickhouseGrantPrivilegeGrantArgs{
    					Privilege: pulumi.String("INSERT"),
    					Database:  demodb.Name,
    					Table:     pulumi.String("demo-table"),
    				},
    				&aiven.ClickhouseGrantPrivilegeGrantArgs{
    					Privilege: pulumi.String("SELECT"),
    					Database:  demodb.Name,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		demoClickhouseUser, err := aiven.NewClickhouseUser(ctx, "demo", &aiven.ClickhouseUserArgs{
    			Project:     clickhouse.Project,
    			ServiceName: clickhouse.ServiceName,
    			Username:    pulumi.String("demo-user"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = aiven.NewClickhouseGrant(ctx, "demo-user-grant", &aiven.ClickhouseGrantArgs{
    			Project:     clickhouse.Project,
    			ServiceName: clickhouse.ServiceName,
    			User:        demoClickhouseUser.Username,
    			RoleGrants: aiven.ClickhouseGrantRoleGrantArray{
    				&aiven.ClickhouseGrantRoleGrantArgs{
    					Role: demo.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 clickhouse = new Aiven.Clickhouse("clickhouse", new()
        {
            Project = aivenProjectName,
            CloudName = "google-europe-west1",
            Plan = "startup-8",
            ServiceName = "exapmle-clickhouse",
        });
    
        var demodb = new Aiven.ClickhouseDatabase("demodb", new()
        {
            Project = clickhouse.Project,
            ServiceName = clickhouse.ServiceName,
            Name = "demo",
        });
    
        var demo = new Aiven.ClickhouseRole("demo", new()
        {
            Project = clickhouse.Project,
            ServiceName = clickhouse.ServiceName,
            Role = "demo-role",
        });
    
        var demo_role_grant = new Aiven.ClickhouseGrant("demo-role-grant", new()
        {
            Project = clickhouse.Project,
            ServiceName = clickhouse.ServiceName,
            Role = demo.Role,
            PrivilegeGrants = new[]
            {
                new Aiven.Inputs.ClickhouseGrantPrivilegeGrantArgs
                {
                    Privilege = "INSERT",
                    Database = demodb.Name,
                    Table = "demo-table",
                },
                new Aiven.Inputs.ClickhouseGrantPrivilegeGrantArgs
                {
                    Privilege = "SELECT",
                    Database = demodb.Name,
                },
            },
        });
    
        var demoClickhouseUser = new Aiven.ClickhouseUser("demo", new()
        {
            Project = clickhouse.Project,
            ServiceName = clickhouse.ServiceName,
            Username = "demo-user",
        });
    
        var demo_user_grant = new Aiven.ClickhouseGrant("demo-user-grant", new()
        {
            Project = clickhouse.Project,
            ServiceName = clickhouse.ServiceName,
            User = demoClickhouseUser.Username,
            RoleGrants = new[]
            {
                new Aiven.Inputs.ClickhouseGrantRoleGrantArgs
                {
                    Role = demo.Role,
                },
            },
        });
    
    });
    
    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.ClickhouseDatabase;
    import com.pulumi.aiven.ClickhouseDatabaseArgs;
    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 clickhouse = new Clickhouse("clickhouse", ClickhouseArgs.builder()
                .project(aivenProjectName)
                .cloudName("google-europe-west1")
                .plan("startup-8")
                .serviceName("exapmle-clickhouse")
                .build());
    
            var demodb = new ClickhouseDatabase("demodb", ClickhouseDatabaseArgs.builder()
                .project(clickhouse.project())
                .serviceName(clickhouse.serviceName())
                .name("demo")
                .build());
    
            var demo = new ClickhouseRole("demo", ClickhouseRoleArgs.builder()
                .project(clickhouse.project())
                .serviceName(clickhouse.serviceName())
                .role("demo-role")
                .build());
    
            var demo_role_grant = new ClickhouseGrant("demo-role-grant", ClickhouseGrantArgs.builder()
                .project(clickhouse.project())
                .serviceName(clickhouse.serviceName())
                .role(demo.role())
                .privilegeGrants(            
                    ClickhouseGrantPrivilegeGrantArgs.builder()
                        .privilege("INSERT")
                        .database(demodb.name())
                        .table("demo-table")
                        .build(),
                    ClickhouseGrantPrivilegeGrantArgs.builder()
                        .privilege("SELECT")
                        .database(demodb.name())
                        .build())
                .build());
    
            var demoClickhouseUser = new ClickhouseUser("demoClickhouseUser", ClickhouseUserArgs.builder()
                .project(clickhouse.project())
                .serviceName(clickhouse.serviceName())
                .username("demo-user")
                .build());
    
            var demo_user_grant = new ClickhouseGrant("demo-user-grant", ClickhouseGrantArgs.builder()
                .project(clickhouse.project())
                .serviceName(clickhouse.serviceName())
                .user(demoClickhouseUser.username())
                .roleGrants(ClickhouseGrantRoleGrantArgs.builder()
                    .role(demo.role())
                    .build())
                .build());
    
        }
    }
    
    resources:
      clickhouse:
        type: aiven:Clickhouse
        properties:
          project: ${aivenProjectName}
          cloudName: google-europe-west1
          plan: startup-8
          serviceName: exapmle-clickhouse
      demodb:
        type: aiven:ClickhouseDatabase
        properties:
          project: ${clickhouse.project}
          serviceName: ${clickhouse.serviceName}
          name: demo
      demo:
        type: aiven:ClickhouseRole
        properties:
          project: ${clickhouse.project}
          serviceName: ${clickhouse.serviceName}
          role: demo-role
      demo-role-grant:
        type: aiven:ClickhouseGrant
        properties:
          project: ${clickhouse.project}
          serviceName: ${clickhouse.serviceName}
          role: ${demo.role}
          privilegeGrants:
            - privilege: INSERT
              database: ${demodb.name}
              table: demo-table
            - privilege: SELECT
              database: ${demodb.name}
      demoClickhouseUser:
        type: aiven:ClickhouseUser
        name: demo
        properties:
          project: ${clickhouse.project}
          serviceName: ${clickhouse.serviceName}
          username: demo-user
      demo-user-grant:
        type: aiven:ClickhouseGrant
        properties:
          project: ${clickhouse.project}
          serviceName: ${clickhouse.serviceName}
          user: ${demoClickhouseUser.username}
          roleGrants:
            - role: ${demo.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.
    ServiceName 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 List<ClickhouseGrantPrivilegeGrant>
    Configuration to grant a privilege. 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.
    RoleGrants List<ClickhouseGrantRoleGrant>
    Configuration to grant a role. 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.
    ServiceName 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 []ClickhouseGrantPrivilegeGrantArgs
    Configuration to grant a privilege. 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.
    RoleGrants []ClickhouseGrantRoleGrantArgs
    Configuration to grant a role. 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.
    serviceName 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 List<ClickhouseGrantPrivilegeGrant>
    Configuration to grant a privilege. 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.
    roleGrants List<ClickhouseGrantRoleGrant>
    Configuration to grant a role. 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.
    serviceName 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 ClickhouseGrantPrivilegeGrant[]
    Configuration to grant a privilege. 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.
    roleGrants ClickhouseGrantRoleGrant[]
    Configuration to grant a role. 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[ClickhouseGrantPrivilegeGrantArgs]
    Configuration to grant a privilege. 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[ClickhouseGrantRoleGrantArgs]
    Configuration to grant a role. 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.
    serviceName 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 List<Property Map>
    Configuration to grant a privilege. 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.
    roleGrants List<Property Map>
    Configuration to grant a role. 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.
    The following state arguments are supported:
    PrivilegeGrants List<ClickhouseGrantPrivilegeGrant>
    Configuration to grant a privilege. 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.
    RoleGrants List<ClickhouseGrantRoleGrant>
    Configuration to grant a role. Changing this property forces recreation of the resource.
    ServiceName 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.
    PrivilegeGrants []ClickhouseGrantPrivilegeGrantArgs
    Configuration to grant a privilege. 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.
    RoleGrants []ClickhouseGrantRoleGrantArgs
    Configuration to grant a role. Changing this property forces recreation of the resource.
    ServiceName 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.
    privilegeGrants List<ClickhouseGrantPrivilegeGrant>
    Configuration to grant a privilege. 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.
    roleGrants List<ClickhouseGrantRoleGrant>
    Configuration to grant a role. Changing this property forces recreation of the resource.
    serviceName 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.
    privilegeGrants ClickhouseGrantPrivilegeGrant[]
    Configuration to grant a privilege. 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.
    roleGrants ClickhouseGrantRoleGrant[]
    Configuration to grant a role. Changing this property forces recreation of the resource.
    serviceName 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[ClickhouseGrantPrivilegeGrantArgs]
    Configuration to grant a privilege. 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[ClickhouseGrantRoleGrantArgs]
    Configuration to grant a role. 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.
    privilegeGrants List<Property Map>
    Configuration to grant a privilege. 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.
    roleGrants List<Property Map>
    Configuration to grant a role. Changing this property forces recreation of the resource.
    serviceName 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 that the grant refers 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 that the grant refers to. Changing this property forces recreation of the resource.
    Privilege string
    The privilege to grant, i.e. 'INSERT', 'SELECT', etc. Changing this property forces recreation of the resource.
    Table string
    The table that the grant refers to. Changing this property forces recreation of the resource.
    WithGrant bool
    If true then the grantee gets the ability to grant the privileges he received too. Changing this property forces recreation of the resource.
    Database string
    The database that the grant refers 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 that the grant refers to. Changing this property forces recreation of the resource.
    Privilege string
    The privilege to grant, i.e. 'INSERT', 'SELECT', etc. Changing this property forces recreation of the resource.
    Table string
    The table that the grant refers to. Changing this property forces recreation of the resource.
    WithGrant bool
    If true then the grantee gets the ability to grant the privileges he received too. Changing this property forces recreation of the resource.
    database String
    The database that the grant refers 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 that the grant refers to. Changing this property forces recreation of the resource.
    privilege String
    The privilege to grant, i.e. 'INSERT', 'SELECT', etc. Changing this property forces recreation of the resource.
    table String
    The table that the grant refers to. Changing this property forces recreation of the resource.
    withGrant Boolean
    If true then the grantee gets the ability to grant the privileges he received too. Changing this property forces recreation of the resource.
    database string
    The database that the grant refers 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 that the grant refers to. Changing this property forces recreation of the resource.
    privilege string
    The privilege to grant, i.e. 'INSERT', 'SELECT', etc. Changing this property forces recreation of the resource.
    table string
    The table that the grant refers to. Changing this property forces recreation of the resource.
    withGrant boolean
    If true then the grantee gets the ability to grant the privileges he received too. Changing this property forces recreation of the resource.
    database str
    The database that the grant refers 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 that the grant refers to. Changing this property forces recreation of the resource.
    privilege str
    The privilege to grant, i.e. 'INSERT', 'SELECT', etc. Changing this property forces recreation of the resource.
    table str
    The table that the grant refers to. Changing this property forces recreation of the resource.
    with_grant bool
    If true then the grantee gets the ability to grant the privileges he received too. Changing this property forces recreation of the resource.
    database String
    The database that the grant refers 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 that the grant refers to. Changing this property forces recreation of the resource.
    privilege String
    The privilege to grant, i.e. 'INSERT', 'SELECT', etc. Changing this property forces recreation of the resource.
    table String
    The table that the grant refers to. Changing this property forces recreation of the resource.
    withGrant Boolean
    If true then the grantee gets the ability to grant the privileges he received too. Changing this property forces recreation of the resource.

    ClickhouseGrantRoleGrant, ClickhouseGrantRoleGrantArgs

    Role string
    The role that is to be granted. 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 that is to be granted. 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 that is to be granted. 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 that is to be granted. 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 that is to be granted. 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 that is to be granted. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.

    Package Details

    Repository
    Aiven pulumi/pulumi-aiven
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aiven Terraform Provider.
    aiven logo
    Aiven v6.18.0 published on Thursday, Jun 27, 2024 by Pulumi