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

vpc.tf 1.3 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
  1. resource "aws_vpc" "main" {
  2. cidr_block = "10.0.0.0/16"
  3. enable_dns_support = true # Required for RDS public access
  4. enable_dns_hostnames = true # Required for EC2 and RDS DNS resolution
  5. tags = {
  6. Name = "mlflow-main-vpc"
  7. }
  8. }
  9. resource "aws_subnet" "public_1" {
  10. vpc_id = aws_vpc.main.id
  11. cidr_block = "10.0.10.0/24"
  12. availability_zone = "us-east-1a"
  13. map_public_ip_on_launch = true
  14. tags = {
  15. Name = "public-subnet-1"
  16. }
  17. }
  18. resource "aws_subnet" "public_2" {
  19. vpc_id = aws_vpc.main.id
  20. cidr_block = "10.0.11.0/24"
  21. availability_zone = "us-east-1b"
  22. map_public_ip_on_launch = true
  23. tags = {
  24. Name = "public-subnet-2"
  25. }
  26. }
  27. resource "aws_internet_gateway" "gw" {
  28. vpc_id = aws_vpc.main.id
  29. tags = {
  30. Name = "mlflow-internet-gateway"
  31. }
  32. }
  33. resource "aws_route_table" "public" {
  34. vpc_id = aws_vpc.main.id
  35. route {
  36. cidr_block = "0.0.0.0/0"
  37. gateway_id = aws_internet_gateway.gw.id
  38. }
  39. tags = {
  40. Name = "mlflow-public-rt"
  41. }
  42. }
  43. resource "aws_route_table_association" "a1" {
  44. subnet_id = aws_subnet.public_1.id
  45. route_table_id = aws_route_table.public.id
  46. }
  47. resource "aws_route_table_association" "a2" {
  48. subnet_id = aws_subnet.public_2.id
  49. route_table_id = aws_route_table.public.id
  50. }
Tip!

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

Comments

Loading...