Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
karishmamantoo authored Dec 3, 2024
1 parent fab5779 commit afdccee
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 0 deletions.
18 changes: 18 additions & 0 deletions AzureCloudProviders.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "2.74.0"
}
}
}

provider "azurerm" {
# Configuration options
/*
Multi line comment
*/
features {}


}
9 changes: 9 additions & 0 deletions modules/storageaccount/output.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
output "storageid" {
description = "This is the id of the provisioned storage accoutn"
value = azurerm_storage_account.vishnustorage.id
}

output "StorageTier" {
description = "The tier of the storage account"
value = azurerm_storage_account.vishnustorage.access_tier
}
8 changes: 8 additions & 0 deletions modules/storageaccount/stroage.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
resource "azurerm_storage_account" "vishnustorage" {
name = var.storageaccountname
resource_group_name = "TerraformRG"
location = "East US"
access_tier = var.tier
account_replication_type = "LRS"
account_tier = "Standard"
}
18 changes: 18 additions & 0 deletions modules/storageaccount/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
variable "resourcegroupname" {
description = "The resource group name"
}

variable "resourcegplocation" {
description = "Location of RG"
default = "East US"
}

variable "storageaccountname" {
description = "This is the name of storage accoutn to be created"
default = "vishnustorageaccount"
}

variable "tier" {
description = "Trier of the storage account"
default = "Hot"
}
14 changes: 14 additions & 0 deletions resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module "storagemodule" {
source = "./modules/storageaccount"
storageaccountname = "vishnustorageaccount"
resourcegroupname = "TerraformRG"
}

output "storageidoutput" {
value = module.storagemodule.storageid
description = "The id of the storage account"
}

output "Storagetier" {
value = module.storagemodule.StorageTier
}

0 comments on commit afdccee

Please sign in to comment.