RDS Instance

Creating a single az instance with minimal parameters

resources:
  - type: aws_rds_db_instance
    name: mysql-db1
    props:
      db_instance_identifier: "my-mysql-db"
      engine: "mysql"
      engine_version: "8.0.35"
      db_instance_class: "db.t3.micro"
      allocated_storage: 100
      storage_type: "gp2"
      db_name: "mydb"
      master_username: "admin"
      master_user_password: "MyPassword123!"
      db_subnet_group_name: "my-existing-subnet-group"

Example price for above configuration

mysql-db1 (action: create)
=> Price (Compute - price: $0.017/Hrs, monthly: $12.65)
=> Price (Storage - price: $0.115/GB-Mo, quantity: 200, monthly: $23.00)

Creating a multi az instance with minimal parameters

resources:
  - type: aws_rds_db_instance
    name: mysql-db2
    props:
      db_instance_identifier: "my-mysql-db"
      engine: "mysql"
      engine_version: "8.0.35"
      db_instance_class: "db.t3.micro"
      allocated_storage: 200
      storage_type: "gp3"
      db_name: "mydb"
      master_username: "admin"
      master_user_password: "MyPassword123!"
      db_subnet_group_name: "my-existing-subnet-group"
      multi_az: true

Example price for above configuration

mysql-db2 (action: create)
=> Price (Compute - price: $0.034/Hrs, monthly: $25.30)
=> Price (Storage - price: $0.23/GB-Mo, quantity: 200, monthly: $46.00)

Creating a multi az cluster with minimal parameters

resources:
  - type: aws_rds_db_cluster
    name: mysql-cluster
    props:
      db_cluster_identifier: "my-mysql-cluster"
      engine: "mysql"
      engine_version: "8.0.35"
      db_cluster_instance_class: "db.m6gd.large"
      allocated_storage: 200
      storage_type: "gp3"
      iops: 3000
      database_name: "mydb"
      master_username: "admin"
      master_user_password: "MyPassword123!"
      db_subnet_group_name: "my-existing-subnet-group"

Example price for above configuration

mysql-cluster (action: create)
=> Price (Price - price: $0.522/Hrs, monthly: $388.37)
=> Price (Storage - price: $0.345/GB-Mo, quantity: 200, monthly: $69.00)

Last updated

Was this helpful?