Skip to content

Commit c0bca8e

Browse files
committed
fix: Fixed Tflint warnings
1 parent c694540 commit c0bca8e

File tree

6 files changed

+13
-99
lines changed

6 files changed

+13
-99
lines changed

_example/basic/example.tf

-47
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,6 @@ provider "azurerm" {
22
features {}
33
}
44

5-
locals {
6-
name = "app"
7-
environment = "test"
8-
label_order = ["name", "environment"]
9-
}
10-
11-
module "resource_group" {
12-
source = "clouddrove/resource-group/azure"
13-
version = "1.0.2"
14-
name = "app"
15-
environment = "test"
16-
label_order = ["name", "environment"]
17-
location = "Canada Central"
18-
}
19-
20-
##-----------------------------------------------------------------------------
21-
## Virtual Network module call.
22-
##-----------------------------------------------------------------------------
23-
module "vnet" {
24-
source = "clouddrove/vnet/azure"
25-
version = "1.0.4"
26-
name = "app"
27-
environment = "test"
28-
resource_group_name = module.resource_group.resource_group_name
29-
location = module.resource_group.resource_group_location
30-
address_spaces = ["10.0.0.0/16"]
31-
}
32-
33-
##-----------------------------------------------------------------------------
34-
## Subnet module call.
35-
##-----------------------------------------------------------------------------
36-
module "name_specific_subnet" {
37-
source = "clouddrove/subnet/azure"
38-
version = "1.0.2"
39-
name = "app"
40-
environment = "test"
41-
resource_group_name = module.resource_group.resource_group_name
42-
location = module.resource_group.resource_group_location
43-
virtual_network_name = module.vnet.vnet_name
44-
45-
#subnet
46-
specific_name_subnet = true
47-
specific_subnet_names = "AzureBastionSubnet"
48-
subnet_prefixes = ["10.0.1.0/24"]
49-
enable_route_table = false
50-
51-
}
525
##-----------------------------------------------------------------------------
536
## Bastion module call.
547
##-----------------------------------------------------------------------------

_example/basic/outputs.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
output "bastion_dns_name" {
2-
value = join("", module.bastion.*.dns_name)
2+
value = module.bastion.dns_name
33
description = "Specifies the name of the bastion host"
44
}
55

66
output "bastion_id" {
7-
value = join("", module.bastion.*.id)
7+
value = module.bastion.id
88
description = "Specifies the name of the bastion host"
99
}
1010

_example/complete/example.tf

+7-8
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,13 @@ module "log-analytics" {
7777
## Bastion module call.
7878
##-----------------------------------------------------------------------------
7979
module "bastion" {
80-
depends_on = [module.resource_group]
81-
source = "./../../"
82-
name = "app"
83-
environment = "test"
84-
resource_group_name = module.resource_group.resource_group_name
85-
location = module.resource_group.resource_group_location
86-
virtual_network_name = module.vnet.vnet_name
87-
subnet_id = module.name_specific_subnet.specific_subnet_id[0]
80+
depends_on = [module.resource_group]
81+
source = "./../../"
82+
name = "app"
83+
environment = "test"
84+
resource_group_name = module.resource_group.resource_group_name
85+
location = module.resource_group.resource_group_location
86+
subnet_id = module.name_specific_subnet.specific_subnet_id[0]
8887

8988
##-----------------------------------------------------------------------------
9089
## enable diagnostic setting

_example/complete/outputs.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
output "bastion_dns_name" {
2-
value = join("", module.bastion.*.dns_name)
2+
value = module.bastion.dns_name
33
description = "Specifies the name of the bastion host"
44
}
55

66
output "bastion_id" {
7-
value = join("", module.bastion.*.id)
7+
value = module.bastion.id
88
description = "Specifies the name of the bastion host"
99
}
1010

outputs.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
output "dns_name" {
2-
value = join("", azurerm_bastion_host.main.*.dns_name)
2+
value = azurerm_bastion_host.main[0].dns_name
33
description = "Specifies the name of the bastion host"
44
}
55

66
output "id" {
7-
value = join("", azurerm_bastion_host.main.*.id)
7+
value = azurerm_bastion_host.main[0].id
88
description = "Specifies the resource id of the bastion host"
99
}

variables.tf

-38
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ variable "label_order" {
1818
description = "Label order, e.g. sequence of application name and environment `name`,`environment`,'attribute' [`webserver`,`qa`,`devops`,`public`,] ."
1919
}
2020

21-
variable "tags" {
22-
type = map(string)
23-
default = {}
24-
description = "Additional tags (e.g. map(`BusinessUnit`,`XYZ`)."
25-
}
2621

2722
variable "managedby" {
2823
type = string
@@ -43,12 +38,6 @@ variable "location" {
4338
description = "A location the resources"
4439
}
4540

46-
variable "virtual_network_name" {
47-
type = string
48-
default = null
49-
description = "The name of the virtual network"
50-
}
51-
5241
variable "public_ip_allocation_method" {
5342
type = string
5443
default = "Static"
@@ -62,11 +51,6 @@ variable "public_ip_sku" {
6251
description = "The SKU of the Public IP. Accepted values are Basic and Standard. Defaults to Basic"
6352
}
6453

65-
variable "azure_bastion_subnet_address_prefix" {
66-
type = list(any)
67-
default = []
68-
description = "The address prefix to use for the Azure Bastion subnet"
69-
}
7054

7155
variable "enable_copy_paste" {
7256
type = bool
@@ -159,23 +143,6 @@ variable "log_analytics_destination_type" {
159143
description = "Possible values are AzureDiagnostics and Dedicated, default to AzureDiagnostics. When set to Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table."
160144
}
161145

162-
variable "retention_policy_enabled" {
163-
type = bool
164-
default = false
165-
description = "Is this Retention Policy enabled?"
166-
}
167-
168-
variable "diagnostic_log_days" {
169-
type = number
170-
default = "90"
171-
description = " The number of days for which this Retention Policy should apply."
172-
}
173-
174-
variable "Metric_enable" {
175-
type = bool
176-
default = true
177-
description = "Is this Diagnostic Metric enabled? Defaults to true."
178-
}
179146

180147
variable "diagnostic_setting_enable" {
181148
type = bool
@@ -187,11 +154,6 @@ variable "log_analytics_workspace_id" {
187154
default = null
188155
}
189156

190-
variable "category" {
191-
type = string
192-
default = null
193-
description = " The name of a Diagnostic Log Category Group for this Resource."
194-
}
195157

196158
variable "log_enabled" {
197159
type = string

0 commit comments

Comments
 (0)