nuage.aws.ServerlessDatabase
Explore with Pulumi AI
The ServerlessDatabase component is a convenient and efficient solution for creating serverless databases using Amazon RDS Aurora. It automatically creates components such as subnet group, security group, security group rules, and RDS cluster, and securely manages the DB credentials. With support for both MySQL and PostgreSQL, it provides a fully configured serverless database resource for your serverless database needs.
Example Usage
Basic Example
Coming soon!
Coming soon!
Coming soon!
import pulumi_nuage as nuage
import pulumi_awsx as awsx
db = nuage.aws.ServerlessDatabase(
"foo",
name="serverless-db",
vpc_id=vpc.id,
subnet_ids=vpc.private_subnet_ids,
database_type="mysql",
database_name="bar",
master_username="root",
ip_whitelist=["0.0.0.0/0"],
skip_final_snapshot=True,
bastion=nuage.aws.BastionConfigArgs(
enabled=True,
subnet_id=vpc.public_subnet_ids[0]
),
)
Coming soon!
Coming soon!
Create ServerlessDatabase Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServerlessDatabase(name: string, args: ServerlessDatabaseArgs, opts?: CustomResourceOptions);
@overload
def ServerlessDatabase(resource_name: str,
args: ServerlessDatabaseArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServerlessDatabase(resource_name: str,
opts: Optional[ResourceOptions] = None,
database_name: Optional[str] = None,
database_type: Optional[str] = None,
master_user_name: Optional[str] = None,
subnet_ids: Optional[Sequence[str]] = None,
vpc_id: Optional[str] = None,
bastion: Optional[BastionConfigArgs] = None,
ip_whitelist: Optional[Sequence[str]] = None,
skip_final_snapshot: Optional[bool] = None)
func NewServerlessDatabase(ctx *Context, name string, args ServerlessDatabaseArgs, opts ...ResourceOption) (*ServerlessDatabase, error)
public ServerlessDatabase(string name, ServerlessDatabaseArgs args, CustomResourceOptions? opts = null)
public ServerlessDatabase(String name, ServerlessDatabaseArgs args)
public ServerlessDatabase(String name, ServerlessDatabaseArgs args, CustomResourceOptions options)
type: nuage:aws:ServerlessDatabase
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 ServerlessDatabaseArgs
- 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 ServerlessDatabaseArgs
- 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 ServerlessDatabaseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerlessDatabaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServerlessDatabaseArgs
- 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 serverlessDatabaseResource = new Nuage.Aws.ServerlessDatabase("serverlessDatabaseResource", new()
{
DatabaseName = "string",
DatabaseType = "string",
MasterUserName = "string",
SubnetIds = new[]
{
"string",
},
VpcId = "string",
Bastion = new Nuage.Aws.Inputs.BastionConfigArgs
{
Enabled = false,
SubnetId = "string",
},
IpWhitelist = new[]
{
"string",
},
SkipFinalSnapshot = false,
});
example, err := aws.NewServerlessDatabase(ctx, "serverlessDatabaseResource", &aws.ServerlessDatabaseArgs{
DatabaseName: pulumi.String("string"),
DatabaseType: pulumi.String("string"),
MasterUserName: pulumi.String("string"),
SubnetIds: pulumi.StringArray{
pulumi.String("string"),
},
VpcId: pulumi.String("string"),
Bastion: &aws.BastionConfigArgs{
Enabled: pulumi.Bool(false),
SubnetId: pulumi.String("string"),
},
IpWhitelist: pulumi.StringArray{
pulumi.String("string"),
},
SkipFinalSnapshot: pulumi.Bool(false),
})
var serverlessDatabaseResource = new ServerlessDatabase("serverlessDatabaseResource", ServerlessDatabaseArgs.builder()
.databaseName("string")
.databaseType("string")
.masterUserName("string")
.subnetIds("string")
.vpcId("string")
.bastion(BastionConfigArgs.builder()
.enabled(false)
.subnetId("string")
.build())
.ipWhitelist("string")
.skipFinalSnapshot(false)
.build());
serverless_database_resource = nuage.aws.ServerlessDatabase("serverlessDatabaseResource",
database_name="string",
database_type="string",
master_user_name="string",
subnet_ids=["string"],
vpc_id="string",
bastion=nuage.aws.BastionConfigArgs(
enabled=False,
subnet_id="string",
),
ip_whitelist=["string"],
skip_final_snapshot=False)
const serverlessDatabaseResource = new nuage.aws.ServerlessDatabase("serverlessDatabaseResource", {
databaseName: "string",
databaseType: "string",
masterUserName: "string",
subnetIds: ["string"],
vpcId: "string",
bastion: {
enabled: false,
subnetId: "string",
},
ipWhitelist: ["string"],
skipFinalSnapshot: false,
});
type: nuage:aws:ServerlessDatabase
properties:
bastion:
enabled: false
subnetId: string
databaseName: string
databaseType: string
ipWhitelist:
- string
masterUserName: string
skipFinalSnapshot: false
subnetIds:
- string
vpcId: string
ServerlessDatabase 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 ServerlessDatabase resource accepts the following input properties:
- Database
Name string - Name of the database.
- Database
Type string - Database type.
mysql
orpostgresql
- Master
User stringName - Master user name of the db.
- Subnet
Ids List<string> - List of subnet ip addresses. If you want your database will be accessible from the internet, it should be public (
vpc.public_subnet_ids
). Otherwise, you can use private subnets (vpc.private_subnet_ids
). - Vpc
Id string - Vpc id.
- Bastion
Bastion
Config - Configure the bastion host for connecting the db.
- Ip
Whitelist List<string> - List of whitelisted IP addresses. If not specified, it will be public 0.0.0.0/0
- Skip
Final boolSnapshot - Determines whether a final DB snapshot is created before the DB instance is deleted. Defaults to
false
- Database
Name string - Name of the database.
- Database
Type string - Database type.
mysql
orpostgresql
- Master
User stringName - Master user name of the db.
- Subnet
Ids []string - List of subnet ip addresses. If you want your database will be accessible from the internet, it should be public (
vpc.public_subnet_ids
). Otherwise, you can use private subnets (vpc.private_subnet_ids
). - Vpc
Id string - Vpc id.
- Bastion
Bastion
Config Args - Configure the bastion host for connecting the db.
- Ip
Whitelist []string - List of whitelisted IP addresses. If not specified, it will be public 0.0.0.0/0
- Skip
Final boolSnapshot - Determines whether a final DB snapshot is created before the DB instance is deleted. Defaults to
false
- database
Name String - Name of the database.
- database
Type String - Database type.
mysql
orpostgresql
- master
User StringName - Master user name of the db.
- subnet
Ids List<String> - List of subnet ip addresses. If you want your database will be accessible from the internet, it should be public (
vpc.public_subnet_ids
). Otherwise, you can use private subnets (vpc.private_subnet_ids
). - vpc
Id String - Vpc id.
- bastion
Bastion
Config - Configure the bastion host for connecting the db.
- ip
Whitelist List<String> - List of whitelisted IP addresses. If not specified, it will be public 0.0.0.0/0
- skip
Final BooleanSnapshot - Determines whether a final DB snapshot is created before the DB instance is deleted. Defaults to
false
- database
Name string - Name of the database.
- database
Type string - Database type.
mysql
orpostgresql
- master
User stringName - Master user name of the db.
- subnet
Ids string[] - List of subnet ip addresses. If you want your database will be accessible from the internet, it should be public (
vpc.public_subnet_ids
). Otherwise, you can use private subnets (vpc.private_subnet_ids
). - vpc
Id string - Vpc id.
- bastion
Bastion
Config - Configure the bastion host for connecting the db.
- ip
Whitelist string[] - List of whitelisted IP addresses. If not specified, it will be public 0.0.0.0/0
- skip
Final booleanSnapshot - Determines whether a final DB snapshot is created before the DB instance is deleted. Defaults to
false
- database_
name str - Name of the database.
- database_
type str - Database type.
mysql
orpostgresql
- master_
user_ strname - Master user name of the db.
- subnet_
ids Sequence[str] - List of subnet ip addresses. If you want your database will be accessible from the internet, it should be public (
vpc.public_subnet_ids
). Otherwise, you can use private subnets (vpc.private_subnet_ids
). - vpc_
id str - Vpc id.
- bastion
Bastion
Config Args - Configure the bastion host for connecting the db.
- ip_
whitelist Sequence[str] - List of whitelisted IP addresses. If not specified, it will be public 0.0.0.0/0
- skip_
final_ boolsnapshot - Determines whether a final DB snapshot is created before the DB instance is deleted. Defaults to
false
- database
Name String - Name of the database.
- database
Type String - Database type.
mysql
orpostgresql
- master
User StringName - Master user name of the db.
- subnet
Ids List<String> - List of subnet ip addresses. If you want your database will be accessible from the internet, it should be public (
vpc.public_subnet_ids
). Otherwise, you can use private subnets (vpc.private_subnet_ids
). - vpc
Id String - Vpc id.
- bastion Property Map
- Configure the bastion host for connecting the db.
- ip
Whitelist List<String> - List of whitelisted IP addresses. If not specified, it will be public 0.0.0.0/0
- skip
Final BooleanSnapshot - Determines whether a final DB snapshot is created before the DB instance is deleted. Defaults to
false
Outputs
All input properties are implicitly available as output properties. Additionally, the ServerlessDatabase resource produces the following output properties:
- Cluster_
arn string - ARN (Amazon Resource Name) of the RDS cluster.
- Database_
name string - Name of the database
- Host string
- Host address of DB server
- Port double
- Port number of DB
- Uri string
- Database URI for connection.
- User string
- Username of DB credentials.
- Bastion_
ip string - IP address of the bastion host. Exists only if bastion is enabled
- Bastion_
private_ stringkey - Private key to connect bastion host over SSH. Exists only if bastion is enabled.
- Password string
- Password of DB credentials
- Cluster_
arn string - ARN (Amazon Resource Name) of the RDS cluster.
- Database_
name string - Name of the database
- Host string
- Host address of DB server
- Port float64
- Port number of DB
- Uri string
- Database URI for connection.
- User string
- Username of DB credentials.
- Bastion_
ip string - IP address of the bastion host. Exists only if bastion is enabled
- Bastion_
private_ stringkey - Private key to connect bastion host over SSH. Exists only if bastion is enabled.
- Password string
- Password of DB credentials
- cluster_
arn String - ARN (Amazon Resource Name) of the RDS cluster.
- database_
name String - Name of the database
- host String
- Host address of DB server
- port Double
- Port number of DB
- uri String
- Database URI for connection.
- user String
- Username of DB credentials.
- bastion_
ip String - IP address of the bastion host. Exists only if bastion is enabled
- bastion_
private_ Stringkey - Private key to connect bastion host over SSH. Exists only if bastion is enabled.
- password String
- Password of DB credentials
- cluster_
arn string - ARN (Amazon Resource Name) of the RDS cluster.
- database_
name string - Name of the database
- host string
- Host address of DB server
- port number
- Port number of DB
- uri string
- Database URI for connection.
- user string
- Username of DB credentials.
- bastion_
ip string - IP address of the bastion host. Exists only if bastion is enabled
- bastion_
private_ stringkey - Private key to connect bastion host over SSH. Exists only if bastion is enabled.
- password string
- Password of DB credentials
- cluster_
arn str - ARN (Amazon Resource Name) of the RDS cluster.
- database_
name str - Name of the database
- host str
- Host address of DB server
- port float
- Port number of DB
- uri str
- Database URI for connection.
- user str
- Username of DB credentials.
- bastion_
ip str - IP address of the bastion host. Exists only if bastion is enabled
- bastion_
private_ strkey - Private key to connect bastion host over SSH. Exists only if bastion is enabled.
- password str
- Password of DB credentials
- cluster_
arn String - ARN (Amazon Resource Name) of the RDS cluster.
- database_
name String - Name of the database
- host String
- Host address of DB server
- port Number
- Port number of DB
- uri String
- Database URI for connection.
- user String
- Username of DB credentials.
- bastion_
ip String - IP address of the bastion host. Exists only if bastion is enabled
- bastion_
private_ Stringkey - Private key to connect bastion host over SSH. Exists only if bastion is enabled.
- password String
- Password of DB credentials
Supporting Types
BastionConfig, BastionConfigArgs
Package Details
- Repository
- nuage
- License
- Apache-2.0