-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.tf
40 lines (35 loc) · 1.03 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
provider "azurerm" {
features {}
}
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">=2.53.0"
}
}
}
resource "azurerm_resource_group" "rg" {
name = var.resource_group_name
location = var.location
}
resource "azurerm_virtual_network" "vnet" {
name = "vnet-demo"
address_space = var.vnet_address_space
location = var.location
resource_group_name = azurerm_resource_group.rg.name
}
resource "azurerm_subnet" "subnet" {
name = "snet-vnet-demo"
resource_group_name = azurerm_resource_group.rg.name
virtual_network_name = azurerm_virtual_network.vnet.name
address_prefixes = var.subnet_ranges
}
resource "azurerm_availability_set" "availabilityset" {
name = "demo-as"
location = var.location
resource_group_name = azurerm_resource_group.rg.name
platform_fault_domain_count = "2"
platform_update_domain_count = "3"
managed = "true"
}