Adding quickstart template example
This commit is contained in:
parent
e932a95d27
commit
cefacf9966
2
quickstart/template/main.tf
Normal file
2
quickstart/template/main.tf
Normal file
@ -0,0 +1,2 @@
|
||||
# This file should include references to data sources, resources, and modules
|
||||
# required to manage the desired Azure infrastructure.
|
2
quickstart/template/optional.tf
Normal file
2
quickstart/template/optional.tf
Normal file
@ -0,0 +1,2 @@
|
||||
# Optionally use other *.tf files to brake out the infrastructure in to more
|
||||
# manageable and understandable chunks.
|
5
quickstart/template/outputs.tf
Normal file
5
quickstart/template/outputs.tf
Normal file
@ -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
|
||||
}
|
35
quickstart/template/provider.tf
Normal file
35
quickstart/template/provider.tf
Normal file
@ -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 {}
|
||||
}
|
3
quickstart/template/readme.md
Normal file
3
quickstart/template/readme.md
Normal file
@ -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.
|
7
quickstart/template/variables.tf
Normal file
7
quickstart/template/variables.tf
Normal file
@ -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"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user