adding service plans and listener_service
This commit is contained in:
parent
a7601bf3af
commit
11f464a0a3
@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
output "redis_connection_string" {
|
||||||
|
value = azurerm_redis_cache.selector.primary_connection_string
|
||||||
|
}
|
||||||
|
|
||||||
|
output "pgsql_server_fqdn" {
|
||||||
|
value = azurerm_postgresql_server.selector.fqdn
|
||||||
|
}
|
||||||
|
|
||||||
|
output "pgsql_database_name" {
|
||||||
|
value = azurerm_postgresql_database.selector.name
|
||||||
|
}
|
||||||
|
|
||||||
|
output "pgsql_username" {
|
||||||
|
value = azurerm_postgresql_server.selector.administrator_login
|
||||||
|
}
|
||||||
|
|
||||||
|
output "pgsql_password" {
|
||||||
|
value = azurerm_postgresql_server.selector.administrator_login_password
|
||||||
|
}
|
18
modules/listener_service/main.tf
Normal file
18
modules/listener_service/main.tf
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
resource "azurerm_service_plan" "selector" {
|
||||||
|
name = var.service_name
|
||||||
|
resource_group_name = var.resource_group_name
|
||||||
|
location = var.resource_group_location
|
||||||
|
os_type = "Linux"
|
||||||
|
sku_name = var.service_plan_sku
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "azurerm_linux_web_app" "selector" {
|
||||||
|
name = var.service_name
|
||||||
|
resource_group_name = var.resource_group_name
|
||||||
|
location = azurerm_service_plan.selector.location
|
||||||
|
service_plan_id = azurerm_service_plan.selector.id
|
||||||
|
|
||||||
|
site_config {
|
||||||
|
always_on = true
|
||||||
|
}
|
||||||
|
}
|
0
modules/listener_service/outputs.tf
Normal file
0
modules/listener_service/outputs.tf
Normal file
15
modules/listener_service/variables.tf
Normal file
15
modules/listener_service/variables.tf
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
variable "resource_group_name" {
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "resource_group_location" {
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "service_name" {
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "service_plan_sku" {
|
||||||
|
type = string
|
||||||
|
}
|
@ -3,10 +3,10 @@ resource "azurerm_service_plan" "selector" {
|
|||||||
resource_group_name = var.resource_group_name
|
resource_group_name = var.resource_group_name
|
||||||
location = var.resource_group_location
|
location = var.resource_group_location
|
||||||
os_type = "Linux"
|
os_type = "Linux"
|
||||||
sku_name = "F1"
|
sku_name = var.service_plan_sku
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "azurerm_linux_web_app" "example" {
|
resource "azurerm_linux_web_app" "selector" {
|
||||||
name = var.site_name
|
name = var.site_name
|
||||||
resource_group_name = var.resource_group_name
|
resource_group_name = var.resource_group_name
|
||||||
location = azurerm_service_plan.selector.location
|
location = azurerm_service_plan.selector.location
|
||||||
|
@ -9,3 +9,7 @@ variable "resource_group_location" {
|
|||||||
variable "site_name" {
|
variable "site_name" {
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "service_plan_sku" {
|
||||||
|
type = string
|
||||||
|
}
|
18
prod/main.tf
18
prod/main.tf
@ -22,10 +22,10 @@ locals {
|
|||||||
env_name = "selector-prod"
|
env_name = "selector-prod"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "azurerm_resource_group" "selector" {
|
# resource "azurerm_resource_group" "selector" {
|
||||||
name = local.env_name
|
# name = local.env_name
|
||||||
location = "UK South"
|
# location = "UK South"
|
||||||
}
|
# }
|
||||||
|
|
||||||
# module "web_service" {
|
# module "web_service" {
|
||||||
# source = "../modules/web_service"
|
# source = "../modules/web_service"
|
||||||
@ -33,6 +33,7 @@ resource "azurerm_resource_group" "selector" {
|
|||||||
# resource_group_name = azurerm_resource_group.selector.name
|
# resource_group_name = azurerm_resource_group.selector.name
|
||||||
# resource_group_location = azurerm_resource_group.selector.location
|
# resource_group_location = azurerm_resource_group.selector.location
|
||||||
# site_name = "${local.env_name}-web"
|
# site_name = "${local.env_name}-web"
|
||||||
|
# service_plan_sku = "F1"
|
||||||
# }
|
# }
|
||||||
|
|
||||||
# module "data" {
|
# module "data" {
|
||||||
@ -42,3 +43,12 @@ resource "azurerm_resource_group" "selector" {
|
|||||||
# resource_group_location = azurerm_resource_group.selector.location
|
# resource_group_location = azurerm_resource_group.selector.location
|
||||||
# data_name = "${local.env_name}-data"
|
# data_name = "${local.env_name}-data"
|
||||||
# }
|
# }
|
||||||
|
|
||||||
|
# module "listener_service" {
|
||||||
|
# source = "../modules/listener_service"
|
||||||
|
|
||||||
|
# resource_group_name = azurerm_resource_group.selector.name
|
||||||
|
# resource_group_location = azurerm_resource_group.selector.location
|
||||||
|
# service_name = "${local.env_name}-listener"
|
||||||
|
# service_plan_sku = "B1"
|
||||||
|
# }
|
||||||
|
Loading…
Reference in New Issue
Block a user