File tree Expand file tree Collapse file tree 5 files changed +67
-0
lines changed
Expand file tree Collapse file tree 5 files changed +67
-0
lines changed Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments