Skip to content

Instantly share code, notes, and snippets.

@raykao
Created September 25, 2019 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raykao/c98cb611f13d6a652dbc3b7eaa0111bf to your computer and use it in GitHub Desktop.
Save raykao/c98cb611f13d6a652dbc3b7eaa0111bf to your computer and use it in GitHub Desktop.
module "subnet" {
source = "./subnet_module.tf"
}
resource "azurerm_virtual_machine" "some_name" {
...
depends_on = module.subnet
subnet_id = module.subnet.id
}
resource "azurerm_subnet" "default" {
...
# https://www.terraform.io/docs/providers/azurerm/r/subnet.html
}
output "id" {
value = azurerm.subnet.id
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment