forked from sdcscripts/terraform-az-firewallnva
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbastion.tf.draft
38 lines (33 loc) · 1.27 KB
/
bastion.tf.draft
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
resource "azurerm_resource_group" "bastionRG" {
name = "${var.prefix}-${var.computergname}"
location = var.location
}
resource "azurerm_virtual_network" "example" {
name = "examplevnet"
address_space = ["192.168.1.0/24"]
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
}
resource "azurerm_subnet" "example" {
name = "AzureBastionSubnet"
resource_group_name = azurerm_resource_group.example.name
virtual_network_name = azurerm_virtual_network.example.name
address_prefix = "192.168.1.224/27"
}
resource "azurerm_public_ip" "example" {
name = "examplepip"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
allocation_method = "Static"
sku = "Standard"
}
resource "azurerm_bastion_host" "example" {
name = "examplebastion"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
ip_configuration {
name = "configuration"
subnet_id = azurerm_subnet.example.id
public_ip_address_id = azurerm_public_ip.example.id
}
}