Skip to content

Commit 08b11f2

Browse files
committed
feat: add more resources
1 parent e9b77b0 commit 08b11f2

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

aws/main.tf

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,51 @@ resource "aws_lambda_function" "my_hello_world" {
3434
}
3535
}
3636

37+
resource "aws_instance" "new_web_app" {
38+
ami = "ami-005e54dee72cc1d00"
39+
40+
instance_type = "m3.2xlarge"
41+
42+
tags = {
43+
Environment = "prod"
44+
Service = "web-app"
45+
}
46+
47+
volume_tags = {
48+
Environment = "production"
49+
}
50+
51+
root_block_device {
52+
volume_size = 100
53+
volume_type = "gp3"
54+
}
55+
56+
ebs_block_device {
57+
volume_type = "gp3"
58+
iops = "20000"
59+
}
60+
}
61+
62+
resource "aws_db_instance" "mydb" {
63+
allocated_storage = 20
64+
storage_type = "gp3"
65+
engine = "postgres"
66+
engine_version = "11.13"
67+
instance_class = "db.t4g.medium"
68+
name = "mydb"
69+
username = "admin"
70+
password = "mypassword"
71+
parameter_group_name = "default.postgres11"
72+
multi_az = false
73+
backup_retention_period = 7
74+
skip_final_snapshot = true
75+
publicly_accessible = false
76+
77+
tags = {
78+
Environment = "production"
79+
Service = "web-app"
80+
}
81+
}
82+
83+
84+

azure/main.tf

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,34 @@ resource "azurerm_linux_function_app" "my_function" {
6262
Environment = "Prod"
6363
}
6464
}
65+
66+
resource "azurerm_linux_virtual_machine" "new_app_vm" {
67+
location = "eastus"
68+
name = "test"
69+
resource_group_name = "test"
70+
admin_username = "testuser"
71+
admin_password = "Testpa5s"
72+
73+
size = "Standard_D8as_v4"
74+
75+
tags = {
76+
Environment = "production"
77+
Service = "web-app"
78+
}
79+
80+
os_disk {
81+
caching = "ReadWrite"
82+
storage_account_type = "Standard_LRS"
83+
}
84+
85+
network_interface_ids = [
86+
"/subscriptions/123/resourceGroups/testrg/providers/Microsoft.Network/networkInterfaces/testnic",
87+
]
88+
89+
source_image_reference {
90+
publisher = "Canonical"
91+
offer = "UbuntuServer"
92+
sku = "16.04-LTS"
93+
version = "latest"
94+
}
95+
}

0 commit comments

Comments
 (0)