Skip to content

Commit

Permalink
Merge pull request #15 from mihai-satmarean/feature/terraform/azure-p…
Browse files Browse the repository at this point in the history
…rovider

Add Azure provider setup with basic resources. Closes #14
  • Loading branch information
sebbastianG authored Nov 25, 2024
2 parents 94174c6 + eb24213 commit 81e5b80
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
25 changes: 25 additions & 0 deletions terraform/azure/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
resource "azurerm_resource_group" "main" {
name = "rg-${var.project}-${var.environment}"
location = var.location

tags = {
Environment = var.environment
Project = var.project
ManagedBy = "terraform"
}
}

resource "azurerm_storage_account" "main" {
name = "st${var.project}${var.environment}"
resource_group_name = azurerm_resource_group.main.name
location = azurerm_resource_group.main.location
account_tier = "Standard"
account_replication_type = "LRS"

tags = {
Environment = var.environment
Project = var.project
ManagedBy = "terraform"
}
}

13 changes: 13 additions & 0 deletions terraform/azure/providers/azure.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.0"
}
}
}

provider "azurerm" {
features {}
}

18 changes: 18 additions & 0 deletions terraform/azure/variables/azure.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
variable "location" {
description = "Azure region for resources"
type = string
default = "West Europe"
}

variable "environment" {
description = "Environment name"
type = string
default = "dev"
}

variable "project" {
description = "Project name"
type = string
default = "devops-tools"
}

0 comments on commit 81e5b80

Please sign in to comment.