Skip to content

Commit fa5b6b9

Browse files
authored
Create main.tf
1 parent 3016e44 commit fa5b6b9

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

‎beginners/rds-restore/main.tf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# main.tf
2+
3+
# Configure the AWS provider
4+
provider "aws" {
5+
region = "us-west-2" # Update with your desired region
6+
}
7+
8+
# Define the RDS instance
9+
resource "aws_db_instance" "example" {
10+
engine = "mysql"
11+
instance_class = "db.t3.micro"
12+
allocated_storage = 20
13+
storage_type = "gp2"
14+
identifier = "my-rds-instance"
15+
username = "admin"
16+
password = "password"
17+
publicly_accessible = false
18+
19+
# Other RDS configuration settings...
20+
21+
# Enable automatic backups and set the retention period
22+
backup_retention_period = 7
23+
backup_window = "03:00-04:00"
24+
maintenance_window = "sun:05:00-sun:06:00"
25+
}

0 commit comments

Comments
 (0)