tencentcloud.MariadbAccount
Explore with Pulumi AI
Provides a resource to create a mariadb account
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const account = new tencentcloud.MariadbAccount("account", {
description: "desc",
host: "10.101.202.22",
instanceId: "tdsql-4pzs5b67",
password: "Password123.",
readOnly: 0,
userName: "account-test",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
account = tencentcloud.MariadbAccount("account",
description="desc",
host="10.101.202.22",
instance_id="tdsql-4pzs5b67",
password="Password123.",
read_only=0,
user_name="account-test")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewMariadbAccount(ctx, "account", &tencentcloud.MariadbAccountArgs{
Description: pulumi.String("desc"),
Host: pulumi.String("10.101.202.22"),
InstanceId: pulumi.String("tdsql-4pzs5b67"),
Password: pulumi.String("Password123."),
ReadOnly: pulumi.Float64(0),
UserName: pulumi.String("account-test"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var account = new Tencentcloud.MariadbAccount("account", new()
{
Description = "desc",
Host = "10.101.202.22",
InstanceId = "tdsql-4pzs5b67",
Password = "Password123.",
ReadOnly = 0,
UserName = "account-test",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.MariadbAccount;
import com.pulumi.tencentcloud.MariadbAccountArgs;
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 account = new MariadbAccount("account", MariadbAccountArgs.builder()
.description("desc")
.host("10.101.202.22")
.instanceId("tdsql-4pzs5b67")
.password("Password123.")
.readOnly(0)
.userName("account-test")
.build());
}
}
resources:
account:
type: tencentcloud:MariadbAccount
properties:
description: desc
host: 10.101.202.22
instanceId: tdsql-4pzs5b67
password: Password123.
readOnly: 0
userName: account-test
Create MariadbAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MariadbAccount(name: string, args: MariadbAccountArgs, opts?: CustomResourceOptions);
@overload
def MariadbAccount(resource_name: str,
args: MariadbAccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MariadbAccount(resource_name: str,
opts: Optional[ResourceOptions] = None,
host: Optional[str] = None,
instance_id: Optional[str] = None,
password: Optional[str] = None,
user_name: Optional[str] = None,
description: Optional[str] = None,
mariadb_account_id: Optional[str] = None,
read_only: Optional[float] = None)
func NewMariadbAccount(ctx *Context, name string, args MariadbAccountArgs, opts ...ResourceOption) (*MariadbAccount, error)
public MariadbAccount(string name, MariadbAccountArgs args, CustomResourceOptions? opts = null)
public MariadbAccount(String name, MariadbAccountArgs args)
public MariadbAccount(String name, MariadbAccountArgs args, CustomResourceOptions options)
type: tencentcloud:MariadbAccount
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 MariadbAccountArgs
- 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 MariadbAccountArgs
- 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 MariadbAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MariadbAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MariadbAccountArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
MariadbAccount 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 MariadbAccount resource accepts the following input properties:
- Host string
- host.
- Instance
Id string - instance id.
- Password string
- account password.
- User
Name string - user name.
- Description string
- account description.
- Mariadb
Account stringId - ID of the resource.
- Read
Only double - wether account is read only, 0 means not a read only account.
- Host string
- host.
- Instance
Id string - instance id.
- Password string
- account password.
- User
Name string - user name.
- Description string
- account description.
- Mariadb
Account stringId - ID of the resource.
- Read
Only float64 - wether account is read only, 0 means not a read only account.
- host String
- host.
- instance
Id String - instance id.
- password String
- account password.
- user
Name String - user name.
- description String
- account description.
- mariadb
Account StringId - ID of the resource.
- read
Only Double - wether account is read only, 0 means not a read only account.
- host string
- host.
- instance
Id string - instance id.
- password string
- account password.
- user
Name string - user name.
- description string
- account description.
- mariadb
Account stringId - ID of the resource.
- read
Only number - wether account is read only, 0 means not a read only account.
- host str
- host.
- instance_
id str - instance id.
- password str
- account password.
- user_
name str - user name.
- description str
- account description.
- mariadb_
account_ strid - ID of the resource.
- read_
only float - wether account is read only, 0 means not a read only account.
- host String
- host.
- instance
Id String - instance id.
- password String
- account password.
- user
Name String - user name.
- description String
- account description.
- mariadb
Account StringId - ID of the resource.
- read
Only Number - wether account is read only, 0 means not a read only account.
Outputs
All input properties are implicitly available as output properties. Additionally, the MariadbAccount 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 MariadbAccount Resource
Get an existing MariadbAccount 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?: MariadbAccountState, opts?: CustomResourceOptions): MariadbAccount
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
host: Optional[str] = None,
instance_id: Optional[str] = None,
mariadb_account_id: Optional[str] = None,
password: Optional[str] = None,
read_only: Optional[float] = None,
user_name: Optional[str] = None) -> MariadbAccount
func GetMariadbAccount(ctx *Context, name string, id IDInput, state *MariadbAccountState, opts ...ResourceOption) (*MariadbAccount, error)
public static MariadbAccount Get(string name, Input<string> id, MariadbAccountState? state, CustomResourceOptions? opts = null)
public static MariadbAccount get(String name, Output<String> id, MariadbAccountState state, CustomResourceOptions options)
resources: _: type: tencentcloud:MariadbAccount 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.
- Description string
- account description.
- Host string
- host.
- Instance
Id string - instance id.
- Mariadb
Account stringId - ID of the resource.
- Password string
- account password.
- Read
Only double - wether account is read only, 0 means not a read only account.
- User
Name string - user name.
- Description string
- account description.
- Host string
- host.
- Instance
Id string - instance id.
- Mariadb
Account stringId - ID of the resource.
- Password string
- account password.
- Read
Only float64 - wether account is read only, 0 means not a read only account.
- User
Name string - user name.
- description String
- account description.
- host String
- host.
- instance
Id String - instance id.
- mariadb
Account StringId - ID of the resource.
- password String
- account password.
- read
Only Double - wether account is read only, 0 means not a read only account.
- user
Name String - user name.
- description string
- account description.
- host string
- host.
- instance
Id string - instance id.
- mariadb
Account stringId - ID of the resource.
- password string
- account password.
- read
Only number - wether account is read only, 0 means not a read only account.
- user
Name string - user name.
- description str
- account description.
- host str
- host.
- instance_
id str - instance id.
- mariadb_
account_ strid - ID of the resource.
- password str
- account password.
- read_
only float - wether account is read only, 0 means not a read only account.
- user_
name str - user name.
- description String
- account description.
- host String
- host.
- instance
Id String - instance id.
- mariadb
Account StringId - ID of the resource.
- password String
- account password.
- read
Only Number - wether account is read only, 0 means not a read only account.
- user
Name String - user name.
Import
mariadb account can be imported using the instance_id#user_name#host, e.g.
$ pulumi import tencentcloud:index/mariadbAccount:MariadbAccount account tdsql-4pzs5b67#account-test#10.101.202.22
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.