Skip to content

Commit cefacf9

Browse files
author
Mark Gray
committed
Adding quickstart template example
1 parent e932a95 commit cefacf9

File tree

6 files changed

+54
-0
lines changed

6 files changed

+54
-0
lines changed

quickstart/template/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file should include references to data sources, resources, and modules
2+
# required to manage the desired Azure infrastructure.

quickstart/template/optional.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Optionally use other *.tf files to brake out the infrastructure in to more
2+
# manageable and understandable chunks.

quickstart/template/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Use this file to define all outputs that will be returned by the configuration
2+
3+
output "resource" {
4+
value = azurerm_resource_group.my_rg.name
5+
}

quickstart/template/provider.tf

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# We strongly recommend using the required_providers block to set the
2+
# Azure Provider source and version being used
3+
terraform {
4+
required_version = ">=0.15.0"
5+
6+
required_providers {
7+
azurerm = {
8+
source = "hashicorp/azurerm"
9+
version = "=2.56.0"
10+
}
11+
}
12+
13+
# We recommend using a remote backend like Azure storage
14+
# backend "azurerm" {
15+
# storage_account_name = "" // existing storage account
16+
# container_name = "tfstate"
17+
# key = "terraform.tfstate"
18+
# resource_group_name = "" // resource group where storage account exists
19+
# }
20+
#
21+
# or Terraform Cloud (https://app.terraform.io)
22+
# backend "remote" {
23+
# hostname = "app.terraform.io"
24+
# organization = "company"
25+
#
26+
# workspaces {
27+
# name = "my-app-prod"
28+
# }
29+
# }
30+
}
31+
32+
# Configure the Microsoft Azure Provider
33+
provider "azurerm" {
34+
features {}
35+
}

quickstart/template/readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Azure Quickstart Template
2+
3+
This directory contains the suggested file structure for azure Quickstart configurations. This structure is based on best practices defined by HashiCorp.

quickstart/template/variables.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Use this file to define all variables that will be used in the configuraion
2+
3+
variable "var1" {
4+
type = string
5+
description = "my first variable"
6+
default = "foo"
7+
}

0 commit comments

Comments
 (0)