Skip to content

Commit afdccee

Browse files
Add files via upload
1 parent fab5779 commit afdccee

File tree

5 files changed

+67
-0
lines changed

5 files changed

+67
-0
lines changed

AzureCloudProviders.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 = "2.74.0"
6+
}
7+
}
8+
}
9+
10+
provider "azurerm" {
11+
# Configuration options
12+
/*
13+
Multi line comment
14+
*/
15+
features {}
16+
17+
18+
}

modules/storageaccount/output.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
output "storageid" {
2+
description = "This is the id of the provisioned storage accoutn"
3+
value = azurerm_storage_account.vishnustorage.id
4+
}
5+
6+
output "StorageTier" {
7+
description = "The tier of the storage account"
8+
value = azurerm_storage_account.vishnustorage.access_tier
9+
}

modules/storageaccount/stroage.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
resource "azurerm_storage_account" "vishnustorage" {
2+
name = var.storageaccountname
3+
resource_group_name = "TerraformRG"
4+
location = "East US"
5+
access_tier = var.tier
6+
account_replication_type = "LRS"
7+
account_tier = "Standard"
8+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
variable "resourcegroupname" {
2+
description = "The resource group name"
3+
}
4+
5+
variable "resourcegplocation" {
6+
description = "Location of RG"
7+
default = "East US"
8+
}
9+
10+
variable "storageaccountname" {
11+
description = "This is the name of storage accoutn to be created"
12+
default = "vishnustorageaccount"
13+
}
14+
15+
variable "tier" {
16+
description = "Trier of the storage account"
17+
default = "Hot"
18+
}

resource.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module "storagemodule" {
2+
source = "./modules/storageaccount"
3+
storageaccountname = "vishnustorageaccount"
4+
resourcegroupname = "TerraformRG"
5+
}
6+
7+
output "storageidoutput" {
8+
value = module.storagemodule.storageid
9+
description = "The id of the storage account"
10+
}
11+
12+
output "Storagetier" {
13+
value = module.storagemodule.StorageTier
14+
}

0 commit comments

Comments
 (0)