Created
June 11, 2020 04:54
-
-
Save dilani14/379a989ce5f0c756e96597cbc8e28c7a to your computer and use it in GitHub Desktop.
add new db
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_sql_database" "sqldb1" { | |
name = "diltfdb1" | |
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