Created
May 8, 2020 14:39
-
-
Save dilani14/a68c02d721a8c28294bb98afd360fb48 to your computer and use it in GitHub Desktop.
terraform configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "location" { | |
type = string | |
default = "eastus" | |
} | |
provider "azurerm" { | |
version = 1.38 | |
} | |
resource "azurerm_resource_group" "rg" { | |
name = "dilani-tf-rg" | |
location = var.location | |
} | |
resource "azurerm_sql_server" "sqlserver" { | |
name = "diltfsqlserver" | |
resource_group_name = azurerm_resource_group.rg.name | |
location = var.location | |
version = "12.0" | |
administrator_login = "diladmin" | |
administrator_login_password = "1qaz2wsx@" | |
} | |
resource "azurerm_sql_database" "sqldb" { | |
name = "diltfdb" | |
resource_group_name = azurerm_resource_group.rg.name | |
location = var.location | |
server_name = azurerm_sql_server.sqlserver.name | |
} | |
resource "azurerm_app_service_plan" "serviceplan" { | |
name = "diltf-appserviceplan" | |
location = var.location | |
resource_group_name = azurerm_resource_group.rg.name | |
sku { | |
tier = "Standard" | |
size = "S1" | |
} | |
} | |
resource "azurerm_app_service" "appservice" { | |
name = "diltf-app-service" | |
location = var.location | |
resource_group_name = azurerm_resource_group.rg.name | |
app_service_plan_id = azurerm_app_service_plan.serviceplan.id | |
app_settings = { | |
"ASPNETCORE_ENVIRONMENT" = "QA" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment