-
Notifications
You must be signed in to change notification settings - Fork 13
/
main.tf
48 lines (45 loc) · 1.62 KB
/
main.tf
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
terraform {
required_version = "~> 0.13.0"
required_providers {
azurerm = "~> 2.25.0"
}
}
provider "azurerm" {
features {
}
}
module "linux_vm" {
source = "./modules/linux-vm"
rgName = "ansibledev-${var.technician_initials}"
rgLocation = "australiaeast"
vnetName = "ansibledev-${var.technician_initials}"
vnetAddressSpace = ["10.0.0.0/24"]
vnetSubnetName = "default"
vnetSubnetAddress = "10.0.0.0/24"
nsgName = "ansibledev-${var.technician_initials}"
vmNICPrivateIP = "10.0.0.5"
vmPublicIPDNS = "ansibledev-${var.technician_initials}"
vmName = "ansibledev-${var.technician_initials}"
vmSize = "Standard_B2s"
vmAdminName = "ansibleadmin" #If this is changed ensure you update "./scripts/ubuntu-setup-ansible.sh" with the new username
vmShutdownTime = "1900"
vmShutdownTimeZone = "AUS Eastern Standard Time"
vmSrcImageReference = {
"publisher" = "Canonical"
"offer" = "UbuntuServer"
"sku" = "18.04-LTS"
"version" = "latest"
}
nsgRule1 = {
"name" = "SSH_allow"
"description" = "Allow inbound SSH from single Public IP to Ansible Host"
"priority" = 100
"direction" = "Inbound"
"access" = "Allow"
"protocol" = "Tcp"
"source_port_range" = "*"
"destination_port_range" = "22"
"source_address_prefix" = "0.0.0.0" #Update with your own public IP address https://www.whatismyip.com/
"destination_address_prefix" = "10.0.0.5"
}
}