diff --git a/modules/resource_group_storage/main.tf b/modules/resource_group_storage/main.tf new file mode 100644 index 0000000..4039f22 --- /dev/null +++ b/modules/resource_group_storage/main.tf @@ -0,0 +1,12 @@ +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 = var.location + account_tier = "Standard" + account_replication_type = "LRS" +} diff --git a/modules/resource_group_storage/outputs.tf b/modules/resource_group_storage/outputs.tf new file mode 100644 index 0000000..1fcb22d --- /dev/null +++ b/modules/resource_group_storage/outputs.tf @@ -0,0 +1,3 @@ +output "resource_group_name" { + value = azurerm_resource_group.example.name +} diff --git a/modules/resource_group_storage/variables.tf b/modules/resource_group_storage/variables.tf new file mode 100644 index 0000000..e67ac38 --- /dev/null +++ b/modules/resource_group_storage/variables.tf @@ -0,0 +1,14 @@ +variable "resource_group_name" { + type = string + default = "default-resource-group" +} + +variable "location" { + type = string + default = "Poland Central" +} + +variable "storage_account_name" { + type = string + default = "defaultstorageaccount" +}