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

ec2.tf 703 B

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
  1. resource "aws_security_group" "ec2_sg" {
  2. name = "ec2_sg"
  3. vpc_id = aws_vpc.main.id
  4. ingress {
  5. description = "SSH"
  6. from_port = 22
  7. to_port = 22
  8. protocol = "tcp"
  9. cidr_blocks = ["0.0.0.0/0"]
  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_instance" "ubuntu" {
  19. ami = "ami-0c7217cdde317cfec" # Ubuntu 22.04 LTS for us-east-1
  20. instance_type = "t2.micro"
  21. subnet_id = aws_subnet.public_1.id
  22. key_name = var.ec2_key_name
  23. vpc_security_group_ids = [aws_security_group.ec2_sg.id]
  24. tags = {
  25. Name = "mlflow-ubuntu-server"
  26. }
  27. }
Tip!

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

Comments

Loading...