This commit is contained in:
Sam
2025-09-26 11:19:35 +00:00
parent 0049839d98
commit 49c0913f2b
4 changed files with 19 additions and 3 deletions
+11 -2
View File
@@ -23,5 +23,14 @@ module "network" {
project = "TerraformBootcamp" project = "TerraformBootcamp"
} }
/*
module "compute" {
source = "../../modules/compute"
resource_group_name = "terraform"
location = "UK South"
subnet_id = module.network.subnet_ids["public"]
vm_size = "Standard_B1s"
admin_username = "azureuser"
ssh_public_key = "<your-ssh-public-key>"
}
*/
+1 -1
View File
@@ -1,5 +1,5 @@
resource "azurerm_network_interface" "nic" { resource "azurerm_network_interface" "nic" {
name = "example-nic" name = "vnic"
location = var.location location = var.location
resource_group_name = var.resource_group_name resource_group_name = var.resource_group_name
+1
View File
@@ -0,0 +1 @@
output "vm_public_ip" { value = azurerm_public_ip.vm_public.ip_address }
+6
View File
@@ -0,0 +1,6 @@
variable "resource_group_name" { type = string }
variable "location" { type = string }
variable "subnet_id" { type = string }
variable "vm_size" { type = string }
variable "admin_username" { type = string }
variable "ssh_public_key" { type = string }