Skip to content

Commit

Permalink
Ran terraform fmt on all terraform packages (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas M. Iodice committed May 13, 2019
1 parent 46ad926 commit ec2b15c
Show file tree
Hide file tree
Showing 27 changed files with 67 additions and 55 deletions.
1 change: 1 addition & 0 deletions infra/modules/providers/azure/api-mgmt/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions infra/modules/providers/azure/api-mgmt/output.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions infra/modules/providers/azure/api-mgmt/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

31 changes: 16 additions & 15 deletions infra/modules/providers/azure/app-gateway/main.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
data "azurerm_resource_group" "appgateway" {
name = "${var.resource_group_name}"
name = "${var.resource_group_name}"
}

data "azurerm_virtual_network" "appgateway" {
name = "${var.virtual_network_name}"
resource_group_name = "${data.azurerm_resource_group.appgateway.name}"
name = "${var.virtual_network_name}"
resource_group_name = "${data.azurerm_resource_group.appgateway.name}"
}

data "azurerm_subnet" "appgateway" {
name = "${var.subnet_name}"
resource_group_name = "${data.azurerm_resource_group.appgateway.name}"
virtual_network_name = "${data.azurerm_virtual_network.appgateway.name}"
name = "${var.subnet_name}"
resource_group_name = "${data.azurerm_resource_group.appgateway.name}"
virtual_network_name = "${data.azurerm_virtual_network.appgateway.name}"
}

resource "azurerm_application_gateway" "appgateway" {
Expand All @@ -35,10 +36,10 @@ resource "azurerm_application_gateway" "appgateway" {
}

frontend_ip_configuration {
name = "${var.appgateway_frontend_ip_configuration_name}"
subnet_id = "${var.frontend_ip_config_subnet_id}"
private_ip_address = "${var.frontend_ip_config_private_ip_address}"
public_ip_address_id = "${var.frontend_ip_config_public_ip_address_id}"
name = "${var.appgateway_frontend_ip_configuration_name}"
subnet_id = "${var.frontend_ip_config_subnet_id}"
private_ip_address = "${var.frontend_ip_config_private_ip_address}"
public_ip_address_id = "${var.frontend_ip_config_public_ip_address_id}"
}

backend_address_pool {
Expand All @@ -60,10 +61,10 @@ resource "azurerm_application_gateway" "appgateway" {
}

request_routing_rule {
name = "${var.appgateway_request_routing_rule_name}"
rule_type = "${var.request_routing_rule_type}"
http_listener_name = "${var.appgateway_listener_name}"
backend_address_pool_name = "${var.appgateway_backend_address_pool_name}"
backend_http_settings_name = "${var.appgateway_backend_http_setting_name}"
name = "${var.appgateway_request_routing_rule_name}"
rule_type = "${var.request_routing_rule_type}"
http_listener_name = "${var.appgateway_listener_name}"
backend_address_pool_name = "${var.appgateway_backend_address_pool_name}"
backend_http_settings_name = "${var.appgateway_backend_http_setting_name}"
}
}
4 changes: 2 additions & 2 deletions infra/modules/providers/azure/app-gateway/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ output "appgateway_name" {

output "appgateway_ipconfig" {
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" {
description = "The Application Gateway Frontend IP Configuration"
value = "${azurerm_application_gateway.appgateway.frontend_ip_configuration}"
value = "${azurerm_application_gateway.appgateway.frontend_ip_configuration}"
}
14 changes: 7 additions & 7 deletions infra/modules/providers/azure/app-service/main.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
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" {
name = "${var.service_plan_name}"
resource_group_name = "${data.azurerm_resource_group.appsvc.name}"
name = "${var.service_plan_name}"
resource_group_name = "${data.azurerm_resource_group.appsvc.name}"
}

resource "azurerm_app_service" "appsvc" {
Expand All @@ -14,16 +14,16 @@ resource "azurerm_app_service" "appsvc" {
app_service_plan_id = "${data.azurerm_app_service_plan.appsvc.id}"
tags = "${var.resource_tags}"
count = "${length(keys(var.app_service_name))}"

app_settings {
DOCKER_REGISTRY_SERVER_URL = "${var.docker_registry_server_url}"
DOCKER_REGISTRY_SERVER_USERNAME = "${var.docker_registry_server_username}"
DOCKER_REGISTRY_SERVER_PASSWORD = "${var.docker_registry_server_password}"
}

site_config {
linux_fx_version = "${element(values(var.app_service_name), count.index)}"
always_on = "${var.site_config_always_on}"
virtual_network_name = "${var.site_config_vnet_name}"
linux_fx_version = "${element(values(var.app_service_name), count.index)}"
always_on = "${var.site_config_always_on}"
virtual_network_name = "${var.site_config_vnet_name}"
}
}
1 change: 0 additions & 1 deletion infra/modules/providers/azure/app-service/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ output "app_service_uri" {
description = "The URL of the app service created"
value = "${azurerm_app_service.appsvc.*.default_site_hostname}"
}

6 changes: 3 additions & 3 deletions infra/modules/providers/azure/app-service/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ variable "service_plan_name" {
}

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"
type = "map"
default = {}
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"
default = {}
}

variable "app_service_name" {
Expand Down
6 changes: 3 additions & 3 deletions infra/modules/providers/azure/provider/main.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
provider "azurerm" {
version = "~>1.23.0"
version = "~>1.23.0"
}

terraform {
required_version = "~> 0.11.13"
}

provider "null" {
version = "~>2.0.0"
version = "~>2.0.0"
}

provider "azuread" {
version = "~>0.1"
}
}
6 changes: 3 additions & 3 deletions infra/modules/providers/azure/service-plan/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ resource "azurerm_app_service_plan" "svcplan" {
reserved = "${var.service_plan_kind == "Linux" ? true : "${var.service_plan_reserved}"}"

sku {
tier = "${var.service_plan_tier}"
size = "${var.service_plan_size}"
capacity = "${var.service_plan_capacity}"
tier = "${var.service_plan_tier}"
size = "${var.service_plan_size}"
capacity = "${var.service_plan_capacity}"
}
}
4 changes: 2 additions & 2 deletions infra/modules/providers/azure/service-plan/output.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
output "resource_group_name" {
description = "The name of the resource group created"
value = "${azurerm_resource_group.svcplan.name}"
value = "${azurerm_resource_group.svcplan.name}"
}

output "service_plan_name" {
Expand All @@ -10,5 +10,5 @@ output "service_plan_name" {

output "service_plan_kind" {
description = "The kind of service plan created"
value = "${azurerm_app_service_plan.svcplan.kind}"
value = "${azurerm_app_service_plan.svcplan.kind}"
}
14 changes: 7 additions & 7 deletions infra/modules/providers/azure/service-plan/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ variable "resource_group_name" {

variable "resource_group_location" {
description = "Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions"
type = "string"
type = "string"
}

variable "resource_tags" {
Expand Down Expand Up @@ -38,13 +38,13 @@ variable "service_plan_kind" {
}

variable "service_plan_capacity" {
description = "The capacity of Service Plan to be created."
type = "string"
default = "1"
description = "The capacity of Service Plan to be created."
type = "string"
default = "1"
}

variable "service_plan_reserved" {
description = "Is the Service Plan to be created reserved. Possible values are true/false"
type = "string"
default = "true"
description = "Is the Service Plan to be created reserved. Possible values are true/false"
type = "string"
default = "true"
}
1 change: 1 addition & 0 deletions infra/modules/providers/azure/tm-endpoint-ip/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions infra/modules/providers/azure/tm-endpoint-ip/output.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions infra/modules/providers/azure/tm-endpoint-ip/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions infra/modules/providers/azure/tm-profile/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions infra/modules/providers/azure/tm-profile/output.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions infra/modules/providers/azure/tm-profile/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions infra/modules/providers/azure/vnet/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions infra/modules/providers/azure/vnet/output.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions infra/modules/providers/azure/vnet/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

4 changes: 2 additions & 2 deletions infra/templates/azure-simple-hw/backend.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
backend "azurerm" {
key = "terraform.tfstate"
key = "terraform.tfstate"
}
}
}
2 changes: 1 addition & 1 deletion infra/templates/azure-simple-hw/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ output "app_service_name" {

output "app_service_default_hostname" {
value = "https://${azurerm_app_service.main.default_site_hostname}"
}
}
6 changes: 3 additions & 3 deletions infra/templates/azure-simple-hw/provider.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
provider "azurerm" {
version = "~>1.21.0"
version = "~>1.21.0"
}

provider "null" {
version = "~>2.0.0"
version = "~>2.0.0"
}

terraform {
required_version = "~> 0.11.13"
}
}
2 changes: 1 addition & 1 deletion infra/templates/azure-simple-hw/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ variable "storage_account_replication_type" {
variable "app_service_linux_container_command" {
description = "Defines the exec command for linux based container app services."
default = "DOCKER|appsvcsample/static-site:latest"
}
}
8 changes: 4 additions & 4 deletions infra/templates/backend-state-setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module "provider" {
}

module "backend-state-setup" {
source = "github.com/Microsoft/bedrock/cluster/azure/backend-state"
name = "${var.name}"
location = "${var.location}"
}
source = "github.com/Microsoft/bedrock/cluster/azure/backend-state"
name = "${var.name}"
location = "${var.location}"
}
2 changes: 1 addition & 1 deletion infra/templates/backend-state-setup/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ 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"
type = "map"
default = {}
}
}

0 comments on commit ec2b15c

Please sign in to comment.