Skip to content

Commit

Permalink
Solution?
Browse files Browse the repository at this point in the history
  • Loading branch information
OKochubeii committed Sep 20, 2024
1 parent bc4a5fc commit 3127b88
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
14 changes: 14 additions & 0 deletions modules/resource_group_storage/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#define the resources

resource "azurerm_resource_group" "example" {
name = var.resource_group_name
location = var.location
}

resource "azurerm_storage_account" "example" {
name = var.storage_account_name
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
account_tier = "Standard"
account_replication_type = "LRS"
}
9 changes: 9 additions & 0 deletions modules/resource_group_storage/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#define the outputs

output "resource_group_id" {
value = azurerm_resource_group.example.id
}

output "storage_account_id" {
value = azurerm_storage_account.example.id
}
16 changes: 16 additions & 0 deletions modules/resource_group_storage/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#define the variables

variable "resource_group_name" {
description = "The name of the resource group"
default = "example-resources"
}

variable "storage_account_name" {
description = "The name of the storage account"
default = "examplestorageaccount"
}

variable "location" {
description = "The location for all resources."
default = "East US"
}

0 comments on commit 3127b88

Please sign in to comment.