-
Notifications
You must be signed in to change notification settings - Fork 0
/
01-main.tf
51 lines (42 loc) · 1.16 KB
/
01-main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# We will define
# 1. Terraform Settings Block
# 1. Required Version Terraform
# 2. Required Terraform Providers
# 3. Terraform Remote State Storage with Azure Storage Account (last step of this section)
# 2. Terraform Provider Block for AzureRM
# 3. Terraform Resource Block: Define a Random Pet Resource
# 1. Terraform Settings Block
terraform {
# 1. Required Version Terraform
required_version = ">= 0.13"
# 2. Required Terraform Providers
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 2.0"
}
azuread = {
source = "hashicorp/azuread"
version = "~> 1.0"
}
random = {
source = "hashicorp/random"
version = "~> 3.0"
}
}
# Terraform State Storage to Azure Storage Container
backend "azurerm" {
resource_group_name = "terraform-storage-rg"
storage_account_name = "nehastoragebackend"
container_name = "tfstatfile"
key = "dev.terraform.tfstate"
}
}
# 2. Terraform Provider Block for AzureRM
provider "azurerm" {
features {
}
}
# 3. Terraform Resource Block: Define a Random Pet Resource
resource "random_pet" "aksrandom" {
}