1. Packages
  2. Vkcs Provider
  3. API Docs
  4. DbConfigGroup
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

vkcs.DbConfigGroup

Explore with Pulumi AI

vkcs logo
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

    Provides a db config group resource. This can be used to create, update and delete db config group.

    New since v0.1.7.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const mysql80 = new vkcs.DbConfigGroup("mysql80", {
        datastore: {
            type: "mysql",
            version: "8.0",
        },
        values: {
            activate_all_roles_on_login: "true",
            autocommit: "1",
            block_encryption_mode: "test",
            innodb_segment_reserve_factor: "0.53",
        },
        description: "db-config-group-description",
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    mysql80 = vkcs.DbConfigGroup("mysql80",
        datastore={
            "type": "mysql",
            "version": "8.0",
        },
        values={
            "activate_all_roles_on_login": "true",
            "autocommit": "1",
            "block_encryption_mode": "test",
            "innodb_segment_reserve_factor": "0.53",
        },
        description="db-config-group-description")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.NewDbConfigGroup(ctx, "mysql80", &vkcs.DbConfigGroupArgs{
    			Datastore: &vkcs.DbConfigGroupDatastoreArgs{
    				Type:    pulumi.String("mysql"),
    				Version: pulumi.String("8.0"),
    			},
    			Values: pulumi.StringMap{
    				"activate_all_roles_on_login":   pulumi.String("true"),
    				"autocommit":                    pulumi.String("1"),
    				"block_encryption_mode":         pulumi.String("test"),
    				"innodb_segment_reserve_factor": pulumi.String("0.53"),
    			},
    			Description: pulumi.String("db-config-group-description"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var mysql80 = new Vkcs.DbConfigGroup("mysql80", new()
        {
            Datastore = new Vkcs.Inputs.DbConfigGroupDatastoreArgs
            {
                Type = "mysql",
                Version = "8.0",
            },
            Values = 
            {
                { "activate_all_roles_on_login", "true" },
                { "autocommit", "1" },
                { "block_encryption_mode", "test" },
                { "innodb_segment_reserve_factor", "0.53" },
            },
            Description = "db-config-group-description",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.DbConfigGroup;
    import com.pulumi.vkcs.DbConfigGroupArgs;
    import com.pulumi.vkcs.inputs.DbConfigGroupDatastoreArgs;
    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 mysql80 = new DbConfigGroup("mysql80", DbConfigGroupArgs.builder()
                .datastore(DbConfigGroupDatastoreArgs.builder()
                    .type("mysql")
                    .version("8.0")
                    .build())
                .values(Map.ofEntries(
                    Map.entry("activate_all_roles_on_login", "true"),
                    Map.entry("autocommit", "1"),
                    Map.entry("block_encryption_mode", "test"),
                    Map.entry("innodb_segment_reserve_factor", "0.53")
                ))
                .description("db-config-group-description")
                .build());
    
        }
    }
    
    resources:
      mysql80:
        type: vkcs:DbConfigGroup
        properties:
          datastore:
            type: mysql
            version: '8.0'
          values:
            activate_all_roles_on_login: 'true'
            autocommit: '1'
            block_encryption_mode: test
            innodb_segment_reserve_factor: '0.53'
          description: db-config-group-description
    

    Updating config group

    While it is possible to create/delete config groups that are not attached to any instance or cluster, in order to update config group, it must be attached.

    Create DbConfigGroup Resource

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

    Constructor syntax

    new DbConfigGroup(name: string, args: DbConfigGroupArgs, opts?: CustomResourceOptions);
    @overload
    def DbConfigGroup(resource_name: str,
                      args: DbConfigGroupArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def DbConfigGroup(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      datastore: Optional[DbConfigGroupDatastoreArgs] = None,
                      values: Optional[Mapping[str, str]] = None,
                      db_config_group_id: Optional[str] = None,
                      description: Optional[str] = None,
                      name: Optional[str] = None)
    func NewDbConfigGroup(ctx *Context, name string, args DbConfigGroupArgs, opts ...ResourceOption) (*DbConfigGroup, error)
    public DbConfigGroup(string name, DbConfigGroupArgs args, CustomResourceOptions? opts = null)
    public DbConfigGroup(String name, DbConfigGroupArgs args)
    public DbConfigGroup(String name, DbConfigGroupArgs args, CustomResourceOptions options)
    
    type: vkcs:DbConfigGroup
    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 DbConfigGroupArgs
    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 DbConfigGroupArgs
    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 DbConfigGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DbConfigGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DbConfigGroupArgs
    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 dbConfigGroupResource = new Vkcs.DbConfigGroup("dbConfigGroupResource", new()
    {
        Datastore = new Vkcs.Inputs.DbConfigGroupDatastoreArgs
        {
            Type = "string",
            Version = "string",
        },
        Values = 
        {
            { "string", "string" },
        },
        DbConfigGroupId = "string",
        Description = "string",
        Name = "string",
    });
    
    example, err := vkcs.NewDbConfigGroup(ctx, "dbConfigGroupResource", &vkcs.DbConfigGroupArgs{
    	Datastore: &vkcs.DbConfigGroupDatastoreArgs{
    		Type:    pulumi.String("string"),
    		Version: pulumi.String("string"),
    	},
    	Values: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	DbConfigGroupId: pulumi.String("string"),
    	Description:     pulumi.String("string"),
    	Name:            pulumi.String("string"),
    })
    
    var dbConfigGroupResource = new DbConfigGroup("dbConfigGroupResource", DbConfigGroupArgs.builder()
        .datastore(DbConfigGroupDatastoreArgs.builder()
            .type("string")
            .version("string")
            .build())
        .values(Map.of("string", "string"))
        .dbConfigGroupId("string")
        .description("string")
        .name("string")
        .build());
    
    db_config_group_resource = vkcs.DbConfigGroup("dbConfigGroupResource",
        datastore={
            "type": "string",
            "version": "string",
        },
        values={
            "string": "string",
        },
        db_config_group_id="string",
        description="string",
        name="string")
    
    const dbConfigGroupResource = new vkcs.DbConfigGroup("dbConfigGroupResource", {
        datastore: {
            type: "string",
            version: "string",
        },
        values: {
            string: "string",
        },
        dbConfigGroupId: "string",
        description: "string",
        name: "string",
    });
    
    type: vkcs:DbConfigGroup
    properties:
        datastore:
            type: string
            version: string
        dbConfigGroupId: string
        description: string
        name: string
        values:
            string: string
    

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

    Datastore DbConfigGroupDatastore
    required → Object that represents datastore of the config group. Changing this creates a new config group.
    Values Dictionary<string, string>
    required map of string → Map of configuration parameters in format "key": "value".
    DbConfigGroupId string
    string → ID of the resource.
    Description string
    optional string → The description of the config group.
    Name string
    required string → The name of the config group.
    Datastore DbConfigGroupDatastoreArgs
    required → Object that represents datastore of the config group. Changing this creates a new config group.
    Values map[string]string
    required map of string → Map of configuration parameters in format "key": "value".
    DbConfigGroupId string
    string → ID of the resource.
    Description string
    optional string → The description of the config group.
    Name string
    required string → The name of the config group.
    datastore DbConfigGroupDatastore
    required → Object that represents datastore of the config group. Changing this creates a new config group.
    values Map<String,String>
    required map of string → Map of configuration parameters in format "key": "value".
    dbConfigGroupId String
    string → ID of the resource.
    description String
    optional string → The description of the config group.
    name String
    required string → The name of the config group.
    datastore DbConfigGroupDatastore
    required → Object that represents datastore of the config group. Changing this creates a new config group.
    values {[key: string]: string}
    required map of string → Map of configuration parameters in format "key": "value".
    dbConfigGroupId string
    string → ID of the resource.
    description string
    optional string → The description of the config group.
    name string
    required string → The name of the config group.
    datastore DbConfigGroupDatastoreArgs
    required → Object that represents datastore of the config group. Changing this creates a new config group.
    values Mapping[str, str]
    required map of string → Map of configuration parameters in format "key": "value".
    db_config_group_id str
    string → ID of the resource.
    description str
    optional string → The description of the config group.
    name str
    required string → The name of the config group.
    datastore Property Map
    required → Object that represents datastore of the config group. Changing this creates a new config group.
    values Map<String>
    required map of string → Map of configuration parameters in format "key": "value".
    dbConfigGroupId String
    string → ID of the resource.
    description String
    optional string → The description of the config group.
    name String
    required string → The name of the config group.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DbConfigGroup resource produces the following output properties:

    Created string
    string → Timestamp of config group's creation
    Id string
    The provider-assigned unique ID for this managed resource.
    Updated string
    string → Timestamp of config group's last update
    Created string
    string → Timestamp of config group's creation
    Id string
    The provider-assigned unique ID for this managed resource.
    Updated string
    string → Timestamp of config group's last update
    created String
    string → Timestamp of config group's creation
    id String
    The provider-assigned unique ID for this managed resource.
    updated String
    string → Timestamp of config group's last update
    created string
    string → Timestamp of config group's creation
    id string
    The provider-assigned unique ID for this managed resource.
    updated string
    string → Timestamp of config group's last update
    created str
    string → Timestamp of config group's creation
    id str
    The provider-assigned unique ID for this managed resource.
    updated str
    string → Timestamp of config group's last update
    created String
    string → Timestamp of config group's creation
    id String
    The provider-assigned unique ID for this managed resource.
    updated String
    string → Timestamp of config group's last update

    Look up Existing DbConfigGroup Resource

    Get an existing DbConfigGroup 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?: DbConfigGroupState, opts?: CustomResourceOptions): DbConfigGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created: Optional[str] = None,
            datastore: Optional[DbConfigGroupDatastoreArgs] = None,
            db_config_group_id: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            updated: Optional[str] = None,
            values: Optional[Mapping[str, str]] = None) -> DbConfigGroup
    func GetDbConfigGroup(ctx *Context, name string, id IDInput, state *DbConfigGroupState, opts ...ResourceOption) (*DbConfigGroup, error)
    public static DbConfigGroup Get(string name, Input<string> id, DbConfigGroupState? state, CustomResourceOptions? opts = null)
    public static DbConfigGroup get(String name, Output<String> id, DbConfigGroupState state, CustomResourceOptions options)
    resources:  _:    type: vkcs:DbConfigGroup    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Created string
    string → Timestamp of config group's creation
    Datastore DbConfigGroupDatastore
    required → Object that represents datastore of the config group. Changing this creates a new config group.
    DbConfigGroupId string
    string → ID of the resource.
    Description string
    optional string → The description of the config group.
    Name string
    required string → The name of the config group.
    Updated string
    string → Timestamp of config group's last update
    Values Dictionary<string, string>
    required map of string → Map of configuration parameters in format "key": "value".
    Created string
    string → Timestamp of config group's creation
    Datastore DbConfigGroupDatastoreArgs
    required → Object that represents datastore of the config group. Changing this creates a new config group.
    DbConfigGroupId string
    string → ID of the resource.
    Description string
    optional string → The description of the config group.
    Name string
    required string → The name of the config group.
    Updated string
    string → Timestamp of config group's last update
    Values map[string]string
    required map of string → Map of configuration parameters in format "key": "value".
    created String
    string → Timestamp of config group's creation
    datastore DbConfigGroupDatastore
    required → Object that represents datastore of the config group. Changing this creates a new config group.
    dbConfigGroupId String
    string → ID of the resource.
    description String
    optional string → The description of the config group.
    name String
    required string → The name of the config group.
    updated String
    string → Timestamp of config group's last update
    values Map<String,String>
    required map of string → Map of configuration parameters in format "key": "value".
    created string
    string → Timestamp of config group's creation
    datastore DbConfigGroupDatastore
    required → Object that represents datastore of the config group. Changing this creates a new config group.
    dbConfigGroupId string
    string → ID of the resource.
    description string
    optional string → The description of the config group.
    name string
    required string → The name of the config group.
    updated string
    string → Timestamp of config group's last update
    values {[key: string]: string}
    required map of string → Map of configuration parameters in format "key": "value".
    created str
    string → Timestamp of config group's creation
    datastore DbConfigGroupDatastoreArgs
    required → Object that represents datastore of the config group. Changing this creates a new config group.
    db_config_group_id str
    string → ID of the resource.
    description str
    optional string → The description of the config group.
    name str
    required string → The name of the config group.
    updated str
    string → Timestamp of config group's last update
    values Mapping[str, str]
    required map of string → Map of configuration parameters in format "key": "value".
    created String
    string → Timestamp of config group's creation
    datastore Property Map
    required → Object that represents datastore of the config group. Changing this creates a new config group.
    dbConfigGroupId String
    string → ID of the resource.
    description String
    optional string → The description of the config group.
    name String
    required string → The name of the config group.
    updated String
    string → Timestamp of config group's last update
    values Map<String>
    required map of string → Map of configuration parameters in format "key": "value".

    Supporting Types

    DbConfigGroupDatastore, DbConfigGroupDatastoreArgs

    Type string
    required string → Type of the datastore.
    Version string
    required string → Version of the datastore.
    Type string
    required string → Type of the datastore.
    Version string
    required string → Version of the datastore.
    type String
    required string → Type of the datastore.
    version String
    required string → Version of the datastore.
    type string
    required string → Type of the datastore.
    version string
    required string → Version of the datastore.
    type str
    required string → Type of the datastore.
    version str
    required string → Version of the datastore.
    type String
    required string → Type of the datastore.
    version String
    required string → Version of the datastore.

    Import

    Config groups can be imported using the id, e.g.

    $ pulumi import vkcs:index/dbConfigGroup:DbConfigGroup myconfiggroup d3d6f037-84f6-44f7-a9f4-ac4b40d67859
    

    After the import you can use terraform show to view imported fields and write their values to your .tf file.

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

    Package Details

    Repository
    vkcs vk-cs/terraform-provider-vkcs
    License
    Notes
    This Pulumi package is based on the vkcs Terraform Provider.
    vkcs logo
    vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs