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

Develop #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Local .terraform directories
**/.terraform/*
./terraform/*

# .tfstate files
*.tfstate
*.tfstate.*

# Exclude all .tfvars files, which are likely to contain sensitive data, such as
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
*.tfvars
*.tfvars.json

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json

# Ignore CLI configuration files
.terraformrc
terraform.rc

# Ignore for zip files
*.zip
5 changes: 5 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module "resource_group_storage" {
source = "yaaszp/resource_group_storage/azurerm"
version = "1.0.0"
}

26 changes: 26 additions & 0 deletions modules/resource_group_storage/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "3.105.0"
}
}
}

provider "azurerm" {
features {}
}

resource "azurerm_resource_group" "rg" {
name = var.resource_group_name
location = var.location_for_rg
}

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

10 changes: 10 additions & 0 deletions modules/resource_group_storage/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
output "resource_group_id" {
value = azurerm_resource_group.rg.id
sensitive = true
}

output "storage_account_id" {
value = azurerm_storage_account.storage_account.id
sensitive = true
}

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" {
type = string
default = "task-6-rg"
description = "Resource group Name"
}

variable "location_for_rg" {
type = string
default = "West Europe"
description = "Location for the resources"
}

variable "storage_account_name" {
type = string
default = "task-6-yaas-storage-account"
description = "Storage account Name"
}