diff --git a/.github/workflows/semantic-releaser.yml b/.github/workflows/semantic-releaser.yml index 6e685a0..58dffd0 100644 --- a/.github/workflows/semantic-releaser.yml +++ b/.github/workflows/semantic-releaser.yml @@ -6,7 +6,7 @@ on: - main paths: - '**.tf' - - '!examples/**.tf' + - '_example/**.tf' jobs: release: diff --git a/_example/basic/example.tf b/_example/basic/example.tf new file mode 100644 index 0000000..7ae2707 --- /dev/null +++ b/_example/basic/example.tf @@ -0,0 +1,18 @@ +locals { + name = "app" + environment = "test" + label_order = ["name", "environment"] +} + +##----------------------------------------------------------------------------- +## Virtual Network module call. +##----------------------------------------------------------------------------- +module "vnet" { + source = "../" + name = local.name + environment = local.environment + resource_group_name = module.resource_group.resource_group_name + location = module.resource_group.resource_group_location + address_space = "10.0.0.0/16" + enable_network_watcher = false # To be set true when network security group flow logs are to be tracked and network watcher with specific name is to be deployed. +} \ No newline at end of file diff --git a/_example/output.tf b/_example/basic/outputs.tf similarity index 100% rename from _example/output.tf rename to _example/basic/outputs.tf diff --git a/_example/exmaple.tf b/_example/complete/exmaple.tf similarity index 100% rename from _example/exmaple.tf rename to _example/complete/exmaple.tf diff --git a/_example/complete/outputs.tf b/_example/complete/outputs.tf new file mode 100644 index 0000000..940cb7b --- /dev/null +++ b/_example/complete/outputs.tf @@ -0,0 +1,29 @@ +output "vnet_id" { + description = "The id of the newly created vNet" + value = module.vnet.vnet_id +} + +output "vnet_name" { + description = "The name of the newly created vNet" + value = module.vnet.vnet_name +} + +output "vnet_location" { + description = "The location of the newly created vNet" + value = module.vnet.vnet_location +} + +output "vnet_address_space" { + description = "The address space of the newly created vNet" + value = module.vnet.vnet_address_space +} + +output "vnet_guid" { + description = "The GUID of the virtual network." + value = module.vnet.vnet_guid +} + +output "vnet_rg_name" { + description = "The name of the resource group in which to create the virtual network. Changing this forces a new resource to be created." + value = module.vnet.vnet_rg_name +} \ No newline at end of file