diff --git a/quickstart/template/main.tf b/quickstart/template/main.tf new file mode 100644 index 00000000..efea8c20 --- /dev/null +++ b/quickstart/template/main.tf @@ -0,0 +1,2 @@ +# This file should include references to data sources, resources, and modules +# required to manage the desired Azure infrastructure. diff --git a/quickstart/template/optional.tf b/quickstart/template/optional.tf new file mode 100644 index 00000000..ac9c6286 --- /dev/null +++ b/quickstart/template/optional.tf @@ -0,0 +1,2 @@ +# Optionally use other *.tf files to brake out the infrastructure in to more +# manageable and understandable chunks. \ No newline at end of file diff --git a/quickstart/template/outputs.tf b/quickstart/template/outputs.tf new file mode 100644 index 00000000..76d89bd6 --- /dev/null +++ b/quickstart/template/outputs.tf @@ -0,0 +1,5 @@ +# Use this file to define all outputs that will be returned by the configuration + +output "resource" { + value = azurerm_resource_group.my_rg.name +} \ No newline at end of file diff --git a/quickstart/template/provider.tf b/quickstart/template/provider.tf new file mode 100644 index 00000000..c082a3f2 --- /dev/null +++ b/quickstart/template/provider.tf @@ -0,0 +1,35 @@ +# We strongly recommend using the required_providers block to set the +# Azure Provider source and version being used +terraform { + required_version = ">=0.15.0" + + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "=2.56.0" + } + } + + # We recommend using a remote backend like Azure storage + # backend "azurerm" { + # storage_account_name = "" // existing storage account + # container_name = "tfstate" + # key = "terraform.tfstate" + # resource_group_name = "" // resource group where storage account exists + # } + # + # or Terraform Cloud (https://app.terraform.io) + # backend "remote" { + # hostname = "app.terraform.io" + # organization = "company" + # + # workspaces { + # name = "my-app-prod" + # } + # } +} + +# Configure the Microsoft Azure Provider +provider "azurerm" { + features {} +} \ No newline at end of file diff --git a/quickstart/template/readme.md b/quickstart/template/readme.md new file mode 100644 index 00000000..32f30821 --- /dev/null +++ b/quickstart/template/readme.md @@ -0,0 +1,3 @@ +# Azure Quickstart Template + +This directory contains the suggested file structure for azure Quickstart configurations. This structure is based on best practices defined by HashiCorp. \ No newline at end of file diff --git a/quickstart/template/variables.tf b/quickstart/template/variables.tf new file mode 100644 index 00000000..397e095f --- /dev/null +++ b/quickstart/template/variables.tf @@ -0,0 +1,7 @@ +# Use this file to define all variables that will be used in the configuraion + +variable "var1" { + type = string + description = "my first variable" + default = "foo" +} \ No newline at end of file