Skip to content

Commit

Permalink
fix: code cleanup, removed unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
NotMaharshi committed Aug 7, 2024
1 parent 7968ae0 commit 39b6e20
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 39 deletions.
4 changes: 2 additions & 2 deletions _example/complete/linux_web_app/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module "linux-web-app" {
##-----------------------------------------------------------------------------
## To Deploy Container
##-----------------------------------------------------------------------------
use_docker = true
use_docker = false
docker_image_name = var.docker_image_name
docker_registry_url = "<registryname>.azurecr.io"
docker_registry_username = "<registryname>"
Expand All @@ -60,7 +60,7 @@ module "linux-web-app" {
##-----------------------------------------------------------------------------
## Node application
##-----------------------------------------------------------------------------
use_node = false
use_node = true
node_version = var.node_version

##-----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion _example/complete/linux_web_app/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=3.109.0" #3.100.0
version = ">=3.109.0"
}
}
}
6 changes: 3 additions & 3 deletions _example/complete/windows_web_app/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ module "windows-web-app" {
##-----------------------------------------------------------------------------
## Dot net
##-----------------------------------------------------------------------------
use_dotnet = false # Make it true if want to use it
use_dotnet = true # Make it true if want to use it
dotnet_version = var.dotnet_version # For dotnet
dotnet_core_version = var.dotnet_core_version # For dotnetcore

Expand All @@ -93,14 +93,14 @@ module "windows-web-app" {
## java application
##-----------------------------------------------------------------------------

use_java = true
use_java = false
java_version = var.java_version

##-----------------------------------------------------------------------------
## To Deploy Docker Container
##-----------------------------------------------------------------------------

use_docker = true # Make it true if want to use it
use_docker = false # Make it true if want to use it
docker_image_name = var.docker_image_name
docker_registry_url = "<registryname>.azurecr.io"
docker_registry_username = "<registryname>"
Expand Down
2 changes: 1 addition & 1 deletion _example/complete/windows_web_app/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=3.109.0" #3.100.0
version = ">=3.109.0"
}
}
}
9 changes: 2 additions & 7 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ resource "azurerm_linux_web_app" "main" {
for_each = [local.site_config]

content {
linux_fx_version = lookup(site_config.value, "linux_fx_version", null) # ----> Added
linux_fx_version = lookup(site_config.value, "linux_fx_version", null)
container_registry_managed_identity_client_id = lookup(site_config.value, "container_registry_managed_identity_client_id", null)
container_registry_use_managed_identity = lookup(site_config.value, "container_registry_use_managed_identity", null)

Expand Down Expand Up @@ -242,8 +242,6 @@ resource "azurerm_linux_web_app" "main" {
headers = scm_ip_restriction.value.headers
}
}

# scm_type = lookup(site_config.value, "scm_type", null)
scm_minimum_tls_version = lookup(site_config.value, "scm_minimum_tls_version", "1.2")
scm_use_main_ip_restriction = length(var.scm_authorized_ips) > 0 || var.scm_authorized_subnet_ids != null ? false : true

Expand Down Expand Up @@ -535,7 +533,7 @@ resource "azurerm_windows_web_app" "main" {
for_each = [local.site_config]

content {
windows_fx_version = lookup(site_config.value, "windows_fx_version", null) # --> Added
windows_fx_version = lookup(site_config.value, "windows_fx_version", null)
container_registry_managed_identity_client_id = lookup(site_config.value, "container_registry_managed_identity_client_id", null)
container_registry_use_managed_identity = lookup(site_config.value, "container_registry_use_managed_identity", null)

Expand Down Expand Up @@ -578,8 +576,6 @@ resource "azurerm_windows_web_app" "main" {
headers = scm_ip_restriction.value.headers
}
}

# scm_type = lookup(site_config.value, "scm_type", null)
scm_minimum_tls_version = lookup(site_config.value, "scm_minimum_tls_version", "1.2")
scm_use_main_ip_restriction = length(var.scm_authorized_ips) > 0 || var.scm_authorized_subnet_ids != null ? false : true

Expand Down Expand Up @@ -844,7 +840,6 @@ resource "azurerm_windows_web_app" "main" {
lifecycle {
ignore_changes = [
app_settings,
# site_config.0.application_stack,
site_config.0.cors,

Check warning on line 843 in main.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

List items should be accessed using square brackets
site_config.0.ip_restriction_default_action,

Check warning on line 844 in main.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

List items should be accessed using square brackets
site_config.0.scm_ip_restriction_default_action,
Expand Down
24 changes: 0 additions & 24 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#Module : LABEL
#Description : Terraform label module variables.

#Module : LABEL
#Description : Terraform label module variables.
variable "name" {
Expand Down Expand Up @@ -477,27 +474,6 @@ variable "addon_virtual_network_id" {
description = "The name of the addon vnet link vnet id"
}

# # app insights
# variable "application_insights_enabled" {
# description = "Specify the Application Insights use for this App Service"
# default = true
# }

# variable "application_insights_id" {
# description = "Resource ID of the existing Application Insights"
# default = null
# }

# variable "app_insights_name" {
# description = "The Name of the application insights"
# default = ""
# }

# variable "application_insights_type" {
# description = "Specifies the type of Application Insights to create. Valid values are `ios` for iOS, `java` for Java web, `MobileCenter` for App Center, `Node.JS` for Node.js, `other` for General, `phone` for Windows Phone, `store` for Windows Store and `web` for ASP.NET."
# default = "web"
# }

variable "retention_in_days" {
description = "Specifies the retention period in days. Possible values are `30`, `60`, `90`, `120`, `180`, `270`, `365`, `550` or `730`"
default = 90
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=3.109.0"
version = ">=3.109.0"
}
}
}

0 comments on commit 39b6e20

Please sign in to comment.