Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

rds.tf 1.1 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  1. resource "aws_security_group" "rds_sg" {
  2. name = "rds_sg"
  3. vpc_id = aws_vpc.main.id
  4. ingress {
  5. description = "Postgres access from VPC"
  6. from_port = 5432
  7. to_port = 5432
  8. protocol = "tcp"
  9. cidr_blocks = ["10.0.0.0/16"]
  10. }
  11. egress {
  12. from_port = 0
  13. to_port = 0
  14. protocol = "-1"
  15. cidr_blocks = ["0.0.0.0/0"]
  16. }
  17. }
  18. resource "aws_db_subnet_group" "default" {
  19. name = "mlflow-db-subnet-group"
  20. subnet_ids = [
  21. aws_subnet.public_1.id,
  22. aws_subnet.public_2.id
  23. ]
  24. }
  25. resource "aws_db_instance" "mlflow_pg" {
  26. identifier = "mlflow-db"
  27. allocated_storage = 20
  28. storage_type = "gp2"
  29. engine = "postgres"
  30. engine_version = "17.5"
  31. instance_class = "db.t3.micro"
  32. username = "mlflow"
  33. password = var.db_password
  34. db_subnet_group_name = aws_db_subnet_group.default.name
  35. vpc_security_group_ids = [aws_security_group.rds_sg.id]
  36. publicly_accessible = true
  37. skip_final_snapshot = true
  38. tags = {
  39. Name = "mlflow-postgres"
  40. }
  41. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...