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
################################## | |
##### App Service Slot ########### | |
################################## | |
resource "azurerm_app_service_slot" "azuredemo-as-slot" { | |
count = var.environment == "prod" ? 1 : 0 | |
name = "staging" | |
app_service_name = "azuredemo-as.name" | |
resource_group_name = "resource_group_name" | |
location = "resource_group_location" | |
app_service_plan_id = "app_service_plan_id" |
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
locals { | |
env-dev = var.environment == "dev" | |
} | |
####################################### | |
##### App Service Plan ################ | |
####################################### | |
resource "azurerm_app_service_plan" "azuredemo-as-asp" { | |
name = "${var.environment}-${var.service}-asp" | |
resource_group_name = "resource_group_name" |
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" { |
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
terraform { | |
backend "azurerm" { | |
resource_group_name = "dilani-tf-rg" | |
storage_account_name = "dilanitfsc" | |
container_name = "dilanitfcontainer" | |
key = "qa.tfstate" | |
} | |
} |
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" { |
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
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" | |
} | |
} |
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
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@" | |
} |
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" { | |
} | |
resource "azurerm_resource_group" "rg" { |
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
let students = ['Bob', 'John', ['Steve', 'Daniel'], 'Philip']; | |
const [first, second, [third, fourth]] = students; | |
console.log(`Thrid and Fourth are : ${third} and ${fourth}`); | |
//output: Thrid and Fourth are : Steve and Daniel |
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
let students = ['Bob', 'John', 'Steve', 'Daniel', 'Gorge', 'Philip']; | |
const [first, second, third, ...other] = students; | |
console.log('Students except 1st, 2nd, 3rd:',other); | |
// output: Students except 1st, 2nd, 3rd: (3) ["Daniel", "Gorge", "Philip"] | |
NewerOlder