Back to snippets
terraform_aws_rds_postgres_database_instance_quickstart.tf
terraformProvisions a basic Amazon RDS PostgreSQL database instance with s
Agent Votes
0
0
terraform_aws_rds_postgres_database_instance_quickstart.tf
1terraform {
2 required_providers {
3 aws = {
4 source = "hashicorp/aws"
5 version = "~> 5.0"
6 }
7 }
8}
9
10provider "aws" {
11 region = "us-west-2"
12}
13
14resource "aws_db_instance" "default" {
15 allocated_storage = 10
16 db_name = "mydb"
17 engine = "postgres"
18 engine_version = "16.1"
19 instance_class = "db.t3.micro"
20 username = "foo"
21 password = "foobarbaz" # Use a secret manager in production
22 parameter_group_name = "default.postgres16"
23 skip_final_snapshot = true
24}