Skip to content

Commit

Permalink
terraform fmt and validate
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkitToTheNew committed Aug 1, 2024
1 parent 8905ffc commit 65396b6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 27 deletions.
4 changes: 2 additions & 2 deletions _data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data "azurecaf_name" "apim" {
name = var.stack
resource_type = "azurerm_api_management"
prefixes = var.name_prefix == "" ? null : [local.name_prefix]
suffixes = compact([var.client_name, var.location_short, var.environment, local.name_suffix, var.use_caf_naming ? "" : "apim"])
suffixes = compact([var.client_name, var.environment, local.name_suffix, var.use_caf_naming ? "" : "apim"])
use_slug = var.use_caf_naming
clean_input = true
separator = "-"
Expand All @@ -12,7 +12,7 @@ data "azurecaf_name" "apim_nsg_rule" {
name = var.stack
resource_type = "azurerm_network_security_rule"
prefixes = var.name_prefix == "" ? null : [local.name_prefix]
suffixes = compact([var.client_name, var.location_short, var.environment, local.name_suffix, var.use_caf_naming ? "" : "apim-nsg"])
suffixes = compact([var.client_name, var.environment, local.name_suffix, var.use_caf_naming ? "" : "apim-nsg"])
use_slug = var.use_caf_naming
clean_input = true
separator = "-"
Expand Down
2 changes: 1 addition & 1 deletion _locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ locals {
stack = var.stack
} : {}

# Naming locals/constants
# Naming locals/constants
name_prefix = lower(var.name_prefix)
name_suffix = lower(var.name_suffix)

Expand Down
4 changes: 0 additions & 4 deletions _variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ variable "location" {
type = string
}

variable "location_short" {
description = "Short string for Azure location."
type = string
}

variable "sku_tier" {
description = "APIM SKU. Valid values include: Developer, Basic, Standard, StandardV2 and Premium."
Expand Down
14 changes: 7 additions & 7 deletions examples/main/modules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ module "log_analytics" {
workspace_name = "${local.name_prefix}-log"
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
tags = var.extra_tags
tags = var.extra_tags
}

module "apim" {
source = "../../"
source = "../../"

location = var.location
client_name = var.client_name
environment = var.environment
stack = var.stack
location = var.location
client_name = var.client_name
environment = var.environment
stack = var.stack

resource_group_name = var.resource_group_name
resource_group_name = azurerm_resource_group.rg.name

sku_tier = "Standard"
sku_capacity = 1
Expand Down
13 changes: 0 additions & 13 deletions r-logs.tf

This file was deleted.

0 comments on commit 65396b6

Please sign in to comment.