Relational Database
This example shows a basic relational database configuration.
Relational (SQL) database resource
- Fully managed relational databases (Postgres, MySQL, MariaDb, etc.) with support for clustering, failover & more.
Basic example
resources:myRelationalDatabase:type: relational-databaseproperties:# Configures credentials for the database master user## - Credentials for master user can be used to connect to the database.# - Master user credentials are used in database `connectionString` (URL).## - Type: object# - Required: truecredentials:# Password of the database master user## - Password protects the database from unauthorized access to your database.# - Due to password being part of database `connectionString` (URL), it should not contain following characters: `[]{}(),;?*=!@`# - We recommend to store password as [secret](https://docs.stacktape.com/security-resources/secrets/)# and reference the secret using [$Secret](https://docs.stacktape.com/configuration/directives/#secret) directive to avoid secret being exposed in the config.## - Type: string# - Required: truemasterUserPassword: $Secret(database_password)# Username of the database master user## - This name will be used for the main admin user in your database.# - Due to name being part of database `connectionString` (URL), it should not contain following characters: `[]{}(),;?*=!@`# - You can use this name for connecting to the database.## > Changing this parameter after database was created will cause database replacement and data loss## - By default this `db_master_user` is used## - Type: string# - Required: false# - Default: db_master_usermasterUserName: admin# Configures the underlying database engine and its properties## Database engine determines the properties of your database, such as database type (PostgreSQL, MySQL...), number of instances, high availability capabilities, redundancy,# performance, scaling behavior, pricing etc.## Depending on the properties they provide, we group engine types into following groups:## **Rds Engine** group# - To use the RDS engine, set the `engine.type` property to `postgres`, `mysql`, `mariadb`, `oracle-ee`, `oracle-se2`, `sqlserver-ee`, `sqlserver-ex`, `sqlserver-se` or `sqlserver-web`.# - Fully managed single-node database engines.# - Configurable read replicas (additional parallelly-running, automatically-replicated instances used for read operations).## **Aurora Engine** group# - To use the Aurora engine, set the `engine.type` property to `aurora-postgresql` or `aurora-mysql`.# - Fully-managed AWS-developed engines (based on and compatible with either PostgreSQL or MySQL) with clustering support, high-availability, increased durability & performance.# - Compute instances (nodes) run across multiple Availability Zones. Storage is automatically replicated 6-ways across 3# availability zones.# - Automatically load-balances read operations between nodes.# - Automatic failover - if a primary instance fails, one of the read replicas is elected as a new primary instance.# - To learn more about Aurora Engines, refer to [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)## **Aurora Serverless Engine** group# ># > We recommend using newer Aurora **Aurora Serverless V2 Engines** instead of this one.# ># - To use the Aurora engine, set the `engine.type` property to `aurora-postgresql-serverless` or `aurora-mysql-serverless`.# - Fully-managed AWS-developed engines (based on and compatible with either PostgreSQL or MySQL) with high-availability, increased durability & performance.# - Supported engines: `aurora-postgresql-serverless`, `aurora-mysql-serverless`.# - Similar to Aurora Engines, but automatically scales based on usage.# - Scaling is done using ACUs (Aurora Compute units). Each ACU has ~2GB of RAM and 1 virtual CPU.# - Can scale to 0 ACUs (database is paused, and you don't pay anything).# - To learn more about Aurora Engines, refer to [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)## **Aurora Serverless V2 Engine** group# - To use the Aurora engine, set the `engine.type` property to `aurora-postgresql-serverless-v2` or `aurora-mysql-serverless-v2`.# - Fully-managed AWS-developed engines (based on and compatible with either PostgreSQL or MySQL) with high-availability, increased durability & performance.# - Supported engines: `aurora-postgresql-serverless-v2`, `aurora-mysql-serverless-v2`.# - Similar to Aurora Serverless Engines, but is more responsive, more granular, and less disruptive when scaling.# - Scaling is done using ACUs (Aurora Compute units). Each ACU has ~2GB of RAM and 1 virtual CPU.# - Can scale to 0 ACUs (database is paused, and you don't pay anything).# - To learn more about Aurora Engines, refer to [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)## - Type: union (anyOf)# - Required: true## - Type: object# - Required: trueengine:## - Type: enum: [aurora-mysql-serverless, aurora-postgresql-serverless]# - Required: true# - Allowed values: [aurora-mysql-serverless, aurora-postgresql-serverless]type: aurora-mysql-serverless## - Type: object# - Required: falseproperties:# Version of the database## - You do not need to specify version when using serverless engine, since for serverless engines only one version is supported at any given time.# - AWS automatically applies minor and security updates to this version.# - To see the full list of versions for each specific engine refer to our [docs](https://docs.stacktape.com/database-resources/relational-databases/#engine-version)## - Type: string# - Required: falseversion: 1.0.0# Configures the name of the default database in the database cluster## By default, a database with name **defdb** is created.## - Type: string# - Required: falsedbName: myDbName# The minimum capacity units the database can scale down to## - Serverless databases use ACUs (or Aurora Capacity Units) to measure database capacity.# Each ACU has approximately 2 GB of memory with corresponding CPU and networking resources.# - Allowed values:# - For **aurora-mysql-serverless**: `1`, `2`, `4`, `8`, `16`, `32`, `64`, `128`, and `256`.# - For **aurora-postgres-serverless**: `2`, `4`, `8`, `16`, `32`, `64`, `128`, and `256`.## - Type: number# - Required: false# - Default: 2minCapacity: 2# The maximum capacity units the database can scale up to## - Serverless databases use ACUs (or Aurora Capacity Units) to measure database capacity.# Each ACU has approximately 2 GB of memory with corresponding CPU and networking resources.# - Allowed values:# - For **aurora-mysql-serverless**: `1`, `2`, `4`, `8`, `16`, `32`, `64`, `128`, and `256`.# - For **aurora-postgres-serverless**: `2`, `4`, `8`, `16`, `32`, `64`, `128`, and `256`.## - Type: number# - Required: false# - Default: 4maxCapacity: 4# Time in seconds after the idle serverless database is paused## - Database is considered idle when it has no active connections.# - By default, the database is never paused (it is kept at minimal capacity).# - Allowed values are between `300` (5 minutes) and `86400` (24 hours).## - Type: number# - Required: falsepauseAfterSeconds: 100# Specifies whether minor engine upgrades are applied automatically to the DB## - By default, minor upgrades are applied automatically## - Type: boolean# - Required: false# - Default: falsedisableAutoMinorVersionUpgrade: false# Configures the level of accessibility of the database## - Use this property if you wish to restrict access to the database.# - By default, the database is accessible from anywhere on the internet (but still protected using credentials).## - Type: object# - Required: falseaccessibility:# Configures the accessibility mode for this database## The following modes are supported:# - **internet** - Least restrictive mode. The database can be accessed from anywhere on the internet.# - **vpc** - The database can be accessed only from resources within the same VPC. This# means any [function](https://docs.stacktape.com/compute-resources/lambda-functions) (provided it has `joinDefaultVpc` set to true), [batch job](https://docs.stacktape.com/compute-resources/batch-jobs),# [container workload](https://docs.stacktape.com/compute-resources/multi-container-workloads) or any container service within your stack can access the cluster. Additionally, IP addresses configured# in `whitelistedIps` can also access the database (even from the internet). To disable this behavior, and enforce database isolation ONLY# to the VPC, you can set the `forceDisablePublicIp` property.# - **scoping-workloads-in-vpc** - similar to **vpc** mode, but even more restrictive. In addition to being in the same VPC, the resources of the stack# accessing your database must also have sufficient security group permissions (for functions, batch jobs and container services, these permissions# can be granted using `connectTo` in their configuration). Additionally, IP addresses configured in# `whitelistedIps` can also access the database (even from the internet). To disable this behavior, and enforce database isolation,# you can set the `forceDisablePublicIp` property.# - **whitelisted-ips-only** - The database can only be accessed from an IP addresses and CIDR blocks listed in the `whitelistedIps` list.## The `AuroraServerlessEngine` does not support public IPs. Because of that, it only supports `vpc` and `scoping-workloads-in-vpc` modes.# In this case, interacting with your database from you own computer can be complicated. You can do it in 2 ways:# - Use [Aurora Serverless Data Api](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html). Unfortunately, the Data API# isn't a full replacement for a normal database connection and can be slow.# - Use a bastion server. Native support for bastion servers in Stacktape will be available soon.## To learn more about VPCs, refer to [VPC Docs](https://docs.stacktape.com/user-guides/vpcs/).## - Type: enum: [internet, scoping-workloads-in-vpc, vpc, whitelisted-ips-only]# - Required: true# - Default: internet# - Allowed values: [internet, scoping-workloads-in-vpc, vpc, whitelisted-ips-only]accessibilityMode: vpc# Forcefully disables the public (internet) accessibility of the database endpoint## - Used to increase the level of database isolation and to ensure NO connections are coming from outer internet.## > For Aurora engines, you can only set this property during the creation of the database, not during stack(database) update(subsequent deploys).# > Therefore, if you deploy an aurora engine database with# > a public IP, you CAN NOT disable its public IP in a subsequent deploy. Conversely, if the database# > is deployed with `forceDisablePublicIp` set to true, the property cannot be changed in a subsequent deploys.## - Type: boolean# - Required: falseforceDisablePublicIp: false# List of IP addresses or IP ranges (in CIDR format)## The behavior of this property varies based on `accessibilityMode`:# - in the **internet** mode, this property has no effect as the database is are already accessible from everywhere.# - in the **vpc** mode and **scoping-workloads-in-vpc** mode, these IP addresses/ranges can be used to# allow access from a specific addresses outside of the VPC (i.e IP address of your office).# - in the **whitelisted-ips-only** mode, these addresses/ranges are the only addresses that can access the database.## - Type: array<string># - Required: falsewhitelistedIps:- 203.0.113.0/24- 198.51.100.42# Enables database deletion protection## - By default, the database is not deletion-protected.# - To delete a database with `deletionProtection` enabled, you first need to explicitly disable the protection.## - Type: boolean# - Required: falsedeletionProtection: false# Configures how long the database backups will be retained (in days)## - Databases are automatically backed up once a day.# - Maximum retention period is `35` days.# - You can disable automated backups by setting the value to 0 (works only for RDS engines).# - You can also take manual backup snapshots (in the console or using the API). The retention is not applied to manual backups.# - By default, backups are retained for 1 day.# - To learn more about RDS engine backups, refer to# [RDS engine backups AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html).# - To learn more about Aurora engine backups, refer to# [Aurora engine backups AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html).## - Type: number# - Required: false# - Default: 1automatedBackupRetentionDays: 7# Configures the preferred maintenance window for the database## - The maintenance window is the time period during which the database is available for maintenance.# - During this time, your database instance can be updated with modifications like OS patching or database engine version upgrades.# - The database might be unavailable for a short period of time during maintenance. To avoid service interruptions, you should use `multiAz` deployment for RDS engines or use an Aurora engine.# - The maintenance window is **specified in UTC**.# - The maintenance window is specified in the format of `day:time-day:time`. Example: `Sun:02:00-Sun:04:00`# - By default, the maintenance window is set to **Sunday 02:00 - Sunday 04:00** adjusted to the region's timezone (but does not account for daylight savings time). Examples:# - In **us-east-1** the maintenance window is set to **Sunday 07:00 - Sunday 09:00 UTC** which translates to **Sunday 02:00 - Sunday 04:00** in the region's timezone# - In **eu-west-1** the maintenance window is set to **Sunday 01:00 - Sunday 03:00 UTC** which translates to **Sunday 02:00 - Sunday 04:00** in the region's timezone## - Type: string# - Required: falsepreferredMaintenanceWindow: Sun:02:00-Sun:04:00# Configures logging behavior for the database## - By default, logging is enabled and logs are preserved for `90` days.# - Logged data depend on the used `engine`. You can log information about connections, disconnections,# executed queries & much more.## - Type: object# - Required: falselogging:# Disables the collection of database server logs to CloudWatch## - Type: boolean# - Required: false# - Default: falsedisabled: false# Amount of days the logs will be retained in the log group## - Type: enum: [1, 120, 14, 150, 180, 1827, 3, 30, 365, 3653, 400, 5, 545, 60, 7, 731, 90]# - Required: false# - Default: 90# - Allowed values: [1, 120, 14, 150, 180, 1827, 3, 30, 365, 3653, 400, 5, 545, 60, 7, 731, 90]retentionDays: 90# Log types which are captured and exported into log groups## For different database engines, different log types can be collected:# - `postgres`, `aurora-postgresql`, `aurora-postgresql-serverless`# - allowed log types: [**postgresql**]# - default log types: [**postgresql**]# - you can further specify which logs should be included in **postgresql** logs by using `engineSpecificOptions` property# - `mysql`, `aurora-mysql`, `aurora-mysql-serverless`, `mariadb`# - allowed log types: [**audit**, **error**, **general**, **slowquery**]# - default log types: [**audit**, **error**, **slowquery**]# - you can further specify which logs should be included in **audit** and **slowquery** logs by using `engineSpecificOptions` property# - `oracle-ee`, `oracle-se2`# - allowed log types: [**alert**, **audit**, **listener**, **trace**]# - default log types: [**alert**, **listener**]# - `sqlserver-se`, `sqlserver-web`# - allowed log types: [**agent**, **error**]# - default log types: [**agent**, **error**]# - `sqlserver-ex`# - allowed log types: [**error**]# - default log types: [**error**]## - Type: array<string># - Required: falselogTypes:- example-value# Configures engine-specific log options## - Currently, only the following engines support engine specific log options: `postgres`, `aurora-postgresql`,# `aurora-postgresql-serverless`, `mysql`, `aurora-mysql`, `aurora-mysql-serverless`, `mariadb`## - Type: union (anyOf)# - Required: false## - Type: object# - Required: falseengineSpecificOptions:# If set to true, database logs all new client connection details## - Type: boolean# - Required: false# - Default: falselog_connections: false# If set to true, database logs all client disconnections## - Type: boolean# - Required: false# - Default: falselog_disconnections: false# If set to true, database logs sessions that are stuck in a locked state## Helps determine if session locking is causing a performance issue.## - Type: boolean# - Required: false# - Default: falselog_lock_waits: false# Sets time threshold for logging statements. Every statement exceeding specified time will be logged.## - `-1` disables this feature# - `0` all statements are logged (because threshold is set to 0)# - any positive number specifies amount of ms (milliseconds). if statement takes more more than this amount of ms, it is logged.# - helpful when optimizing slow queries in your database.## - Type: number# - Required: false# - Default: 10000log_min_duration_statement: 10000# Controls which sql statements are logged by default## - "none" - No statements are logged.# - "ddl" - Logs all DDL statements (CREATE, ALTER, and so on).# - "mod" - Logs all DDL statements + INSERT, UPDATE, and DELETE statements.# - "all" - Logs all statements.## - Type: enum: [all, ddl, mod, none]# - Required: false# - Default: ddl# - Allowed values: [all, ddl, mod, none]log_statement: ddl# Configures forwarding of logs to specified destination## - Log forwarding is done using [Amazon Kinesis Data Firehose](https://aws.amazon.com/kinesis/data-firehose/) delivery stream.# - When using log forwarding, you will incur costs based on the amount of data being transferred to the destination (~$0.03 per transferred GB).# Refer to [AWS Kinesis Firehose Pricing](https://aws.amazon.com/kinesis/data-firehose/pricing/?nc=sn&loc=3) page to see details.# - Currently supported destinations for logs:# - `http-endpoint`# - delivers logs to any HTTP endpoint.# - The endpoint must follow [Firehose request and response specifications](https://docs.aws.amazon.com/firehose/latest/dev/httpdeliveryrequestresponse.html).# (Many of the third party vendors are compliant with this specifications out of the box.)# - `datadog`# - delivers logs to [Datadog](https://www.datadoghq.com/).# - `highlight`# - delivers logs to [Highlight.io](https://www.highlight.io/) project.## Refer to [our docs](https://docs.stacktape.com/configuration/log-forwarding/) for more information.## > Logs that fail to be delivered to the destination even after multiple retries (time spend on retries can be configured) are put into bucket with name `{stackName}-{resourceName}-logs-{generatedHash}`## - Type: union (anyOf)# - Required: false## - Type: object# - Required: falselogForwarding:## - Type: string# - Required: truetype: http-endpoint## - Type: object# - Required: trueproperties:# HTTPS endpoint where logs will be forwarded## - Type: string# - Required: trueendpointUrl: https://example.com# Specifies whether to use GZIP compression for the request## - When enabled, Firehose uses the content encoding to compress the body of a request before sending the request to the destination## - Type: boolean# - Required: falsegzipEncodingEnabled: true# Parameters included in each call to HTTP endpoint## - Key/Value pairs containing additional metadata you wish to send to the HTTP endpoint.# - Parameters are delivered within **X-Amz-Firehose-Common-Attributes** header as a JSON object with following format: `{"commonAttributes":{"param1":"val1", "param2":"val2"}}`## - Type: object# - Required: false# Amount of time spend on retries.## - The total amount of time that Kinesis Data Firehose spends on retries.# - This duration starts after the initial attempt to send data to the custom destination via HTTPS endpoint fails.# - Logs that fail to be delivered to the HTTP endpoint even after multiple retries (time spend on retries can be configured) are put into bucket with name `{stackName}-{resourceName}-logs-{generatedHash}`## - Type: number# - Required: falseretryDuration: 100# Access key (credentials), needed for authenticating with endpoint## - Access key is carried within a **X-Amz-Firehose-Access-Key** header# - The configured key is copied verbatim into the value of this header.The contents can be arbitrary and can potentially represent a JWT token or an ACCESS_KEY.# - It is recommended to use [secret](https://docs.stacktape.com/resources/secrets/) for storing your access key.## - Type: string# - Required: falseaccessKey: example-value
Engine alternatives
aurora-serverless-engine
This example shows how to configure engine using aurora-serverless-engine.
resources:myRelationalDatabase:type: relational-databaseproperties:# Configures the underlying database engine and its properties## Database engine determines the properties of your database, such as database type (PostgreSQL, MySQL...), number of instances, high availability capabilities, redundancy,# performance, scaling behavior, pricing etc.## Depending on the properties they provide, we group engine types into following groups:## **Rds Engine** group# - To use the RDS engine, set the `engine.type` property to `postgres`, `mysql`, `mariadb`, `oracle-ee`, `oracle-se2`, `sqlserver-ee`, `sqlserver-ex`, `sqlserver-se` or `sqlserver-web`.# - Fully managed single-node database engines.# - Configurable read replicas (additional parallelly-running, automatically-replicated instances used for read operations).## **Aurora Engine** group# - To use the Aurora engine, set the `engine.type` property to `aurora-postgresql` or `aurora-mysql`.# - Fully-managed AWS-developed engines (based on and compatible with either PostgreSQL or MySQL) with clustering support, high-availability, increased durability & performance.# - Compute instances (nodes) run across multiple Availability Zones. Storage is automatically replicated 6-ways across 3# availability zones.# - Automatically load-balances read operations between nodes.# - Automatic failover - if a primary instance fails, one of the read replicas is elected as a new primary instance.# - To learn more about Aurora Engines, refer to [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)## **Aurora Serverless Engine** group# ># > We recommend using newer Aurora **Aurora Serverless V2 Engines** instead of this one.# ># - To use the Aurora engine, set the `engine.type` property to `aurora-postgresql-serverless` or `aurora-mysql-serverless`.# - Fully-managed AWS-developed engines (based on and compatible with either PostgreSQL or MySQL) with high-availability, increased durability & performance.# - Supported engines: `aurora-postgresql-serverless`, `aurora-mysql-serverless`.# - Similar to Aurora Engines, but automatically scales based on usage.# - Scaling is done using ACUs (Aurora Compute units). Each ACU has ~2GB of RAM and 1 virtual CPU.# - Can scale to 0 ACUs (database is paused, and you don't pay anything).# - To learn more about Aurora Engines, refer to [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)## **Aurora Serverless V2 Engine** group# - To use the Aurora engine, set the `engine.type` property to `aurora-postgresql-serverless-v2` or `aurora-mysql-serverless-v2`.# - Fully-managed AWS-developed engines (based on and compatible with either PostgreSQL or MySQL) with high-availability, increased durability & performance.# - Supported engines: `aurora-postgresql-serverless-v2`, `aurora-mysql-serverless-v2`.# - Similar to Aurora Serverless Engines, but is more responsive, more granular, and less disruptive when scaling.# - Scaling is done using ACUs (Aurora Compute units). Each ACU has ~2GB of RAM and 1 virtual CPU.# - Can scale to 0 ACUs (database is paused, and you don't pay anything).# - To learn more about Aurora Engines, refer to [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)## - Type: object# - Required: trueengine:## - Type: enum: [aurora-mysql-serverless, aurora-postgresql-serverless]# - Required: true# - Allowed values: [aurora-mysql-serverless, aurora-postgresql-serverless]type: aurora-mysql-serverless## - Type: object# - Required: falseproperties:# Version of the database## - You do not need to specify version when using serverless engine, since for serverless engines only one version is supported at any given time.# - AWS automatically applies minor and security updates to this version.# - To see the full list of versions for each specific engine refer to our [docs](https://docs.stacktape.com/database-resources/relational-databases/#engine-version)## - Type: string# - Required: falseversion: 1.0.0# Configures the name of the default database in the database cluster## By default, a database with name **defdb** is created.## - Type: string# - Required: falsedbName: myDbName# The minimum capacity units the database can scale down to## - Serverless databases use ACUs (or Aurora Capacity Units) to measure database capacity.# Each ACU has approximately 2 GB of memory with corresponding CPU and networking resources.# - Allowed values:# - For **aurora-mysql-serverless**: `1`, `2`, `4`, `8`, `16`, `32`, `64`, `128`, and `256`.# - For **aurora-postgres-serverless**: `2`, `4`, `8`, `16`, `32`, `64`, `128`, and `256`.## - Type: number# - Required: false# - Default: 2minCapacity: 2# The maximum capacity units the database can scale up to## - Serverless databases use ACUs (or Aurora Capacity Units) to measure database capacity.# Each ACU has approximately 2 GB of memory with corresponding CPU and networking resources.# - Allowed values:# - For **aurora-mysql-serverless**: `1`, `2`, `4`, `8`, `16`, `32`, `64`, `128`, and `256`.# - For **aurora-postgres-serverless**: `2`, `4`, `8`, `16`, `32`, `64`, `128`, and `256`.## - Type: number# - Required: false# - Default: 4maxCapacity: 4# Time in seconds after the idle serverless database is paused## - Database is considered idle when it has no active connections.# - By default, the database is never paused (it is kept at minimal capacity).# - Allowed values are between `300` (5 minutes) and `86400` (24 hours).## - Type: number# - Required: falsepauseAfterSeconds: 100# Specifies whether minor engine upgrades are applied automatically to the DB## - By default, minor upgrades are applied automatically## - Type: boolean# - Required: false# - Default: falsedisableAutoMinorVersionUpgrade: false
rds-engine
This example shows how to configure engine using rds-engine.
resources:myRelationalDatabase:type: relational-databaseproperties:# Configures the underlying database engine and its properties## Database engine determines the properties of your database, such as database type (PostgreSQL, MySQL...), number of instances, high availability capabilities, redundancy,# performance, scaling behavior, pricing etc.## Depending on the properties they provide, we group engine types into following groups:## **Rds Engine** group# - To use the RDS engine, set the `engine.type` property to `postgres`, `mysql`, `mariadb`, `oracle-ee`, `oracle-se2`, `sqlserver-ee`, `sqlserver-ex`, `sqlserver-se` or `sqlserver-web`.# - Fully managed single-node database engines.# - Configurable read replicas (additional parallelly-running, automatically-replicated instances used for read operations).## **Aurora Engine** group# - To use the Aurora engine, set the `engine.type` property to `aurora-postgresql` or `aurora-mysql`.# - Fully-managed AWS-developed engines (based on and compatible with either PostgreSQL or MySQL) with clustering support, high-availability, increased durability & performance.# - Compute instances (nodes) run across multiple Availability Zones. Storage is automatically replicated 6-ways across 3# availability zones.# - Automatically load-balances read operations between nodes.# - Automatic failover - if a primary instance fails, one of the read replicas is elected as a new primary instance.# - To learn more about Aurora Engines, refer to [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)## **Aurora Serverless Engine** group# ># > We recommend using newer Aurora **Aurora Serverless V2 Engines** instead of this one.# ># - To use the Aurora engine, set the `engine.type` property to `aurora-postgresql-serverless` or `aurora-mysql-serverless`.# - Fully-managed AWS-developed engines (based on and compatible with either PostgreSQL or MySQL) with high-availability, increased durability & performance.# - Supported engines: `aurora-postgresql-serverless`, `aurora-mysql-serverless`.# - Similar to Aurora Engines, but automatically scales based on usage.# - Scaling is done using ACUs (Aurora Compute units). Each ACU has ~2GB of RAM and 1 virtual CPU.# - Can scale to 0 ACUs (database is paused, and you don't pay anything).# - To learn more about Aurora Engines, refer to [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)## **Aurora Serverless V2 Engine** group# - To use the Aurora engine, set the `engine.type` property to `aurora-postgresql-serverless-v2` or `aurora-mysql-serverless-v2`.# - Fully-managed AWS-developed engines (based on and compatible with either PostgreSQL or MySQL) with high-availability, increased durability & performance.# - Supported engines: `aurora-postgresql-serverless-v2`, `aurora-mysql-serverless-v2`.# - Similar to Aurora Serverless Engines, but is more responsive, more granular, and less disruptive when scaling.# - Scaling is done using ACUs (Aurora Compute units). Each ACU has ~2GB of RAM and 1 virtual CPU.# - Can scale to 0 ACUs (database is paused, and you don't pay anything).# - To learn more about Aurora Engines, refer to [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)## - Type: object# - Required: trueengine:## - Type: enum: [mariadb, mysql, oracle-ee, oracle-se2, postgres, sqlserver-ee, sqlserver-ex, sqlserver-se, sqlserver-web]# - Required: true# - Allowed values: [mariadb, mysql, oracle-ee, oracle-se2, postgres, sqlserver-ee, sqlserver-ex, sqlserver-se, sqlserver-web]type: mariadb## - Type: object# - Required: trueproperties:# Configures the primary database instance## - Primary instance is the main database instance that handles read and write operations.# - Primary instance is the only instance that can be used for writes (replicas can only be used for reads).# - Use this property to specify `instanceSize` or enable `multiAz` deployment of your primary instance.## - Type: object# - Required: trueprimaryInstance:# Database instance size## - Allows you to choose the database instance size. Each instance size offers different combination# of CPU, memory, storage, and networking capacity.# - To see a list of available instances, refer to [AWS docs](https://aws.amazon.com/rds/instance-types/)## > - Not every instance size is supported for every database engine, version or region.# > - Be aware that some instance families (such as t3 or t4) are mostly meant for testing and not production workloads# > - Refer to [AWS Docs](https://aws.amazon.com/rds/pricing/) for detailed breakdown of supported combinations.## - Type: string# - Required: trueinstanceSize: example-value# Specifies whether the database instance is deployed to multiple Availability Zones## - When enabled, the data is replicated to a standby instance in a different AZ (Availability Zone).# - If the default (primary) instance fails, the failover to the standby instance in another AZ is performed.# - The failover to the standby instance is synchronous (highly durable).# - The standby instance can not be directly accessed (doesn't have its own database endpoint).# - In contrast to using replicas, standby instance can fully take-over the responsibilities of the# primary instance, while replicas can only be used for read operations.# - Reduces the impact of maintenance. The maintenance is performed on the standby instance first,# promotes the standby instance to a primary instance, and then performs maintenance on the old# primary instance which is now a standby replica.## - Type: boolean# - Required: falsemultiAz: true# Version of the database## - Each engine type supports different engine versions# - To see the full list for each specific engine refer to our [docs](https://docs.stacktape.com/database-resources/relational-databases/#engine-version)# --stp-required--## - Type: string# - Required: trueversion: 1.0.0# Configures the name of the default database in the database cluster## Meaning of this parameter differs based on the database type:# - `mysql`: The name of the database to create when the DB instance is created.# If this parameter is not specified, a database with name **defdb** is created.# - `mariadb`: The name of the database to create when the DB instance is created.# If this parameter is not specified, a database with name **defdb** is created.# - `postgres`: The name of the database to create when the DB instance is created.# If this parameter is not specified, a database with name **defdb** is created.# - `oracle-se2` + `oracle-ee`: The Oracle System ID (SID) of the created DB instance.# If this parameter is not specified, a database with SID **defdb** is created.# - `sqlserver-ee` + `sqlserver-ex` + `sqlserver-se` + `sqlserver-web`: Not applicable. Must be null.## - Type: string# - Required: falsedbName: myDbName# The port on which the database server will accept client connections.## Default values differ based on engine:# - `mysql` + `mariadb`: 3306# - `postgres`: 5432# - `oracle-se2` + `oracle-ee`: 1521# - `sqlserver-ee` + `sqlserver-ex` + `sqlserver-se` + `sqlserver-web`: 1433## - Type: number# - Required: falseport: 3000# Configures the storage (disk size) for the database## - When you run out of free database space, your storage will automatically scale up.# - By default, scales between **20GB** and **200GB**.# - The scaling process happens when the following conditions are met:# - Free available space` is less than 10 percent of the allocated storage# - The low-storage condition lasts at least five minutes.# - At least six hours have passed since the last storage modification.# - To learn more about storage autoscaling, refer to# [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling)## - Type: object# - Required: falsestorage:# Initial amount of storage (disk size in GB) your database will have when created## - Minimum `20`## - Type: number# - Required: false# - Default: 20initialSize: 20# Maximum amount of storage (disk size in GB) your database can scale up to## - If you are running out of the free database space, your storage is automatically scaled up.# - The scaling process happens when the following conditions are met:# - Free available space` is less than 10 percent of the allocated storage# - The low-storage condition lasts at least five minutes.# - At least six hours have passed since the last storage modification.## - To learn more about storage autoscaling, refer to# [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling)## - Type: number# - Required: false# - Default: 200maxSize: 200# List of read replicas (replicas of primary instance)## - Read replicas help to decrease the load on the primary instance by serving a read-only database requests.# - Replication uses database's native asynchronous replication to update the read replicas whenever there is a change to the primary instance.# - Each read replica has its own database endpoint.## - Type: array<object (reference)># - Required: falsereadReplicas:- instanceSize: example-valuemultiAz: true# Specifies whether minor engine upgrades are applied automatically to the DB## - By default, minor upgrades are applied automatically## - Type: boolean# - Required: false# - Default: falsedisableAutoMinorVersionUpgrade: false
aurora-engine
This example shows how to configure engine using aurora-engine.
resources:myRelationalDatabase:type: relational-databaseproperties:# Configures the underlying database engine and its properties## Database engine determines the properties of your database, such as database type (PostgreSQL, MySQL...), number of instances, high availability capabilities, redundancy,# performance, scaling behavior, pricing etc.## Depending on the properties they provide, we group engine types into following groups:## **Rds Engine** group# - To use the RDS engine, set the `engine.type` property to `postgres`, `mysql`, `mariadb`, `oracle-ee`, `oracle-se2`, `sqlserver-ee`, `sqlserver-ex`, `sqlserver-se` or `sqlserver-web`.# - Fully managed single-node database engines.# - Configurable read replicas (additional parallelly-running, automatically-replicated instances used for read operations).## **Aurora Engine** group# - To use the Aurora engine, set the `engine.type` property to `aurora-postgresql` or `aurora-mysql`.# - Fully-managed AWS-developed engines (based on and compatible with either PostgreSQL or MySQL) with clustering support, high-availability, increased durability & performance.# - Compute instances (nodes) run across multiple Availability Zones. Storage is automatically replicated 6-ways across 3# availability zones.# - Automatically load-balances read operations between nodes.# - Automatic failover - if a primary instance fails, one of the read replicas is elected as a new primary instance.# - To learn more about Aurora Engines, refer to [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)## **Aurora Serverless Engine** group# ># > We recommend using newer Aurora **Aurora Serverless V2 Engines** instead of this one.# ># - To use the Aurora engine, set the `engine.type` property to `aurora-postgresql-serverless` or `aurora-mysql-serverless`.# - Fully-managed AWS-developed engines (based on and compatible with either PostgreSQL or MySQL) with high-availability, increased durability & performance.# - Supported engines: `aurora-postgresql-serverless`, `aurora-mysql-serverless`.# - Similar to Aurora Engines, but automatically scales based on usage.# - Scaling is done using ACUs (Aurora Compute units). Each ACU has ~2GB of RAM and 1 virtual CPU.# - Can scale to 0 ACUs (database is paused, and you don't pay anything).# - To learn more about Aurora Engines, refer to [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)## **Aurora Serverless V2 Engine** group# - To use the Aurora engine, set the `engine.type` property to `aurora-postgresql-serverless-v2` or `aurora-mysql-serverless-v2`.# - Fully-managed AWS-developed engines (based on and compatible with either PostgreSQL or MySQL) with high-availability, increased durability & performance.# - Supported engines: `aurora-postgresql-serverless-v2`, `aurora-mysql-serverless-v2`.# - Similar to Aurora Serverless Engines, but is more responsive, more granular, and less disruptive when scaling.# - Scaling is done using ACUs (Aurora Compute units). Each ACU has ~2GB of RAM and 1 virtual CPU.# - Can scale to 0 ACUs (database is paused, and you don't pay anything).# - To learn more about Aurora Engines, refer to [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)## - Type: object# - Required: trueengine:## - Type: enum: [aurora-mysql, aurora-postgresql]# - Required: true# - Allowed values: [aurora-mysql, aurora-postgresql]type: aurora-mysql## - Type: object# - Required: trueproperties:# List of database instances that make up the Aurora cluster## - First instance in this list is by default a primary instance, which can be used for both reads and writes.# - Rest of the instances can be used for reads only.# - Aurora cluster automatically balances read request between all of the instances.# - In a case of a primary instance failure, Aurora cluster selects another instance to be the primary instance.## > It is advised to use same instanceSizes for all instances in the cluster.## - Type: array<object (reference)># - Required: trueinstances:- instanceSize: example-value# Version of the database## - Each engine type supports different engine versions# - To see the full list for each specific engine refer to our [docs](https://docs.stacktape.com/database-resources/relational-databases/#engine-version)# --stp-required--## - Type: string# - Required: trueversion: 1.0.0# Configures the name of the default database in the database cluster## By default, a database with name **defdb** is created.## - Type: string# - Required: falsedbName: myDbName# The port on which the database server will accept connections.## Default values differ based on engine:# - `aurora-mysql`: 3306# - `aurora-postgresql`: 5432## - Type: number# - Required: falseport: 3000# Specifies whether minor engine upgrades are applied automatically to the DB## - By default, minor upgrades are applied automatically## - Type: boolean# - Required: false# - Default: falsedisableAutoMinorVersionUpgrade: false
aurora-serverless-v2-engine
This example shows how to configure engine using aurora-serverless-v2-engine.
resources:myRelationalDatabase:type: relational-databaseproperties:# Configures the underlying database engine and its properties## Database engine determines the properties of your database, such as database type (PostgreSQL, MySQL...), number of instances, high availability capabilities, redundancy,# performance, scaling behavior, pricing etc.## Depending on the properties they provide, we group engine types into following groups:## **Rds Engine** group# - To use the RDS engine, set the `engine.type` property to `postgres`, `mysql`, `mariadb`, `oracle-ee`, `oracle-se2`, `sqlserver-ee`, `sqlserver-ex`, `sqlserver-se` or `sqlserver-web`.# - Fully managed single-node database engines.# - Configurable read replicas (additional parallelly-running, automatically-replicated instances used for read operations).## **Aurora Engine** group# - To use the Aurora engine, set the `engine.type` property to `aurora-postgresql` or `aurora-mysql`.# - Fully-managed AWS-developed engines (based on and compatible with either PostgreSQL or MySQL) with clustering support, high-availability, increased durability & performance.# - Compute instances (nodes) run across multiple Availability Zones. Storage is automatically replicated 6-ways across 3# availability zones.# - Automatically load-balances read operations between nodes.# - Automatic failover - if a primary instance fails, one of the read replicas is elected as a new primary instance.# - To learn more about Aurora Engines, refer to [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)## **Aurora Serverless Engine** group# ># > We recommend using newer Aurora **Aurora Serverless V2 Engines** instead of this one.# ># - To use the Aurora engine, set the `engine.type` property to `aurora-postgresql-serverless` or `aurora-mysql-serverless`.# - Fully-managed AWS-developed engines (based on and compatible with either PostgreSQL or MySQL) with high-availability, increased durability & performance.# - Supported engines: `aurora-postgresql-serverless`, `aurora-mysql-serverless`.# - Similar to Aurora Engines, but automatically scales based on usage.# - Scaling is done using ACUs (Aurora Compute units). Each ACU has ~2GB of RAM and 1 virtual CPU.# - Can scale to 0 ACUs (database is paused, and you don't pay anything).# - To learn more about Aurora Engines, refer to [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)## **Aurora Serverless V2 Engine** group# - To use the Aurora engine, set the `engine.type` property to `aurora-postgresql-serverless-v2` or `aurora-mysql-serverless-v2`.# - Fully-managed AWS-developed engines (based on and compatible with either PostgreSQL or MySQL) with high-availability, increased durability & performance.# - Supported engines: `aurora-postgresql-serverless-v2`, `aurora-mysql-serverless-v2`.# - Similar to Aurora Serverless Engines, but is more responsive, more granular, and less disruptive when scaling.# - Scaling is done using ACUs (Aurora Compute units). Each ACU has ~2GB of RAM and 1 virtual CPU.# - Can scale to 0 ACUs (database is paused, and you don't pay anything).# - To learn more about Aurora Engines, refer to [AWS Docs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)## - Type: object# - Required: trueengine:## - Type: enum: [aurora-mysql-serverless-v2, aurora-postgresql-serverless-v2]# - Required: true# - Allowed values: [aurora-mysql-serverless-v2, aurora-postgresql-serverless-v2]type: aurora-mysql-serverless-v2## - Type: object# - Required: trueproperties:# Version of the database## - Each engine type supports different engine versions# - To see the full list for each specific engine refer to our [docs](https://docs.stacktape.com/database-resources/relational-databases/#engine-version)# --stp-required--## - Type: string# - Required: trueversion: 1.0.0# Configures the name of the default database in the database cluster## By default, a database with name **defdb** is created.## - Type: string# - Required: falsedbName: myDbName# The minimum capacity units the database can scale down to## - Serverless databases use ACUs (or Aurora Capacity Units) to measure database capacity.# Each ACU has approximately 2 GB of memory with corresponding CPU and networking resources.# - Allowed values:# - For **aurora-mysql-serverless**: `1`, `2`, `4`, `8`, `16`, `32`, `64`, `128`, and `256`.# - For **aurora-postgres-serverless**: `2`, `4`, `8`, `16`, `32`, `64`, `128`, and `256`.## - Type: number# - Required: false# - Default: 0minCapacity: 0# The maximum capacity units the database can scale up to## - Serverless databases use ACUs (or Aurora Capacity Units) to measure database capacity.# Each ACU has approximately 2 GB of memory with corresponding CPU and networking resources.# - Allowed values:# - For **aurora-mysql-serverless**: `1`, `2`, `4`, `8`, `16`, `32`, `64`, `128`, and `256`.# - For **aurora-postgres-serverless**: `2`, `4`, `8`, `16`, `32`, `64`, `128`, and `256`.## - Type: number# - Required: false# - Default: 10maxCapacity: 10# Specifies whether minor engine upgrades are applied automatically to the DB## - By default, minor upgrades are applied automatically## - Type: boolean# - Required: false# - Default: falsedisableAutoMinorVersionUpgrade: false
EngineSpecificOptions alternatives
postgres-logging-options
This example shows how to configure enginespecificoptions using postgres-logging-options.
resources:myRelationalDatabase:type: relational-databaseproperties:logging:# Configures engine-specific log options## - Currently, only the following engines support engine specific log options: `postgres`, `aurora-postgresql`,# `aurora-postgresql-serverless`, `mysql`, `aurora-mysql`, `aurora-mysql-serverless`, `mariadb`## - Type: object# - Required: trueengineSpecificOptions:# If set to true, database logs all new client connection details## - Type: boolean# - Required: false# - Default: falselog_connections: false# If set to true, database logs all client disconnections## - Type: boolean# - Required: false# - Default: falselog_disconnections: false# If set to true, database logs sessions that are stuck in a locked state## Helps determine if session locking is causing a performance issue.## - Type: boolean# - Required: false# - Default: falselog_lock_waits: false# Sets time threshold for logging statements. Every statement exceeding specified time will be logged.## - `-1` disables this feature# - `0` all statements are logged (because threshold is set to 0)# - any positive number specifies amount of ms (milliseconds). if statement takes more more than this amount of ms, it is logged.# - helpful when optimizing slow queries in your database.## - Type: number# - Required: false# - Default: 10000log_min_duration_statement: 10000# Controls which sql statements are logged by default## - "none" - No statements are logged.# - "ddl" - Logs all DDL statements (CREATE, ALTER, and so on).# - "mod" - Logs all DDL statements + INSERT, UPDATE, and DELETE statements.# - "all" - Logs all statements.## - Type: enum: [all, ddl, mod, none]# - Required: false# - Default: ddl# - Allowed values: [all, ddl, mod, none]log_statement: ddl
mysql-logging-options
This example shows how to configure enginespecificoptions using mysql-logging-options.
resources:myRelationalDatabase:type: relational-databaseproperties:logging:# Configures engine-specific log options## - Currently, only the following engines support engine specific log options: `postgres`, `aurora-postgresql`,# `aurora-postgresql-serverless`, `mysql`, `aurora-mysql`, `aurora-mysql-serverless`, `mariadb`## - Type: object# - Required: trueengineSpecificOptions:# Types of activity to record in the audit log.## - CONNECT: Log successful and unsuccessful connections to the database, and disconnections from the database.# - QUERY: Log the text of all queries run against the database.# - QUERY_DDL: Similar to the QUERY event, but returns only data definition language (DDL) queries (CREATE, ALTER, and so on).# - QUERY_DML: Similar to the QUERY event, but returns only data manipulation language (DML) queries (INSERT, UPDATE, and so on, and also SELECT).# - QUERY_DML_NO_SELECT: Similar to the QUERY_DML event, but doesn't log SELECT queries.# - QUERY_DCL: Similar to the QUERY event, but returns only data control language (DCL) queries (GRANT, REVOKE, and so on).## - Type: array<string># - Required: false# - Default: [QUERY_DDL]server_audit_events:# Sets time threshold for logging slow statement into slowquery log## - `-1` disables long query logging# - To prevent fast-running queries from being logged in the slow query log, specify a value for the shortest query run time to be logged, in seconds.# - helpful when optimizing slow queries in your database.# - log are sent into `slowquery` log type group## - Type: number# - Required: false# - Default: 10long_query_time: 10
LogForwarding alternatives
http-endpoint
This example shows how to configure logforwarding using http-endpoint.
resources:myRelationalDatabase:type: relational-databaseproperties:logging:# Configures forwarding of logs to specified destination## - Log forwarding is done using [Amazon Kinesis Data Firehose](https://aws.amazon.com/kinesis/data-firehose/) delivery stream.# - When using log forwarding, you will incur costs based on the amount of data being transferred to the destination (~$0.03 per transferred GB).# Refer to [AWS Kinesis Firehose Pricing](https://aws.amazon.com/kinesis/data-firehose/pricing/?nc=sn&loc=3) page to see details.# - Currently supported destinations for logs:# - `http-endpoint`# - delivers logs to any HTTP endpoint.# - The endpoint must follow [Firehose request and response specifications](https://docs.aws.amazon.com/firehose/latest/dev/httpdeliveryrequestresponse.html).# (Many of the third party vendors are compliant with this specifications out of the box.)# - `datadog`# - delivers logs to [Datadog](https://www.datadoghq.com/).# - `highlight`# - delivers logs to [Highlight.io](https://www.highlight.io/) project.## Refer to [our docs](https://docs.stacktape.com/configuration/log-forwarding/) for more information.## > Logs that fail to be delivered to the destination even after multiple retries (time spend on retries can be configured) are put into bucket with name `{stackName}-{resourceName}-logs-{generatedHash}`## - Type: object# - Required: truelogForwarding:## - Type: string# - Required: truetype: http-endpoint## - Type: object# - Required: trueproperties:# HTTPS endpoint where logs will be forwarded## - Type: string# - Required: trueendpointUrl: https://example.com# Specifies whether to use GZIP compression for the request## - When enabled, Firehose uses the content encoding to compress the body of a request before sending the request to the destination## - Type: boolean# - Required: falsegzipEncodingEnabled: true# Parameters included in each call to HTTP endpoint## - Key/Value pairs containing additional metadata you wish to send to the HTTP endpoint.# - Parameters are delivered within **X-Amz-Firehose-Common-Attributes** header as a JSON object with following format: `{"commonAttributes":{"param1":"val1", "param2":"val2"}}`## - Type: object# - Required: false# Amount of time spend on retries.## - The total amount of time that Kinesis Data Firehose spends on retries.# - This duration starts after the initial attempt to send data to the custom destination via HTTPS endpoint fails.# - Logs that fail to be delivered to the HTTP endpoint even after multiple retries (time spend on retries can be configured) are put into bucket with name `{stackName}-{resourceName}-logs-{generatedHash}`## - Type: number# - Required: falseretryDuration: 100# Access key (credentials), needed for authenticating with endpoint## - Access key is carried within a **X-Amz-Firehose-Access-Key** header# - The configured key is copied verbatim into the value of this header.The contents can be arbitrary and can potentially represent a JWT token or an ACCESS_KEY.# - It is recommended to use [secret](https://docs.stacktape.com/resources/secrets/) for storing your access key.## - Type: string# - Required: falseaccessKey: example-value
highlight
This example shows how to configure logforwarding using highlight.
resources:myRelationalDatabase:type: relational-databaseproperties:logging:# Configures forwarding of logs to specified destination## - Log forwarding is done using [Amazon Kinesis Data Firehose](https://aws.amazon.com/kinesis/data-firehose/) delivery stream.# - When using log forwarding, you will incur costs based on the amount of data being transferred to the destination (~$0.03 per transferred GB).# Refer to [AWS Kinesis Firehose Pricing](https://aws.amazon.com/kinesis/data-firehose/pricing/?nc=sn&loc=3) page to see details.# - Currently supported destinations for logs:# - `http-endpoint`# - delivers logs to any HTTP endpoint.# - The endpoint must follow [Firehose request and response specifications](https://docs.aws.amazon.com/firehose/latest/dev/httpdeliveryrequestresponse.html).# (Many of the third party vendors are compliant with this specifications out of the box.)# - `datadog`# - delivers logs to [Datadog](https://www.datadoghq.com/).# - `highlight`# - delivers logs to [Highlight.io](https://www.highlight.io/) project.## Refer to [our docs](https://docs.stacktape.com/configuration/log-forwarding/) for more information.## > Logs that fail to be delivered to the destination even after multiple retries (time spend on retries can be configured) are put into bucket with name `{stackName}-{resourceName}-logs-{generatedHash}`## - Type: object# - Required: truelogForwarding:## - Type: string# - Required: truetype: highlight## - Type: object# - Required: trueproperties:# Id of a [highlight.io](https://www.highlight.io/) project.## - You can get the id of your project in your [highlight.io console](https://app.highlight.io/).## - Type: string# - Required: trueprojectId: example-value# HTTPS endpoint where logs will be forwarded## - By default Stacktape uses `https://pub.highlight.io/v1/logs/firehose`## - Type: string# - Required: false# - Default: https://pub.highlight.io/v1/logs/firehoseendpointUrl: https://pub.highlight.io/v1/logs/firehose
datadog
This example shows how to configure logforwarding using datadog.
resources:myRelationalDatabase:type: relational-databaseproperties:logging:# Configures forwarding of logs to specified destination## - Log forwarding is done using [Amazon Kinesis Data Firehose](https://aws.amazon.com/kinesis/data-firehose/) delivery stream.# - When using log forwarding, you will incur costs based on the amount of data being transferred to the destination (~$0.03 per transferred GB).# Refer to [AWS Kinesis Firehose Pricing](https://aws.amazon.com/kinesis/data-firehose/pricing/?nc=sn&loc=3) page to see details.# - Currently supported destinations for logs:# - `http-endpoint`# - delivers logs to any HTTP endpoint.# - The endpoint must follow [Firehose request and response specifications](https://docs.aws.amazon.com/firehose/latest/dev/httpdeliveryrequestresponse.html).# (Many of the third party vendors are compliant with this specifications out of the box.)# - `datadog`# - delivers logs to [Datadog](https://www.datadoghq.com/).# - `highlight`# - delivers logs to [Highlight.io](https://www.highlight.io/) project.## Refer to [our docs](https://docs.stacktape.com/configuration/log-forwarding/) for more information.## > Logs that fail to be delivered to the destination even after multiple retries (time spend on retries can be configured) are put into bucket with name `{stackName}-{resourceName}-logs-{generatedHash}`## - Type: object# - Required: truelogForwarding:## - Type: string# - Required: truetype: datadog## - Type: object# - Required: trueproperties:# API key required to enable delivery of logs to Datadog## - You can get your Datadog API key in [Datadog console](https://app.datadoghq.com/organization-settings/api-keys)# - It is recommended to use [secret](https://docs.stacktape.com/resources/secrets/) for storing your api key.## - Type: string# - Required: trueapiKey: example-value# HTTPS endpoint where logs will be forwarded## - By default Stacktape uses `https://aws-kinesis-http-intake.logs.datadoghq.com/v1/input`# - If your Datadog site is in EU you should probably use `https://aws-kinesis-http-intake.logs.datadoghq.eu/v1/input`## - Type: string# - Required: false# - Default: https://aws-kinesis-http-intake.logs.datadoghq.com/v1/inputendpointUrl: https://aws-kinesis-http-intake.logs.datadoghq.com/v1/input