Skip to content

Commit 83a39d3

Browse files
committed
initial iac
1 parent f663ada commit 83a39d3

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

src/iac/input.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
variable "location" {
2+
default = "eastus"
3+
}
4+
5+
variable "env" {
6+
default = "dev"
7+
}

src/iac/main.tf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
resource "azurerm_resource_group" "state-demo-secure" {
3+
name = "state-demo-${var.env}"
4+
location = var.location
5+
}
6+
7+
resource "azurerm_storage_account" "state-demo" {
8+
name = "statedemocayers${var.env}"
9+
resource_group_name = azurerm_resource_group.state-demo-secure.name
10+
location = azurerm_resource_group.state-demo-secure.location
11+
account_tier = "Standard"
12+
account_replication_type = "LRS"
13+
min_tls_version = "TLS1_2"
14+
15+
tags = {
16+
environment = var.env
17+
}
18+
}

src/iac/providers.tf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
terraform {
2+
required_providers {
3+
azurerm = {
4+
source = "hashicorp/azurerm"
5+
version = ">=3.7.0"
6+
}
7+
}
8+
backend "azurerm" {
9+
resource_group_name = "tfstate"
10+
storage_account_name = "tfstate13329"
11+
container_name = "tfstate"
12+
key = "terraform.tfstate"
13+
}
14+
}
15+
16+
provider "azurerm" {
17+
features {}
18+
}

0 commit comments

Comments
 (0)