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

add basic tf #495

Open
wants to merge 1 commit 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,5 @@ src/adminTools/adminBlazorWebsite/src/appsettings.Development.json

#Igniore VSCode User Setting
**/.vscode/settings.json

terraform/.terraform
41 changes: 41 additions & 0 deletions terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
resource "azurerm_resource_group" "az_url_shortener" {
location = var.location
name = var.app_name
}

resource "azurerm_static_site" "tiny_blazor_admin" {
name = var.app_name
resource_group_name = azurerm_resource_group.az_url_shortener.name
location = azurerm_resource_group.az_url_shortener.location
sku_tier = "Standard"
sku_size = "Standard"
}

28 changes: 28 additions & 0 deletions terraform/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
terraform {
required_version = ">=0.12"

required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>2.0"
}
random = {
source = "hashicorp/random"
version = ">= 3.4.0"
}
# tls = {
# source = "hashicorp/tls"
# version = "~>4.0"
# }
}
backend "azurerm" {
resource_group_name = "tfstate"
storage_account_name = "tfstate28423"
container_name = "tfstate"
key = "AzUrlShortener.tfstate"
}
}

provider "azurerm" {
features {}
}
12 changes: 12 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
variable "location" {
default = "centralus"
description = "Azure Region (eastus, centralus, etc.)"
type = string
}

variable "app_name" {
default = "AzUrlShortener"
description = "Application Name"
type = string
}