Difference between revisions of "Terraform resource: aws db instance"

From wikieduonline
Jump to navigation Jump to search
Line 49: Line 49:
 
* <code>[[monitoring_role_arn]]</code>
 
* <code>[[monitoring_role_arn]]</code>
 
* [[Enhanced monitoring]]: <code>[[monitoring_interval]]</code> (default 0)
 
* [[Enhanced monitoring]]: <code>[[monitoring_interval]]</code> (default 0)
* <code>[[ca_cert_identifier]]</code> (Optional) The identifier of the CA certificate for the DB instance.
+
* <code>[[ca_cert_identifier]]</code> (Optional) The identifier of the [[CA certificate]] for the DB instance.
  
 
== Errors ==
 
== Errors ==

Revision as of 10:37, 25 July 2024

Terraform resource: aws_db_instance


Official example

resource "aws_db_instance" "default" {
  allocated_storage    = 10
  engine               = "mysql"
  engine_version       = "5.7"
  instance_class       = "db.t3.micro"
  db_name                 = "mydb"
  username             = "foo"
  password             = "foobarbaz"
  parameter_group_name = "default.mysql5.7"
  skip_final_snapshot  = true
}

Basic example

resource "aws_db_instance" "my_mariadb_instance" {
  allocated_storage    = 10
  engine               = "mariadb"
  instance_class       = "db.t3.micro"
  db_name              = "mydb"
  username             = "foo"
  password             = "foobarbaz"
  publicly_accessible  = false
  skip_final_snapshot  = true
}

Selected arguments

Errors

Related terms

See also

  • https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#allocated_storage
  • https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#max_allocated_storage
  • https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#backup_retention_period
  • Advertising: