Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solutions #7

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module "resource_group_storage" {
source = "github.com/gaupt/terraform-azurerm-resource_group_storage"

resource_group_name = "example-rg"
location = "East US"
storage_account_name = "examplestorage"
}
12 changes: 12 additions & 0 deletions modules/resource_group_storage/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
resource "azurerm_resource_group" "tk6" {
name = var.resource_group_name
location = var.location
}

resource "azurerm_storage_account" "tk6" {
name = var.storage_account_name
resource_group_name = azurerm_resource_group.tk6.name
location = azurerm_resource_group.tk6.location
account_tier = "Standard"
account_replication_type = "LRS"
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOF

7 changes: 7 additions & 0 deletions modules/resource_group_storage/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
output "resource_group_name" {
value = azurerm_resource_group.tk6.name
}

output "storage_account_name" {
value = azurerm_storage_account.tk6.name
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOF

17 changes: 17 additions & 0 deletions modules/resource_group_storage/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
variable "resource_group_name" {
description = "Resource group name"
type = string
default = "tk6"
}

variable "location" {
description = "Resource group location"
type = string
default = "East US"
}

variable "storage_account_name" {
description = "Storage account name"
type = string
default = "tk6-storage-account"
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOF