Last active
May 10, 2020 21:09
-
-
Save PradeepLoganathan/79a3c341a19ee6913b8b17cecce7f7cc to your computer and use it in GitHub Desktop.
terraform resource using variables - for the blog post https://pradeeploganathan.com/cloud/terraform-getting-started/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #create the resource group | |
| resource "azurerm_resource_group" "rg" { | |
| name = "ateam-resource-group" | |
| location = var.location | |
| } | |
| #create the virtual network | |
| resource "azurerm_virtual_network" "vnet1" { | |
| resource_group_name = azurerm_resource_group.rg.name | |
| location = var.location | |
| name = "dev" | |
| address_space = var.vnet_address_space | |
| } | |
| #create a subnet within the virtual network | |
| resource "azurerm_subnet" "subnet1" { | |
| resource_group_name = azurerm_resource_group.rg.name | |
| virtual_network_name = azurerm_virtual_network.vnet1.name | |
| name = "devsubnet" | |
| address_prefixes = ["10.0.0.0/24"] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment