flexibleengine.RdsAccount
Explore with Pulumi AI
Manages RDS Mysql account resource within FlexibleEngine.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const config = new pulumi.Config();
const instanceId = config.requireObject("instanceId");
const test = new flexibleengine.RdsAccount("test", {
instanceId: instanceId,
password: "Test@12345678",
});
import pulumi
import pulumi_flexibleengine as flexibleengine
config = pulumi.Config()
instance_id = config.require_object("instanceId")
test = flexibleengine.RdsAccount("test",
instance_id=instance_id,
password="Test@12345678")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
instanceId := cfg.RequireObject("instanceId")
_, err := flexibleengine.NewRdsAccount(ctx, "test", &flexibleengine.RdsAccountArgs{
InstanceId: pulumi.Any(instanceId),
Password: pulumi.String("Test@12345678"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var instanceId = config.RequireObject<dynamic>("instanceId");
var test = new Flexibleengine.RdsAccount("test", new()
{
InstanceId = instanceId,
Password = "Test@12345678",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.RdsAccount;
import com.pulumi.flexibleengine.RdsAccountArgs;
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) {
final var config = ctx.config();
final var instanceId = config.get("instanceId");
var test = new RdsAccount("test", RdsAccountArgs.builder()
.instanceId(instanceId)
.password("Test@12345678")
.build());
}
}
configuration:
instanceId:
type: dynamic
resources:
test:
type: flexibleengine:RdsAccount
properties:
instanceId: ${instanceId}
password: Test@12345678
Create RdsAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RdsAccount(name: string, args: RdsAccountArgs, opts?: CustomResourceOptions);
@overload
def RdsAccount(resource_name: str,
args: RdsAccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RdsAccount(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
password: Optional[str] = None,
description: Optional[str] = None,
hosts: Optional[Sequence[str]] = None,
name: Optional[str] = None,
rds_account_id: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[RdsAccountTimeoutsArgs] = None)
func NewRdsAccount(ctx *Context, name string, args RdsAccountArgs, opts ...ResourceOption) (*RdsAccount, error)
public RdsAccount(string name, RdsAccountArgs args, CustomResourceOptions? opts = null)
public RdsAccount(String name, RdsAccountArgs args)
public RdsAccount(String name, RdsAccountArgs args, CustomResourceOptions options)
type: flexibleengine:RdsAccount
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 RdsAccountArgs
- 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 RdsAccountArgs
- 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 RdsAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RdsAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RdsAccountArgs
- 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 rdsAccountResource = new Flexibleengine.RdsAccount("rdsAccountResource", new()
{
InstanceId = "string",
Password = "string",
Description = "string",
Hosts = new[]
{
"string",
},
Name = "string",
RdsAccountId = "string",
Region = "string",
Timeouts = new Flexibleengine.Inputs.RdsAccountTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
});
example, err := flexibleengine.NewRdsAccount(ctx, "rdsAccountResource", &flexibleengine.RdsAccountArgs{
InstanceId: pulumi.String("string"),
Password: pulumi.String("string"),
Description: pulumi.String("string"),
Hosts: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
RdsAccountId: pulumi.String("string"),
Region: pulumi.String("string"),
Timeouts: &flexibleengine.RdsAccountTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var rdsAccountResource = new RdsAccount("rdsAccountResource", RdsAccountArgs.builder()
.instanceId("string")
.password("string")
.description("string")
.hosts("string")
.name("string")
.rdsAccountId("string")
.region("string")
.timeouts(RdsAccountTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.build());
rds_account_resource = flexibleengine.RdsAccount("rdsAccountResource",
instance_id="string",
password="string",
description="string",
hosts=["string"],
name="string",
rds_account_id="string",
region="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
})
const rdsAccountResource = new flexibleengine.RdsAccount("rdsAccountResource", {
instanceId: "string",
password: "string",
description: "string",
hosts: ["string"],
name: "string",
rdsAccountId: "string",
region: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: flexibleengine:RdsAccount
properties:
description: string
hosts:
- string
instanceId: string
name: string
password: string
rdsAccountId: string
region: string
timeouts:
create: string
delete: string
update: string
RdsAccount 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 RdsAccount resource accepts the following input properties:
- Instance
Id string - Specifies the rds instance id. Changing this will create a new resource.
- Password string
- Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
- Description string
- Specifies remarks of the DB account.
- Hosts List<string>
- Specifies the IP addresses that are allowed to access your DB instance.
- Name string
- Specifies the username of the db account. Only lowercase letters, digits,
hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.
- If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
- If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
- Rds
Account stringId - The resource ID of account which is formatted
<instance_id>/<account_name>
. - Region string
- Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
- Timeouts
Rds
Account Timeouts
- Instance
Id string - Specifies the rds instance id. Changing this will create a new resource.
- Password string
- Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
- Description string
- Specifies remarks of the DB account.
- Hosts []string
- Specifies the IP addresses that are allowed to access your DB instance.
- Name string
- Specifies the username of the db account. Only lowercase letters, digits,
hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.
- If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
- If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
- Rds
Account stringId - The resource ID of account which is formatted
<instance_id>/<account_name>
. - Region string
- Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
- Timeouts
Rds
Account Timeouts Args
- instance
Id String - Specifies the rds instance id. Changing this will create a new resource.
- password String
- Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
- description String
- Specifies remarks of the DB account.
- hosts List<String>
- Specifies the IP addresses that are allowed to access your DB instance.
- name String
- Specifies the username of the db account. Only lowercase letters, digits,
hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.
- If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
- If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
- rds
Account StringId - The resource ID of account which is formatted
<instance_id>/<account_name>
. - region String
- Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
- timeouts
Rds
Account Timeouts
- instance
Id string - Specifies the rds instance id. Changing this will create a new resource.
- password string
- Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
- description string
- Specifies remarks of the DB account.
- hosts string[]
- Specifies the IP addresses that are allowed to access your DB instance.
- name string
- Specifies the username of the db account. Only lowercase letters, digits,
hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.
- If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
- If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
- rds
Account stringId - The resource ID of account which is formatted
<instance_id>/<account_name>
. - region string
- Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
- timeouts
Rds
Account Timeouts
- instance_
id str - Specifies the rds instance id. Changing this will create a new resource.
- password str
- Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
- description str
- Specifies remarks of the DB account.
- hosts Sequence[str]
- Specifies the IP addresses that are allowed to access your DB instance.
- name str
- Specifies the username of the db account. Only lowercase letters, digits,
hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.
- If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
- If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
- rds_
account_ strid - The resource ID of account which is formatted
<instance_id>/<account_name>
. - region str
- Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
- timeouts
Rds
Account Timeouts Args
- instance
Id String - Specifies the rds instance id. Changing this will create a new resource.
- password String
- Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
- description String
- Specifies remarks of the DB account.
- hosts List<String>
- Specifies the IP addresses that are allowed to access your DB instance.
- name String
- Specifies the username of the db account. Only lowercase letters, digits,
hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.
- If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
- If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
- rds
Account StringId - The resource ID of account which is formatted
<instance_id>/<account_name>
. - region String
- Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the RdsAccount 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 RdsAccount Resource
Get an existing RdsAccount 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?: RdsAccountState, opts?: CustomResourceOptions): RdsAccount
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
hosts: Optional[Sequence[str]] = None,
instance_id: Optional[str] = None,
name: Optional[str] = None,
password: Optional[str] = None,
rds_account_id: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[RdsAccountTimeoutsArgs] = None) -> RdsAccount
func GetRdsAccount(ctx *Context, name string, id IDInput, state *RdsAccountState, opts ...ResourceOption) (*RdsAccount, error)
public static RdsAccount Get(string name, Input<string> id, RdsAccountState? state, CustomResourceOptions? opts = null)
public static RdsAccount get(String name, Output<String> id, RdsAccountState state, CustomResourceOptions options)
resources: _: type: flexibleengine:RdsAccount 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
- Specifies remarks of the DB account.
- Hosts List<string>
- Specifies the IP addresses that are allowed to access your DB instance.
- Instance
Id string - Specifies the rds instance id. Changing this will create a new resource.
- Name string
- Specifies the username of the db account. Only lowercase letters, digits,
hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.
- If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
- If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
- Password string
- Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
- Rds
Account stringId - The resource ID of account which is formatted
<instance_id>/<account_name>
. - Region string
- Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
- Timeouts
Rds
Account Timeouts
- Description string
- Specifies remarks of the DB account.
- Hosts []string
- Specifies the IP addresses that are allowed to access your DB instance.
- Instance
Id string - Specifies the rds instance id. Changing this will create a new resource.
- Name string
- Specifies the username of the db account. Only lowercase letters, digits,
hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.
- If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
- If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
- Password string
- Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
- Rds
Account stringId - The resource ID of account which is formatted
<instance_id>/<account_name>
. - Region string
- Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
- Timeouts
Rds
Account Timeouts Args
- description String
- Specifies remarks of the DB account.
- hosts List<String>
- Specifies the IP addresses that are allowed to access your DB instance.
- instance
Id String - Specifies the rds instance id. Changing this will create a new resource.
- name String
- Specifies the username of the db account. Only lowercase letters, digits,
hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.
- If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
- If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
- password String
- Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
- rds
Account StringId - The resource ID of account which is formatted
<instance_id>/<account_name>
. - region String
- Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
- timeouts
Rds
Account Timeouts
- description string
- Specifies remarks of the DB account.
- hosts string[]
- Specifies the IP addresses that are allowed to access your DB instance.
- instance
Id string - Specifies the rds instance id. Changing this will create a new resource.
- name string
- Specifies the username of the db account. Only lowercase letters, digits,
hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.
- If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
- If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
- password string
- Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
- rds
Account stringId - The resource ID of account which is formatted
<instance_id>/<account_name>
. - region string
- Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
- timeouts
Rds
Account Timeouts
- description str
- Specifies remarks of the DB account.
- hosts Sequence[str]
- Specifies the IP addresses that are allowed to access your DB instance.
- instance_
id str - Specifies the rds instance id. Changing this will create a new resource.
- name str
- Specifies the username of the db account. Only lowercase letters, digits,
hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.
- If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
- If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
- password str
- Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
- rds_
account_ strid - The resource ID of account which is formatted
<instance_id>/<account_name>
. - region str
- Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
- timeouts
Rds
Account Timeouts Args
- description String
- Specifies remarks of the DB account.
- hosts List<String>
- Specifies the IP addresses that are allowed to access your DB instance.
- instance
Id String - Specifies the rds instance id. Changing this will create a new resource.
- name String
- Specifies the username of the db account. Only lowercase letters, digits,
hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.
- If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
- If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
- password String
- Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
- rds
Account StringId - The resource ID of account which is formatted
<instance_id>/<account_name>
. - region String
- Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
- timeouts Property Map
Supporting Types
RdsAccountTimeouts, RdsAccountTimeoutsArgs
Import
RDS account can be imported using the instance id
and account name
, e.g.:
$ pulumi import flexibleengine:index/rdsAccount:RdsAccount user_1 instance_id/account_name
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.