зеркало из https://github.com/microsoft/cobalt.git
Ran `terraform fmt` on all terraform packages (#98)
This commit is contained in:
Родитель
46ad926084
Коммит
ec2b15ce67
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
data "azurerm_resource_group" "appgateway" {
|
data "azurerm_resource_group" "appgateway" {
|
||||||
name = "${var.resource_group_name}"
|
name = "${var.resource_group_name}"
|
||||||
}
|
}
|
||||||
|
|
||||||
data "azurerm_virtual_network" "appgateway" {
|
data "azurerm_virtual_network" "appgateway" {
|
||||||
name = "${var.virtual_network_name}"
|
name = "${var.virtual_network_name}"
|
||||||
resource_group_name = "${data.azurerm_resource_group.appgateway.name}"
|
resource_group_name = "${data.azurerm_resource_group.appgateway.name}"
|
||||||
}
|
}
|
||||||
|
|
||||||
data "azurerm_subnet" "appgateway" {
|
data "azurerm_subnet" "appgateway" {
|
||||||
name = "${var.subnet_name}"
|
name = "${var.subnet_name}"
|
||||||
resource_group_name = "${data.azurerm_resource_group.appgateway.name}"
|
resource_group_name = "${data.azurerm_resource_group.appgateway.name}"
|
||||||
virtual_network_name = "${data.azurerm_virtual_network.appgateway.name}"
|
virtual_network_name = "${data.azurerm_virtual_network.appgateway.name}"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "azurerm_application_gateway" "appgateway" {
|
resource "azurerm_application_gateway" "appgateway" {
|
||||||
|
@ -35,10 +36,10 @@ resource "azurerm_application_gateway" "appgateway" {
|
||||||
}
|
}
|
||||||
|
|
||||||
frontend_ip_configuration {
|
frontend_ip_configuration {
|
||||||
name = "${var.appgateway_frontend_ip_configuration_name}"
|
name = "${var.appgateway_frontend_ip_configuration_name}"
|
||||||
subnet_id = "${var.frontend_ip_config_subnet_id}"
|
subnet_id = "${var.frontend_ip_config_subnet_id}"
|
||||||
private_ip_address = "${var.frontend_ip_config_private_ip_address}"
|
private_ip_address = "${var.frontend_ip_config_private_ip_address}"
|
||||||
public_ip_address_id = "${var.frontend_ip_config_public_ip_address_id}"
|
public_ip_address_id = "${var.frontend_ip_config_public_ip_address_id}"
|
||||||
}
|
}
|
||||||
|
|
||||||
backend_address_pool {
|
backend_address_pool {
|
||||||
|
@ -60,10 +61,10 @@ resource "azurerm_application_gateway" "appgateway" {
|
||||||
}
|
}
|
||||||
|
|
||||||
request_routing_rule {
|
request_routing_rule {
|
||||||
name = "${var.appgateway_request_routing_rule_name}"
|
name = "${var.appgateway_request_routing_rule_name}"
|
||||||
rule_type = "${var.request_routing_rule_type}"
|
rule_type = "${var.request_routing_rule_type}"
|
||||||
http_listener_name = "${var.appgateway_listener_name}"
|
http_listener_name = "${var.appgateway_listener_name}"
|
||||||
backend_address_pool_name = "${var.appgateway_backend_address_pool_name}"
|
backend_address_pool_name = "${var.appgateway_backend_address_pool_name}"
|
||||||
backend_http_settings_name = "${var.appgateway_backend_http_setting_name}"
|
backend_http_settings_name = "${var.appgateway_backend_http_setting_name}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,10 @@ output "appgateway_name" {
|
||||||
|
|
||||||
output "appgateway_ipconfig" {
|
output "appgateway_ipconfig" {
|
||||||
description = "The Application Gateway IP Configuration"
|
description = "The Application Gateway IP Configuration"
|
||||||
value = "${azurerm_application_gateway.appgateway.gateway_ip_configuration}"
|
value = "${azurerm_application_gateway.appgateway.gateway_ip_configuration}"
|
||||||
}
|
}
|
||||||
|
|
||||||
output "appgateway_frontend_ip_configuration" {
|
output "appgateway_frontend_ip_configuration" {
|
||||||
description = "The Application Gateway Frontend IP Configuration"
|
description = "The Application Gateway Frontend IP Configuration"
|
||||||
value = "${azurerm_application_gateway.appgateway.frontend_ip_configuration}"
|
value = "${azurerm_application_gateway.appgateway.frontend_ip_configuration}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
data "azurerm_resource_group" "appsvc" {
|
data "azurerm_resource_group" "appsvc" {
|
||||||
name = "${var.service_plan_resource_group_name}"
|
name = "${var.service_plan_resource_group_name}"
|
||||||
}
|
}
|
||||||
|
|
||||||
data "azurerm_app_service_plan" "appsvc" {
|
data "azurerm_app_service_plan" "appsvc" {
|
||||||
name = "${var.service_plan_name}"
|
name = "${var.service_plan_name}"
|
||||||
resource_group_name = "${data.azurerm_resource_group.appsvc.name}"
|
resource_group_name = "${data.azurerm_resource_group.appsvc.name}"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "azurerm_app_service" "appsvc" {
|
resource "azurerm_app_service" "appsvc" {
|
||||||
|
@ -22,8 +22,8 @@ resource "azurerm_app_service" "appsvc" {
|
||||||
}
|
}
|
||||||
|
|
||||||
site_config {
|
site_config {
|
||||||
linux_fx_version = "${element(values(var.app_service_name), count.index)}"
|
linux_fx_version = "${element(values(var.app_service_name), count.index)}"
|
||||||
always_on = "${var.site_config_always_on}"
|
always_on = "${var.site_config_always_on}"
|
||||||
virtual_network_name = "${var.site_config_vnet_name}"
|
virtual_network_name = "${var.site_config_vnet_name}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,4 +2,3 @@ output "app_service_uri" {
|
||||||
description = "The URL of the app service created"
|
description = "The URL of the app service created"
|
||||||
value = "${azurerm_app_service.appsvc.*.default_site_hostname}"
|
value = "${azurerm_app_service.appsvc.*.default_site_hostname}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,9 @@ variable "service_plan_name" {
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "resource_tags" {
|
variable "resource_tags" {
|
||||||
description = "Map of tags to apply to taggable resources in this module. By default the taggable resources are tagged with the name defined above and this map is merged in"
|
description = "Map of tags to apply to taggable resources in this module. By default the taggable resources are tagged with the name defined above and this map is merged in"
|
||||||
type = "map"
|
type = "map"
|
||||||
default = {}
|
default = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "app_service_name" {
|
variable "app_service_name" {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
provider "azurerm" {
|
provider "azurerm" {
|
||||||
version = "~>1.23.0"
|
version = "~>1.23.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
terraform {
|
terraform {
|
||||||
|
@ -7,7 +7,7 @@ terraform {
|
||||||
}
|
}
|
||||||
|
|
||||||
provider "null" {
|
provider "null" {
|
||||||
version = "~>2.0.0"
|
version = "~>2.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
provider "azuread" {
|
provider "azuread" {
|
||||||
|
|
|
@ -13,8 +13,8 @@ resource "azurerm_app_service_plan" "svcplan" {
|
||||||
reserved = "${var.service_plan_kind == "Linux" ? true : "${var.service_plan_reserved}"}"
|
reserved = "${var.service_plan_kind == "Linux" ? true : "${var.service_plan_reserved}"}"
|
||||||
|
|
||||||
sku {
|
sku {
|
||||||
tier = "${var.service_plan_tier}"
|
tier = "${var.service_plan_tier}"
|
||||||
size = "${var.service_plan_size}"
|
size = "${var.service_plan_size}"
|
||||||
capacity = "${var.service_plan_capacity}"
|
capacity = "${var.service_plan_capacity}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
output "resource_group_name" {
|
output "resource_group_name" {
|
||||||
description = "The name of the resource group created"
|
description = "The name of the resource group created"
|
||||||
value = "${azurerm_resource_group.svcplan.name}"
|
value = "${azurerm_resource_group.svcplan.name}"
|
||||||
}
|
}
|
||||||
|
|
||||||
output "service_plan_name" {
|
output "service_plan_name" {
|
||||||
|
@ -10,5 +10,5 @@ output "service_plan_name" {
|
||||||
|
|
||||||
output "service_plan_kind" {
|
output "service_plan_kind" {
|
||||||
description = "The kind of service plan created"
|
description = "The kind of service plan created"
|
||||||
value = "${azurerm_app_service_plan.svcplan.kind}"
|
value = "${azurerm_app_service_plan.svcplan.kind}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,13 +38,13 @@ variable "service_plan_kind" {
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "service_plan_capacity" {
|
variable "service_plan_capacity" {
|
||||||
description = "The capacity of Service Plan to be created."
|
description = "The capacity of Service Plan to be created."
|
||||||
type = "string"
|
type = "string"
|
||||||
default = "1"
|
default = "1"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "service_plan_reserved" {
|
variable "service_plan_reserved" {
|
||||||
description = "Is the Service Plan to be created reserved. Possible values are true/false"
|
description = "Is the Service Plan to be created reserved. Possible values are true/false"
|
||||||
type = "string"
|
type = "string"
|
||||||
default = "true"
|
default = "true"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
terraform {
|
terraform {
|
||||||
backend "azurerm" {
|
backend "azurerm" {
|
||||||
key = "terraform.tfstate"
|
key = "terraform.tfstate"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
provider "azurerm" {
|
provider "azurerm" {
|
||||||
version = "~>1.21.0"
|
version = "~>1.21.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
provider "null" {
|
provider "null" {
|
||||||
version = "~>2.0.0"
|
version = "~>2.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
terraform {
|
terraform {
|
||||||
|
|
|
@ -3,7 +3,7 @@ module "provider" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "backend-state-setup" {
|
module "backend-state-setup" {
|
||||||
source = "github.com/Microsoft/bedrock/cluster/azure/backend-state"
|
source = "github.com/Microsoft/bedrock/cluster/azure/backend-state"
|
||||||
name = "${var.name}"
|
name = "${var.name}"
|
||||||
location = "${var.location}"
|
location = "${var.location}"
|
||||||
}
|
}
|
Загрузка…
Ссылка в новой задаче