Difference between revisions of "Terraform resource: aws db instance"
Jump to navigation
Jump to search
↑ 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
Line 33: | Line 33: | ||
* <code>[[AWS RDS engines|engine]]</code>: <code>[[aurora]], aurora-mysql, aurora-postgresql, mysql, mariadb, postgres</code> | * <code>[[AWS RDS engines|engine]]</code>: <code>[[aurora]], aurora-mysql, aurora-postgresql, mysql, mariadb, postgres</code> | ||
* <code>[[allocated_storage]]</code> <ref>https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#allocated_storage</ref> (required) | * <code>[[allocated_storage]]</code> <ref>https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#allocated_storage</ref> (required) | ||
+ | * <code>[[max_allocated_storage]]</code> (optional) <ref>https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#max_allocated_storage</ref> | ||
* <code>[[db_name]]</code> (optional) | * <code>[[db_name]]</code> (optional) | ||
* <code>[[password]]</code> | * <code>[[password]]</code> |
Revision as of 20:54, 1 June 2022
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" skip_final_snapshot = true }
Arguments
instance_class
(required)engine
:aurora, aurora-mysql, aurora-postgresql, mysql, mariadb, postgres
allocated_storage
[1] (required)max_allocated_storage
(optional) [2]db_name
(optional)password
multi_az
(optional)backup_retention_period
: (0-35)[3]
Related terms
See also
- Terraform AWS resources: IAM, Net, EC2, ECS, ECR, S3, Route53, ACM, CloudWatch, CloudFront SES, RDS, DLM
Advertising: